| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | 6 | public function __construct($token, ValidatorInterface $validator) |
|
| 45 | { |
||
| 46 | 6 | if (!$validator->check($token)) { |
|
| 47 | 1 | throw new \Exception('Not valid token value'); |
|
| 48 | } |
||
| 49 | |||
| 50 | 5 | if (is_string($token)) { |
|
| 51 | 4 | $this->content = $token; |
|
| 52 | |||
| 53 | 4 | return; |
|
| 54 | } |
||
| 55 | |||
| 56 | 1 | $this->identifier = $token[0]; |
|
| 57 | 1 | $this->content = $token[1]; |
|
| 58 | 1 | $this->line = $token[2]; |
|
| 59 | } |
||
| 109 |