The expression $bindingType of type null|string is loosely compared to true; this is ambiguous if the string can be empty. You might want to explicitly use !== null instead.
In PHP, under loose comparison (like ==, or !=, or switch conditions),
values of different types might be equal.
For string values, the empty string '' is a special case, in particular
the following results might be unexpected:
''==false// true''==null// true'ab'==false// false'ab'==null// false// It is often better to use strict comparison''===false// false''===null// false
Loading history...
33
$binding = $this->instantiate($bindingType);
34
$result = $binding->receive($bindingRequest);
35
}
36
return $result;
37
}
38
39
40
/**
41
* @param Request $request
42
* @return \AerialShip\LightSaml\Binding\Request
43
*/
44
public function getBindingRequest(Request $request)
45
{
46
$result = new \AerialShip\LightSaml\Binding\Request();
47
// must be taken unmodified from server since getQueryString() capitalized urlenocoded escape chars, ie. %2f becomes %2F
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: