Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change call_user_func* with self invoked function #37

Merged
merged 1 commit into from
May 11, 2020
Merged
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 @@ -33,7 +33,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 @@ -812,7 +811,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 @@ -19,6 +19,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 @@ -11,7 +11,6 @@
use Laminas\ServiceManager\AbstractPluginManager;
use RuntimeException;

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

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

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