We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
| 1 | <?php |
||
| 5 | trait Tabs |
||
| 6 | { |
||
| 7 | public $tabsEnabled = false; |
||
| 8 | public $tabsType = 'horizontal'; |
||
| 9 | |||
| 10 | public function enableTabs() |
||
| 17 | |||
| 18 | public function disableTabs() |
||
| 24 | |||
| 25 | public function tabsEnabled() |
||
| 29 | |||
| 30 | public function tabsDisabled() |
||
| 34 | |||
| 35 | public function setTabsType($type) |
||
| 41 | |||
| 42 | public function getTabsType() |
||
| 46 | |||
| 47 | public function enableVerticalTabs() |
||
| 51 | |||
| 52 | public function disableVerticalTabs() |
||
| 56 | |||
| 57 | public function enableHorizontalTabs() |
||
| 61 | |||
| 62 | public function disableHorizontalTabs() |
||
| 66 | |||
| 67 | public function boxHasTabs($boxLabel) |
||
| 71 | |||
| 72 | public function tabExists($boxLabel, $tabLabel) |
||
| 78 | |||
| 79 | public function getLastTab($boxLabel) |
||
| 89 | |||
| 90 | public function isLastTab($boxLabel, $tabLabel) |
||
| 94 | |||
| 95 | public function getTabFields($boxLabel, $tabLabel) |
||
| 117 | |||
| 118 | public function getTabs($boxLabel) |
||
| 135 | } |
||
| 136 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.