1 | <?php |
||
23 | abstract class AbstractReadModel implements ReadModelInterface |
||
24 | { |
||
25 | use SerializerTrait, DeserializerTrait, MessageMapperTrait { |
||
26 | SerializerTrait::serialize as serializeData; |
||
27 | DeserializerTrait::deserialize as deserializeData; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * @return array |
||
32 | */ |
||
33 | public static function mappings() |
||
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | */ |
||
41 | public static function deserialize(array $attributes) |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function serialize() |
||
63 | |||
64 | /** |
||
65 | * Mapping data base on mapping keys. |
||
66 | * |
||
67 | * @param array $attributes |
||
68 | * @param array $mappingKeys |
||
69 | * |
||
70 | * @return array |
||
71 | */ |
||
72 | protected static function mapBaseOnKeys(array $attributes, array $mappingKeys) |
||
76 | } |
||
77 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.