1 | <?php |
||
14 | class Response |
||
15 | { |
||
16 | /** |
||
17 | * @var AbstractProvider |
||
18 | */ |
||
19 | private $identityProvider; |
||
20 | |||
21 | /** |
||
22 | * @var AbstractProvider |
||
23 | */ |
||
24 | private $serviceProvider; |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | private $validators = []; |
||
30 | |||
31 | /** |
||
32 | * Response constructor. |
||
33 | * @param AbstractProvider $identityProvider |
||
34 | * @param AbstractProvider $serviceProvider |
||
35 | */ |
||
36 | public function __construct( |
||
46 | |||
47 | private function addValidators() |
||
62 | |||
63 | /** |
||
64 | * @param $response |
||
65 | * @return ResponseResult |
||
66 | */ |
||
67 | public function validate($response): ResponseResult |
||
79 | |||
80 | /** |
||
81 | * @param SamlResponse $response |
||
82 | * @param ResponseResult $responseResult |
||
83 | */ |
||
84 | protected function validateAssertions(SamlResponse $response, ResponseResult $responseResult) |
||
99 | |||
100 | /** |
||
101 | * @param ResponseResult $responseResult |
||
102 | * @param AssertionResult $assertionResult |
||
103 | */ |
||
104 | private function addErrorsToResult(ResponseResult $responseResult, AssertionResult $assertionResult) |
||
110 | } |
||
111 |
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.