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 $tabs = []; |
||
8 | public $tabsHorizontal = true; |
||
9 | |||
10 | private function initTabs() |
||
17 | |||
18 | public function enableVerticalTabs() |
||
24 | |||
25 | public function disableVerticalTabs() |
||
31 | |||
32 | public function enableHorizontalTabs() |
||
38 | |||
39 | public function disableHorizontalTabs() |
||
45 | |||
46 | public function clearTabs() |
||
52 | |||
53 | public function getTabs() |
||
59 | |||
60 | public function addTab($label) |
||
75 | |||
76 | public function removeTab($label) |
||
86 | |||
87 | View Code Duplication | public function getCreateTabs() |
|
98 | |||
99 | View Code Duplication | public function getUpdateTabs() |
|
110 | } |
||
111 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..