Invalid PHP Inspection

In PHPStorm 2017.1.2, the following code generates an error in the line 8.

<?php

$isSame = function ($a, $b) {
return $a === $b;
};

$isA = function ($var) use ($isSame) {
return $isSame($var, 'A');
};

return $isA('A');

The error is "Method call uses 2 parameters, but method signature uses 1 parameters".

I think, it's ok...

0

Please sign in to leave a comment.