Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
20 | 4 | public function __construct($variableName, $variableValue, $anotherValue) |
|
21 | { |
||
22 | 4 | if (!is_string($variableName)) { |
|
23 | 1 | throw new InvalidStringException('variableName', $variableName); |
|
24 | 3 | } elseif ($variableValue === $anotherValue) { |
|
25 | 1 | throw new InvalidNotSameValueException('variableValue', $variableValue); |
|
26 | } |
||
27 | |||
28 | 3 | parent::__construct( |
|
29 | 3 | sprintf( |
|
30 | 3 | 'Variable "$%s" must be same as: "%s", actual value: "%s"', |
|
31 | 3 | $variableName, |
|
32 | 3 | print_r($anotherValue, true), |
|
33 | 3 | print_r($variableValue, true) |
|
34 | 3 | ) |
|
35 | 3 | ); |
|
36 | 3 | } |
|
37 | } |
||
38 |