Are you sure the assignment to $ret is correct as $session->set('key', 'value') (which targets Anax\Session\CSession::set()) seems to always return null.
This check looks for function or method calls that always return null and whose
return value is assigned to a variable.
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...
60
$ret = $session->has('key');
61
$this->assertTrue($ret, "Session should have this entry.");
62
63
$ret = $session->get('key');
64
$this->assertEquals($ret, 'value', "Session should have a value for this entry.");
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: