Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
38 | public function resolve(Readable $readable, TokenInterface $token): void |
||
39 | { |
||
40 | if (! \in_array($token->value(1), self::ALLOWED_PRAGMAS, true)) { |
||
41 | $error = \vsprintf('Unknown configuration pragma rule "%s" with value "%s"', [ |
||
42 | $token->value(1), |
||
43 | $token->value(2) |
||
44 | ]); |
||
45 | |||
46 | throw (new UnknownPragmaException($error))->throwsIn($readable, $token->offset()); |
||
47 | } |
||
48 | |||
49 | $this->configs[$token->value(1)] = $token->value(2); |
||
50 | } |
||
51 | } |
||
52 |