Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
44 | 6 | public function toArray() |
|
45 | { |
||
46 | $options = array( |
||
47 | 6 | 'kind' => $this->getKind(), |
|
48 | 6 | 'id' => $this->getId(), |
|
49 | ); |
||
50 | |||
51 | // Remove options with empty values |
||
52 | 6 | $cleanedOptions = array(); |
|
53 | 6 | foreach ($options as $name=>$value) { |
|
54 | 6 | if ($value!==null) |
|
55 | 6 | $cleanedOptions[$name] = $value; |
|
56 | } |
||
57 | |||
58 | 6 | return $cleanedOptions; |
|
59 | } |
||
60 | |||
86 |
According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.