1 | <?php |
||
27 | class Collection implements IParameter { |
||
28 | /** @var IL10N */ |
||
29 | protected $l; |
||
30 | |||
31 | /** @var Parameter[] */ |
||
32 | protected $parameters; |
||
33 | |||
34 | /** @var string */ |
||
35 | protected $random; |
||
36 | |||
37 | /** |
||
38 | * @param IL10N $l |
||
39 | * @param string $random |
||
40 | */ |
||
41 | 7 | public function __construct(IL10N $l, $random) { |
|
46 | |||
47 | /** |
||
48 | * @param IParameter $parameter |
||
49 | */ |
||
50 | 1 | public function addParameter(IParameter $parameter) { |
|
58 | |||
59 | /** |
||
60 | * @return mixed |
||
61 | */ |
||
62 | 3 | public function getParameter() { |
|
65 | |||
66 | /** |
||
67 | * @return array With two entries: value and type |
||
68 | */ |
||
69 | 2 | public function getParameterInfo() { |
|
80 | |||
81 | /** |
||
82 | * @return string The formatted parameter |
||
83 | */ |
||
84 | 1 | public function format() { |
|
93 | } |
||
94 |
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.