| Total Complexity | 5 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class ParserFactory |
||
| 17 | { |
||
| 18 | |||
| 19 | private static $zipDateFormat = 'Y-m-d H:i'; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param string $format Date format used to parse ZIP file listings |
||
| 23 | */ |
||
| 24 | public static function setZipDateFormat($format) |
||
| 25 | { |
||
| 26 | self::$zipDateFormat = $format; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Maps the corresponding parser to the selected adapter |
||
| 31 | * |
||
| 32 | * @param string $adapterName An adapter name |
||
| 33 | * |
||
| 34 | * @return ParserInterface |
||
| 35 | * |
||
| 36 | * @throws InvalidArgumentException In case no parser were found |
||
| 37 | */ |
||
| 38 | public static function create($adapterName) |
||
| 54 | } |
||
| 55 | } |
||
| 57 |
The
breakstatement is not necessary if it is preceded for example by areturnstatement:If you would like to keep this construct to be consistent with other
casestatements, you can safely mark this issue as a false-positive.