| Conditions | 5 |
| Paths | 5 |
| Total Lines | 16 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | public function getFixerByIssue(AbstractIssue $issue): ?FixerInterface |
||
| 25 | { |
||
| 26 | switch (get_class($issue)) { |
||
| 27 | case OperatorWhitespaceIssue::class: |
||
| 28 | return new OperatorWhitespaceFixer(); |
||
| 29 | break; |
||
|
|
|||
| 30 | case IndentationIssue::class: |
||
| 31 | return new IndentationFixer(); |
||
| 32 | break; |
||
| 33 | case EmptySectionIssue::class: |
||
| 34 | return new EmptySectionFixer(); |
||
| 35 | break; |
||
| 36 | case NestingConsistencyIssue::class: |
||
| 37 | return new NestingConsistencyFixer(); |
||
| 38 | } |
||
| 39 | throw new FixerNotFoundException('Fixer for issue ' . get_class($issue) . ' not found'); |
||
| 40 | } |
||
| 42 |
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.