Skip to content

Commit

Permalink
Do not call magic method explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
pauci committed Apr 26, 2017
1 parent fc02dc6 commit 4281c24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AbstractFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static function __callStatic(string $name, array $arguments)
));
}

return (new static($name))->__invoke($arguments[0]);
return (new static($name))($arguments[0]);
}

/**
Expand Down Expand Up @@ -116,6 +116,6 @@ protected function retrieveDependency(
return $container->get($containerKey);
}

return (new $factoryClassName($configKey))->__invoke($container);
return (new $factoryClassName($configKey))($container);
}
}

0 comments on commit 4281c24

Please sign in to comment.