Conditions | 4 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4.432 |
Changes | 0 |
1 | <?php |
||
49 | 5 | public function resolve(Container $container, $_ = null) { |
|
|
|||
50 | 5 | if (empty($this->name)) { |
|
51 | 1 | return null; |
|
52 | } elseif (is_string($this->name)) { |
||
53 | return $container->get($this->name); |
||
54 | } else { |
||
55 | 3 | $result = $container; |
|
56 | 3 | foreach ($this->name as $name) { |
|
57 | $result = $result->get($name); |
||
58 | } |
||
59 | 3 | return $result; |
|
60 | } |
||
61 | 5 | } |
|
62 | } |
||
63 |
This check marks parameter names that have not been written in camelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes
databaseConnectionString
.