| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 34 | public static function create($type, IO $io) |
||
| 35 | { |
||
| 36 | switch ($type) { |
||
| 37 | case Monitor::RENDERER_TYPE_TABLE: |
||
| 38 | return new TableRenderer($io); |
||
| 39 | break; |
||
|
|
|||
| 40 | case Monitor::RENDERER_TYPE_CSV: |
||
| 41 | return new CsvRenderer($io); |
||
| 42 | break; |
||
| 43 | default: |
||
| 44 | return new ListRenderer($io); |
||
| 45 | break; |
||
| 46 | } |
||
| 47 | } |
||
| 48 | } |
||
| 49 |
The break statement is not necessary if it is preceded for example by a return statement:
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.