| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 56 | 33 | public function getCredentialsInCache() |
|
| 57 | { |
||
| 58 | 33 | if (isset(self::$credentialsCache[$this->key()])) { |
|
| 59 | 13 | $result = self::$credentialsCache[$this->key()]; |
|
| 60 | 13 | if (\strtotime($result['Expiration']) - \time() >= $this->expirationSlot) { |
|
| 61 | 6 | return $result; |
|
| 62 | } |
||
| 63 | 7 | unset(self::$credentialsCache[$this->key()]); |
|
| 64 | 7 | } |
|
| 65 | |||
| 66 | 27 | return null; |
|
| 67 | } |
||
| 89 |