1 | <?php |
||
23 | final class OAuth2MessageMiddleware implements MiddlewareInterface |
||
24 | { |
||
25 | /** |
||
26 | * @var OAuth2MessageFactoryManager |
||
27 | */ |
||
28 | private $auth2messageFactoryManager; |
||
29 | |||
30 | /** |
||
31 | * OAuth2ResponseMiddleware constructor. |
||
32 | * |
||
33 | * @param OAuth2MessageFactoryManager $auth2messageFactoryManager |
||
34 | */ |
||
35 | public function __construct(OAuth2MessageFactoryManager $auth2messageFactoryManager) |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
||
51 | } |
||
52 |
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.