-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Description
The following code fails to scan due to line 6 (use function usort).
<?php
namespace Demo;
use function strlen;
use function usort;
use function var_dump;
$data = [
"test-one",
"test-three",
"test-two",
"test-four",
];
$sortCallback = function ($a, $b) {
$lA = strlen($a);
$lB = strlen($b);
if ($lA == $lB) {
return 0;
}
return $lA < $lB ? -1 : 1;
};
usort($data, $sortCallback);
var_dump($data);Getting error: An error occurred during processing; checking has been aborted.
The error message was: Undefined index: parenthesis_closer in
...\Sniffs\BadFunctions\CallbackFunctionsSniff.php on line 34
Can you allow for native function imports?
Metadata
Metadata
Assignees
Labels
No labels