@@ -257,7 +257,8 @@ discard block |
||
257 | 257 | list($class, $param, $sub) = $pi; |
258 | 258 | |
259 | 259 | // First, loop through $args and see if each value can match the current parameter based on type hint |
260 | - if (!empty($args)) { // This if statement actually gives a ~10% speed increase when $args isn't set |
|
260 | + if (!empty($args)) { |
|
261 | +// This if statement actually gives a ~10% speed increase when $args isn't set |
|
261 | 262 | foreach ($args as $i => $arg) { |
262 | 263 | if ($class !== null |
263 | 264 | && ($arg instanceof $class || ($arg === null && $param->allowsNull())) |
@@ -275,8 +276,7 @@ discard block |
||
275 | 276 | $parameters[] = ($sub) |
276 | 277 | ? $this->expand($rule['substitutions'][$class], $share, true) |
277 | 278 | : $this->create($class, [], $share); |
278 | - } |
|
279 | - catch (\InvalidArgumentException $e) { |
|
279 | + } catch (\InvalidArgumentException $e) { |
|
280 | 280 | |
281 | 281 | } |
282 | 282 | continue; |
@@ -16,7 +16,7 @@ |
||
16 | 16 | class Dice |
17 | 17 | { |
18 | 18 | const CONSTANT = 'Dice::CONSTANT'; |
19 | - const INSTANCE = 'Dice::INSTANCE'; |
|
19 | + const INSTANCE = 'Dice::INSTANCE'; |
|
20 | 20 | |
21 | 21 | /** |
22 | 22 | * @var array $rules Rules which have been set using addRule() |