Commit fdfc9649 authored by Radek Suski's avatar Radek Suski

ParamsByName method name overriden 0 fixed

parent 6b2bbe97
......@@ -23,15 +23,15 @@ defined( 'SOBI' ) || exit( 'Restricted access' );
trait ParamsByName
{
/**
* @param string $method
* @param string $called
* @param array $args
*
* @return self
* @throws \ReflectionException
*/
public function & __invoke( string $method, array $args ): self
public function & __invoke( string $called, array $args ): self
{
$method = new \ReflectionMethod( $this, $method );
$method = new \ReflectionMethod( $this, $called );
$params = $method->getParameters();
$argsProcessed = [];
if ( count( $params ) ) {
......@@ -49,7 +49,7 @@ trait ParamsByName
}
}
}
call_user_func_array( [ 'self', $method ], $argsProcessed );
call_user_func_array( [ $this, $called ], $argsProcessed );
return $this;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment