We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Total Complexity | 9 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | class Audit extends Auditing |
||
| 29 | { |
||
| 30 | public function afterActionVerb() |
||
| 31 | { |
||
| 32 | switch ($this->event) { |
||
| 33 | case 'created': return 'created the'; break; |
||
|
|
|||
| 34 | case 'deleted': return 'deleted the'; break; |
||
| 35 | case 'updated': return 'updated the'; break; |
||
| 36 | } |
||
| 37 | |||
| 38 | return false; |
||
| 39 | } |
||
| 40 | |||
| 41 | public function beforeActionVerb() |
||
| 42 | { |
||
| 43 | switch ($this->event) { |
||
| 44 | case 'created': return 'was generated'; break; |
||
| 45 | case 'deleted': return 'was destroyed'; break; |
||
| 46 | case 'updated': return 'was modified'; break; |
||
| 47 | } |
||
| 48 | |||
| 49 | return false; |
||
| 50 | } |
||
| 51 | |||
| 52 | public function model() |
||
| 55 | } |
||
| 56 | } |
||
| 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.