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