Skip to content

Commit 596140b

Browse files
committed
Speed up case when no Inject annotation is avaiable
1 parent 2a3e4ce commit 596140b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/php/inject/Injector.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ public function args($routine, $named= []) {
137137
if ($param->hasAnnotation('inject')) {
138138
$inject= $param->getAnnotation('inject');
139139
} else if (0 === $i) {
140-
$inject= $routine->hasAnnotation('inject') ? $routine->getAnnotation('inject') : [];
140+
$inject= $routine->hasAnnotation('inject') ? $routine->getAnnotation('inject') : null;
141141
} else {
142-
$inject= [];
142+
$inject= null;
143143
}
144144

145145
if (is_array($inject)) {

0 commit comments

Comments
 (0)