[ 'code' => ' [ '$a' => 'int', ], ], 'methodTypeHints' => [ 'code' => ' [ '$a' => 'int', ], ], 'nullCoalesce' => [ 'code' => ' [ '$a' => 'null|string', ], ], 'nullCoalesceWithNullableOnLeft' => [ 'code' => ' 5 ? "hello" : null; } $a = foo() ?? "goodbye";', 'assertions' => [ '$a' => 'string', ], ], 'nullCoalesceWithReference' => [ 'code' => ' [ '$a' => 'int', ], ], 'spaceship' => [ 'code' => ' 1;', 'assertions' => [ '$a' => 'int', ], ], 'defineArray' => [ 'code' => ' [ '$a' => 'string', ], ], 'anonymousClassLogger' => [ 'code' => 'logger = $logger; } } $app = new Application; $app->setLogger(new class implements Logger { /** @return void */ public function log(string $msg) { echo $msg; } });', ], 'anonymousClassFunctionReturnType' => [ 'code' => 'f());', ], 'anonymousClassStatement' => [ 'code' => ' [ 'code' => 'i = new class implements I {}; } public function foo2(): void {} // commenting this line out fixes }', ], 'anonymousClassExtendsWithThis' => [ 'code' => 'foo(); return 42; } };', ], 'returnAnonymousClass' => [ 'code' => ' [ 'code' => ' [ 'code' => ' [ 'code' => ' 'UndefinedClass', ], 'anonymousClassWithInvalidFunctionReturnType' => [ 'code' => ' 'InvalidReturnStatement', ], ]; } }