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 | View Code Duplication | final class StreamFactoryDiscovery extends ClassDiscovery |
|
16 | { |
||
17 | /** |
||
18 | * Finds a Stream Factory. |
||
19 | * |
||
20 | * @return StreamFactory |
||
21 | * |
||
22 | * @throws Exception\NotFoundException |
||
23 | */ |
||
24 | 2 | public static function find() |
|
34 | } |
||
35 |
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.