| 1 | <?php |
||
| 22 | class ContentFactory |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * @const string |
||
| 26 | */ |
||
| 27 | const EXT_TXT = 'txt'; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @const string |
||
| 31 | */ |
||
| 32 | const EXT_JSON = 'json'; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Create a ContentInterface based on the extension and string content |
||
| 36 | * @param string $extension |
||
| 37 | * @param string $content |
||
| 38 | * @return \NeedleProject\FileIo\Content\ContentInterface |
||
| 39 | */ |
||
| 40 | public function create(string $extension, string $content): ContentInterface |
||
| 57 | } |
||
| 58 |
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.