| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 10 |
| Ratio | 100 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 26 | View Code Duplication | public function testValidRequestGetsToken() |
|
| 27 | { |
||
| 28 | $grantType = new JwtBearer($this->getClient(), [ |
||
| 29 | 'client_id' => 'testClient', |
||
| 30 | 'private_key' => new SplFileObject(__DIR__ . '/../private.key') |
||
| 31 | ]); |
||
| 32 | $token = $grantType->getToken(); |
||
| 33 | $this->assertNotEmpty($token->getToken()); |
||
| 34 | $this->assertTrue($token->getExpires()->getTimestamp() > time()); |
||
| 35 | } |
||
| 36 | } |
||
| 37 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVarassignment in line 1 and the$higherassignment in line 2 are dead. The first because$myVaris never used and the second because$higheris always overwritten for every possible time line.