| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 3 |
| Changes | 2 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 17 | 4 | public function __construct($variableName, $variableValue) |
|
| 18 | { |
||
| 19 | 4 | if (!is_string($variableName)) { |
|
| 20 | 1 | throw new InvalidStringException('variableName', $variableName); |
|
| 21 | 3 | } elseif (!is_string($variableValue)) { |
|
| 22 | 1 | throw new InvalidStringException('variableValue', $variableValue); |
|
| 23 | } |
||
| 24 | |||
| 25 | 3 | parent::__construct( |
|
| 26 | 3 | sprintf( |
|
| 27 | 3 | 'Variable "$%s" must be "digit", actual value: "%s"', |
|
| 28 | 3 | $variableName, |
|
| 29 | $variableValue |
||
| 30 | 3 | ) |
|
| 31 | 3 | ); |
|
| 32 | } |
||
| 33 | } |