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( |
||
47 | |||
48 | private function addValidators() |
||
63 | |||
64 | /** |
||
65 | * @param $response |
||
66 | * @return ResponseResult |
||
67 | */ |
||
68 | public function validate($response): ResponseResult |
||
81 | |||
82 | /** |
||
83 | * @param SamlResponse $response |
||
84 | * @param ResponseResult $responseResult |
||
85 | */ |
||
86 | protected function validateAssertions(SamlResponse $response, ResponseResult $responseResult) |
||
102 | |||
103 | /** |
||
104 | * @param ResponseResult $reponseResult |
||
105 | * @param AssertionResult $assertionResult |
||
106 | */ |
||
107 | private function addErrorsToResult(ResponseResult $reponseResult, AssertionResult $assertionResult) |
||
113 | |||
114 | |||
115 | } |
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.