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 |
||
9 | class YouTubeConfiguration extends AbstractConfiguration implements Configuration |
||
10 | { |
||
11 | /** |
||
12 | * {@inheritdoc} |
||
13 | */ |
||
14 | View Code Duplication | public function __construct(array $configuration, LoggerInterface $logger = null) |
|
27 | |||
28 | /** |
||
29 | * {@inheritdoc} |
||
30 | */ |
||
31 | public function getCategoryMap() |
||
79 | } |
||
80 |