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 |
||
| 15 | class CloseCartBtn extends \Ui\DataManager\Action |
||
| 16 | { |
||
| 17 | public static $name = 'Завершить'; |
||
| 18 | public static $groupAction = true; |
||
| 19 | public static $rowAction = true; |
||
| 20 | |||
| 21 | View Code Duplication | public static function rowButton($dataManager, $item, $params) |
|
| 40 | |||
| 41 | public static function groupAction($dataManager, $ids, $actionParams) |
||
| 54 | |||
| 55 | } |
||
| 56 |