| Conditions | 4 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4.5923 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | 14 | public function __construct($options = array()) |
|
| 30 | { |
||
| 31 | 14 | foreach ($options as $name=>$value) { |
|
| 32 | switch ($name) { |
||
| 33 | 12 | case 'kind': $this->setKind($value); break; |
|
| 34 | 8 | case 'id': $this->setId($value); break; |
|
| 35 | default: |
||
| 36 | throw new \Exception('Unknown option: ' . $name); |
||
| 37 | } |
||
| 38 | 14 | } |
|
| 39 | 14 | } |
|
| 40 | |||
| 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.