Skip to content

Commit

Permalink
Selamat ulang tahun IBU
Browse files Browse the repository at this point in the history
  • Loading branch information
zafex committed Jan 15, 2019
1 parent bd11528 commit 978b915
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,10 @@ protected function resolve(ReflectionFunctionAbstract $function, array $params)
if ($class = $parameter->getClass()) {
if (true === $this->has($class->getName())) {
$parameters[] = $this->get($class->getName());
} else {
} elseif ($class->isInstantiable() === true) {
$parameters[] = $this->factory($class->getName());
} else {
$parameters[] = $parameter->isOptional() ? $parameter->getDefaultValue() : null;
}
} else {
$name = $parameter->getName();
Expand Down

0 comments on commit 978b915

Please sign in to comment.