<?php
class Foo {
public const WHEELER = [
'car' => 4,
'bike' => 2,
];
}
/**
* @param key-of<Foo::WHEELER> $type
* @param value-of<Foo::WHEELER> $wheels
*/
function repair(string $type, int $wheels): void
{
}
In this case, $type treat as string|int
, and $wheels become mixed
. This doesn't seem correct, should use native type