[2.5] Remove possible call_user_func()
This commit is contained in:
parent
9500411c9a
commit
94a04cba54
@ -87,11 +87,12 @@ class BinaryNode extends Node
|
||||
if (isset(self::$functions[$operator])) {
|
||||
$right = $this->nodes['right']->evaluate($functions, $values);
|
||||
|
||||
if ('not in' == $operator) {
|
||||
return !call_user_func('in_array', $left, $right);
|
||||
if ('not in' === $operator) {
|
||||
return !in_array($left, $right);
|
||||
}
|
||||
$f = self::$functions[$operator];
|
||||
|
||||
return call_user_func(self::$functions[$operator], $left, $right);
|
||||
return $f($left, $right);
|
||||
}
|
||||
|
||||
switch ($operator) {
|
||||
|
@ -992,7 +992,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
|
||||
$p = $this->getProcess('php -r "usleep(500000);"');
|
||||
$p->disableOutput();
|
||||
$this->setExpectedException($exception, $exceptionMessage);
|
||||
call_user_func(array($p, $startMethod), function () {});
|
||||
$p->{$startMethod}(function () {});
|
||||
}
|
||||
|
||||
public function provideStartMethods()
|
||||
@ -1013,7 +1013,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
|
||||
$p->disableOutput();
|
||||
$p->start();
|
||||
$this->setExpectedException('Symfony\Component\Process\Exception\LogicException', 'Output has been disabled.');
|
||||
call_user_func(array($p, $fetchMethod));
|
||||
$p->{$fetchMethod}();
|
||||
}
|
||||
|
||||
public function provideOutputFetchingMethods()
|
||||
|
@ -505,11 +505,11 @@ class PropertyAccessor implements PropertyAccessorInterface
|
||||
}
|
||||
|
||||
foreach ($itemToRemove as $item) {
|
||||
call_user_func(array($object, $removeMethod), $item);
|
||||
$object->{$removeMethod}($item);
|
||||
}
|
||||
|
||||
foreach ($itemsToAdd as $item) {
|
||||
call_user_func(array($object, $addMethod), $item);
|
||||
$object->{$addMethod}($item);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user