$fixArrayFn = function ($array) use (&$fixArrayFn) {
$fixArrayFn($array); // <- here
};
This produces:
PHP0402 Illegal function name of type 'void', name must be of type string, array or callable tesla C:\tesla\pc-college\src\Controller\DataTableController.php 268
and
PHP0412 Use of unassigned variable 'fixArrayFn' tesla C:\tesla\pc-college\src\Controller\DataTableController.php 268
And a question: since php doesn't really have type-casting for class objects (...wow), using the workaround of using a function and specifying the return type there causes a PHP0408 of mismatching return type.
public function getOffice() : OtherClass
{
return $this;
}
Can this be done without throwing a warning?