updated-packages
This commit is contained in:
@@ -17,6 +17,9 @@ class BoundMethod
|
||||
* @param array $parameters
|
||||
* @param string|null $defaultMethod
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \ReflectionException
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public static function call($container, $callback, array $parameters = [], $defaultMethod = null)
|
||||
{
|
||||
@@ -49,7 +52,7 @@ class BoundMethod
|
||||
// We will assume an @ sign is used to delimit the class name from the method
|
||||
// name. We will split on this @ sign and then build a callable array that
|
||||
// we can pass right back into the "call" method for dependency binding.
|
||||
$method = count($segments) == 2
|
||||
$method = count($segments) === 2
|
||||
? $segments[1] : $defaultMethod;
|
||||
|
||||
if (is_null($method)) {
|
||||
@@ -107,6 +110,8 @@ class BoundMethod
|
||||
* @param callable|string $callback
|
||||
* @param array $parameters
|
||||
* @return array
|
||||
*
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
protected static function getMethodDependencies($container, $callback, array $parameters = [])
|
||||
{
|
||||
@@ -122,8 +127,10 @@ class BoundMethod
|
||||
/**
|
||||
* Get the proper reflection instance for the given callback.
|
||||
*
|
||||
* @param callable|string $callback
|
||||
* @param callable|string $callback
|
||||
* @return \ReflectionFunctionAbstract
|
||||
*
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
protected static function getCallReflector($callback)
|
||||
{
|
||||
@@ -143,7 +150,7 @@ class BoundMethod
|
||||
* @param \ReflectionParameter $parameter
|
||||
* @param array $parameters
|
||||
* @param array $dependencies
|
||||
* @return mixed
|
||||
* @return void
|
||||
*/
|
||||
protected static function addDependencyForCallParameter($container, $parameter,
|
||||
array &$parameters, &$dependencies)
|
||||
|
||||
Reference in New Issue
Block a user