Given a variable $query that is of type \Cake\Database\Query (from https://github.com/cakephp/database), when passing an array with 2 elements into the select or order functions, I get the error below
ERROR: UndefinedClass - /path/To/File.php:65:23 - Class or interface ASC does not exist
$query->order([
'instance_date' => 'ASC',
'start_time' => 'ASC',
]);
However, stepping into the class in use there, I'm unable to find anywhere that would cause (either through usage or annotations) that would indicate that the first value in that array should be a class/interface.
Is there any way to get out more info about where that expectation has come from? I've tried --debug and --debug-by-line but those didn't give me any more info and I don't see any other options that would do that when looking at the output of --help.
I've attempted to reproduce this with the online demo at https://psalm.dev/ but have been unsuccessful.
Given a variable
$querythat is of type\Cake\Database\Query(from https://github.com/cakephp/database), when passing an array with 2 elements into theselectororderfunctions, I get the error belowHowever, stepping into the class in use there, I'm unable to find anywhere that would cause (either through usage or annotations) that would indicate that the first value in that array should be a class/interface.
Is there any way to get out more info about where that expectation has come from? I've tried
--debugand--debug-by-linebut those didn't give me any more info and I don't see any other options that would do that when looking at the output of--help.I've attempted to reproduce this with the online demo at https://psalm.dev/ but have been unsuccessful.