Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
46 | 6 | public function toArray() |
|
47 | { |
||
48 | $options = array( |
||
49 | 6 | 'kind' => $this->getKind(), |
|
50 | 6 | 'id' => $this->getId(), |
|
51 | 6 | ); |
|
52 | |||
53 | // Remove options with empty values |
||
54 | 6 | $cleanedOptions = array(); |
|
55 | 6 | foreach ($options as $name=>$value) { |
|
56 | 6 | if ($value!==null) |
|
57 | 6 | $cleanedOptions[$name] = $value; |
|
58 | 6 | } |
|
59 | |||
60 | 6 | return $cleanedOptions; |
|
61 | } |
||
62 | |||
88 |
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.