| Conditions | 6 |
| Paths | 4 |
| Total Lines | 19 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 15 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 19 | 6 | public function __construct($variableName, $variableValue, $number) |
|
| 20 | { |
||
| 21 | 6 | if (!is_string($variableName)) { |
|
| 22 | 1 | throw new InvalidStringException('variableName', $variableName); |
|
| 23 | 5 | } elseif (!is_int($variableValue) && !is_float($variableValue)) { |
|
| 24 | 1 | throw new InvalidIntOrFloatException('variableValue', $variableValue); |
|
| 25 | 5 | } elseif (!is_int($number) && !is_float($number)) { |
|
| 26 | 1 | throw new InvalidIntOrFloatException('number', $number); |
|
| 27 | } |
||
| 28 | |||
| 29 | 5 | parent::__construct( |
|
| 30 | 5 | sprintf( |
|
| 31 | 5 | 'Variable "$%s" must be greater than "%s", actual value: "%s"', |
|
| 32 | 5 | $variableName, |
|
| 33 | 5 | (string) $number, |
|
| 34 | (string) $variableValue |
||
| 35 | 5 | ) |
|
| 36 | 5 | ); |
|
| 37 | } |
||
| 38 | } |