Conditions | 3 |
Paths | 4 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3.0417 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | 13 | public function buildArguments() |
|
21 | { |
||
22 | 13 | $sourceArguments = empty($this->data['arguments']) ? [] : $this->data['arguments']; |
|
|
|||
23 | 13 | foreach ($sourceArguments as $argumentName => $argumentInfo) { |
|
24 | $this->addArgument($argumentName, $argumentInfo['type'], $argumentInfo); |
||
25 | 13 | } |
|
26 | 13 | } |
|
27 | |||
71 | } |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: