for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Imanghafoori\HeyMan\Conditions\Traits;
class Callbacks
{
public function closureAllows($emptyString, $callback, $parameters = [])
// laravel bug :
// it is not clear why laravel passes the $emptyString as the first parameter here.
// check Imanghafoori\HeyMan\Conditions\ConditionsFacade class line 12;
return $this->methodAllows($emptyString, $callback, $parameters);
}
public function methodAllows($emptyString, $callback, array $parameters = [])
$emptyString
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function methodAllows(/** @scrutinizer ignore-unused */ $emptyString, $callback, array $parameters = [])
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return function (...$payload) use ($callback, $parameters) {
return (bool) app()->call($callback, array_merge($parameters, ...$payload));
};
public function valueAllows($value)
return function () use ($value) {
return (bool) $value;
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.