| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 56 | public function getToken(array $claims = []) |
||
| 57 | { |
||
| 58 | $issuer = (string) $this->request->getUri(); |
||
| 59 | $issued_at = $this->config->getTimestamp(); |
||
| 60 | $expiration = $issued_at + $this->config->getTtl(); |
||
| 61 | $key = $this->config->getPrivateKey(); |
||
| 62 | foreach ($claims as $name => $value) { |
||
| 63 | $this->builder->set($name, $value); |
||
| 64 | } |
||
| 65 | $token = $this->builder |
||
| 66 | ->setIssuer($issuer) |
||
| 67 | ->setIssuedAt($issued_at) |
||
| 68 | ->setExpiration($expiration) |
||
| 69 | ->sign($this->signer, $key) |
||
| 70 | ->getToken(); |
||
| 71 | return (string) $token; |
||
| 72 | } |
||
| 73 | } |
||
| 74 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.