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.
Loading history...
14
switch($level)
15
{
16
case \Psr\Log\LogLevel::EMERGENCY:
17
case \Psr\Log\LogLevel::ALERT:
18
case \Psr\Log\LogLevel::CRITICAL:
19
case \Psr\Log\LogLevel::ERROR:
20
case \Psr\Log\LogLevel::WARNING:
21
case \Psr\Log\LogLevel::NOTICE:
22
case \Psr\Log\LogLevel::INFO:
23
case \Psr\Log\LogLevel::DEBUG:
24
break;
25
default:
26
throw new \Psr\Log\InvalidArgumentException('log function only accepts valid levels. Level was: '.$level);
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.