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 |
||
6 | trait SaveActions |
||
7 | { |
||
8 | /** |
||
9 | * Get the save configured save action or the one stored in a session variable. |
||
10 | * @return [type] [description] |
||
|
|||
11 | */ |
||
12 | public function getSaveAction() |
||
42 | |||
43 | /** |
||
44 | * Change the session variable that remembers what to do after the "Save" action. |
||
45 | * @param [type] $forceSaveAction [description] |
||
46 | */ |
||
47 | public function setSaveAction($forceSaveAction = null) |
||
61 | |||
62 | /** |
||
63 | * Redirect to the correct URL, depending on which save action has been selected. |
||
64 | * @param [type] $itemId [description] |
||
65 | * @return [type] [description] |
||
66 | */ |
||
67 | public function performSaveAction($itemId = null) |
||
90 | |||
91 | /** |
||
92 | * Get the translated text for the Save button. |
||
93 | * @param string $actionValue [description] |
||
94 | * @return [type] [description] |
||
95 | */ |
||
96 | private function getSaveActionButtonName($actionValue = 'save_and_black') |
||
111 | } |
||
112 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.