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  | 
            ||
| 19 | View Code Duplication | class xsDateTime extends xsAnySimpleType  | 
            |
| 20 | { | 
            ||
| 21 | use MinMaxTrait;  | 
            ||
| 22 | |||
| 23 | /**  | 
            ||
| 24 | * Construct.  | 
            ||
| 25 | *  | 
            ||
| 26 | * @param string $value  | 
            ||
| 27 | */  | 
            ||
| 28 | public function __construct($value)  | 
            ||
| 33 | |||
| 34 | public function fixValue()  | 
            ||
| 40 | |||
| 41 | protected function isOK()  | 
            ||
| 45 | }  | 
            ||
| 46 |