1 | <?php |
||
11 | class ExecutionProcessFactory |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | private $consolePath; |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | private $environment; |
||
22 | |||
23 | /** |
||
24 | * @param string $consolePath |
||
25 | * @param string $environment |
||
26 | */ |
||
27 | 13 | public function __construct($consolePath, $environment) |
|
32 | |||
33 | /** |
||
34 | * Create process for given execution-uuid. |
||
35 | * |
||
36 | * @param string $uuid |
||
37 | * |
||
38 | * @return Process |
||
39 | */ |
||
40 | 2 | public function create($uuid) |
|
46 | } |
||
47 |
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.