| Conditions | 4 |
| Paths | 4 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | public static function create($adapterName) |
||
| 39 | { |
||
| 40 | switch ($adapterName) { |
||
| 41 | case 'gnu-tar': |
||
| 42 | return new GNUTarOutputParser(); |
||
| 43 | break; |
||
|
|
|||
| 44 | case 'bsd-tar': |
||
| 45 | return new BSDTarOutputParser(); |
||
| 46 | break; |
||
| 47 | case 'zip': |
||
| 48 | return new ZipOutputParser(self::$zipDateFormat); |
||
| 49 | break; |
||
| 50 | |||
| 51 | default: |
||
| 52 | throw new InvalidArgumentException(sprintf('No parser available for %s adapter', $adapterName)); |
||
| 53 | break; |
||
| 54 | } |
||
| 55 | } |
||
| 56 | } |
||
| 57 |
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.