Skip to content
This repository has been archived by the owner on Feb 6, 2020. It is now read-only.

change call_user_func* with self invoked function #265

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions test/CommonServiceLocatorBehaviorsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
use function array_fill_keys;
use function array_keys;
use function array_merge;
use function call_user_func_array;
use function restore_error_handler;
use function set_error_handler;

Expand Down Expand Up @@ -811,7 +810,7 @@ public function testConfiguringInstanceRaisesExceptionIfAllowOverrideIsFalse($me
$container = $this->createContainer(['services' => ['foo' => $this]]);
$container->setAllowOverride(false);
$this->expectException(ContainerModificationsNotAllowedException::class);
call_user_func_array([$container, $method], $args);
$container->$method(...$args);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion test/TestAsset/PassthroughDelegatorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ class PassthroughDelegatorFactory implements DelegatorFactoryInterface
*/
public function __invoke(ContainerInterface $container, $name, callable $callback, array $options = null)
{
return call_user_func($callback);
return $callback();
}
}
3 changes: 1 addition & 2 deletions test/TestAsset/V2ValidationPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use RuntimeException;
use Zend\ServiceManager\AbstractPluginManager;

use function call_user_func;
use function is_callable;
use function sprintf;

Expand All @@ -27,6 +26,6 @@ public function validatePlugin($plugin)
));
}

call_user_func($this->assertion, $plugin);
($this->assertion)($plugin);
}
}