Skip to content

Commit

Permalink
Prevented the loop from continuing and throwing an error when an obje…
Browse files Browse the repository at this point in the history
…ct is requested as a parameter.
  • Loading branch information
muhammetsafak committed Jun 28, 2022
1 parent 2fb985e commit caa47c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Muhammet ŞAFAK <[email protected]>
* @copyright Copyright © 2022 InitPHP Container
* @license http://initphp.github.io/license.txt MIT
* @version 0.2
* @version 0.3
* @link https://www.muhammetsafak.com.tr
*/

Expand Down Expand Up @@ -91,6 +91,7 @@ private function getDependencies(array $arguments, \ReflectionClass $reflection)
if (($type = $argument->getType()) !== null) {
if(!$type->isBuiltin()){
$dependencies[] = $this->get($type->getName());
continue;
}
}
}
Expand Down

0 comments on commit caa47c4

Please sign in to comment.