vimeo / psalm

A static analysis tool for finding errors in PHP applications
https://psalm.dev
MIT License
5.55k stars 659 forks source link

@psalm-trace result of the statement beneath without a variable #3394

Open vudaltsov opened 4 years ago

vudaltsov commented 4 years ago

https://psalm.dev/r/7839fd158c

psalm-github-bot[bot] commented 4 years ago

I found these snippets:

https://psalm.dev/r/7839fd158c ```php */ function queryHandler(GetClients $query): array { /** @psalm-trace */ return $this ->default ->selectFrom('client') ->columns('client_id', 'name', 'logo') ->orderBy('client_id') ->result() ->mapTo(Client::class) ->toList() ; } ``` ``` Psalm output (using commit d60ece7): ERROR: UndefinedClass - 6:23 - Class or interface GetClients does not exist ERROR: UndefinedDocblockClass - 4:18 - Docblock-defined class or interface Client does not exist INFO: MixedInferredReturnType - 4:18 - Could not verify return type 'list' for queryHandler ```