| 1 | <?php |
||
| 16 | class PlatformFactory { |
||
| 17 | /** |
||
| 18 | * Filesystem. |
||
| 19 | * |
||
| 20 | * @var Filesystem |
||
| 21 | */ |
||
| 22 | protected $filesystem; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Initialiser. |
||
| 26 | * |
||
| 27 | * @param Filesystem $filesystem |
||
| 28 | */ |
||
| 29 | public function __construct(Filesystem $filesystem) { |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Get the platform with the specified name. |
||
| 35 | * |
||
| 36 | * @param string $platformName The name of the platform (retrieved from |
||
| 37 | * PHP_OS). |
||
| 38 | * |
||
| 39 | * @return Platform |
||
| 40 | * |
||
| 41 | * @throws PlatformException |
||
| 42 | */ |
||
| 43 | public function getPlatform($platformName) { |
||
| 62 | } |
||
| 63 |
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.