Conditions | 4 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | private function getTestCheckMission() { |
||
25 | $dbc = App::getDb(); |
||
26 | |||
27 | $query = $dbc->select("last_check_mission")->from("_bataille_base")->where("ID_base", "=", Bataille::getIdBase())->get(); |
||
28 | |||
29 | if (is_array($query) && (count($query) == 1)) { |
||
30 | foreach ($query as $obj) { |
||
31 | $last_check_mission = $obj->last_check_mission; |
||
32 | } |
||
33 | |||
34 | $today = new \DateTime(); |
||
35 | |||
36 | } |
||
37 | } |
||
38 | //-------------------------- END GETTER ----------------------------------------------------------------------------// |
||
45 | } |
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.