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 |
||
12 | View Code Duplication | abstract class Package extends BasePackage |
|
13 | { |
||
14 | /** |
||
15 | * Magic method to lazily create API objects |
||
16 | * |
||
17 | * @param string $name Name of property to retrieve |
||
18 | * |
||
19 | * @return Package GitHub API package object. |
||
20 | * |
||
21 | * @since 1.0 |
||
22 | * @throws \InvalidArgumentException |
||
23 | */ |
||
24 | public function __get($name) |
||
40 | } |
||
41 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.