Skip to content
Snippets Groups Projects
Verified Commit a3c95609 authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

fix: undefined variables


Signed-off-by: default avatarBart Jaskulski <bjaskulski@protonmail.com>
parent 93f65683
No related branches found
No related tags found
2 merge requests!3improve into wp-hook and some additional unfinished things,!21.x
......@@ -24,10 +24,10 @@ class CallableBinder implements Binder {
public function bind( Definition $def ): void {
if ( $def instanceof CallableDefinition ) {
$ref = new \ReflectionFunction( $definition->value() );
$ref = new \ReflectionFunction( $def->value() );
$parameters = [];
foreach ( $ref->getParameters() as $ref_param ) {
$parameters[] = $container->get( $ref_param->getType()->getName() );
$parameters[] = $this->container->get( $ref_param->getType()->getName() );
}
$ref->invokeArgs( $parameters );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment