Skip to content

Commit

Permalink
style(src) fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lucatume committed Feb 28, 2023
1 parent ce7a0fc commit c5363fb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Builders/ClassBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ protected function resolveParameter(Parameter $parameter)
try {
return $parameterImplementation instanceof BuilderInterface ?
$parameterImplementation->build()
: $this->resolver->resolve( $parameterImplementation );
} catch ( NotFoundException $e ) {
: $this->resolver->resolve($parameterImplementation);
} catch (NotFoundException $e) {
return $parameter->getDefaultValueOrFail();
}
}
Expand Down
14 changes: 10 additions & 4 deletions tests/unit/data/namespaced-test-classes.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,16 @@ public function build()
}
}

class DependingOnOneInterfaceWithoutDefault{
public function __construct(One $one){}
class DependingOnOneInterfaceWithoutDefault
{
public function __construct(One $one)
{
}
}

class DependingOnOneInterfaceWithDefault{
public function __construct(One $one = null){}
class DependingOnOneInterfaceWithDefault
{
public function __construct(One $one = null)
{
}
}

0 comments on commit c5363fb

Please sign in to comment.