hard to describe, given this example?
public function x()
{
try
{
operation();
return true;
}
catch (\Exception $e)
{
return false;
}
can this reach this line???
}
so is there a way that neither return true nor false will run? Somehow. Anyhow.
You should not be able to reach the specified line.
Have you come across a case where this is happening? If so, provide some code and we can tell you why/how it is happening. If not, then your answer is no.
explanation: I was just affraid maybe there is some kind of side effect, or something. Imagine that line:
function a()
{
if (rand(0,1))
{
return true;
}
else
{
return false;
}
*************
}
check the stars. I know its 100% that they wont be reached - still they are there, and theoretically the construction allows that :))
if I rewrite like this:
function a()
{
if (rand(0,1))
{
return true;
}
return false;
}
then its 101% Im sure that it wont run any uncovered block