Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
25 | 48 | public static function dueToMalformedVariableSpecification(string $varSpec, string $expression): self |
|
26 | { |
||
27 | 48 | $message = 'The variable specification "'.$varSpec.'" included in the expression "{'.$expression.'}" is invalid.'; |
|
28 | 48 | if ('' === $varSpec) { |
|
29 | 2 | $message = 'No variable specification was included in the expression "{'.$expression.'}".'; |
|
30 | } |
||
31 | |||
32 | 48 | return new self($message); |
|
33 | } |
||
50 |