1 | <?php |
||
14 | class MethodRSASHA1 extends AbstractSignatureMethod |
||
15 | { |
||
16 | /** |
||
17 | * @var string Path to the private key used for signing |
||
18 | */ |
||
19 | private $privateKey; |
||
20 | |||
21 | /** |
||
22 | * MethodRSASHA1 constructor. |
||
23 | * |
||
24 | * @param string $privateKey The path to the private key used for signing |
||
25 | */ |
||
26 | 6 | public function __construct($privateKey) |
|
38 | |||
39 | /** |
||
40 | * @return string |
||
41 | */ |
||
42 | 1 | public function getName() |
|
46 | |||
47 | /** |
||
48 | * @param Request $request |
||
49 | * @param Consumer $consumer |
||
50 | * @param Token $token |
||
51 | * @return string |
||
52 | */ |
||
53 | 1 | public function buildSignature(Request $request, Consumer $consumer, Token $token) |
|
69 | } |
||
70 |
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.