class Post
{
public function __construct(
public string $title,
public array $categories,
) {
}
}
function post2(bool $foo)
{
return $foo;
}
// warns about the second parameter, but not the first or 3rd
$p = new Post(2, 2, 2);
// does not warn that am setting title as a number
$p->title = 1;
// does not warn that setting foo as a string
$p2 = post2('222');
Platform and version
OS and Intelephense version.
MacOS 14.4.1, VSCode 1.87.2, Intellephense 1.10.4
Describe the bug
Platform and version OS and Intelephense version. MacOS 14.4.1, VSCode 1.87.2, Intellephense 1.10.4