Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
29 | 4 | public function valuesAreEqual( $firstValue, $secondValue ): bool { |
|
30 | 4 | $valuesAreEqual = call_user_func_array( $this->callback, [ $firstValue, $secondValue ] ); |
|
31 | |||
32 | 4 | if ( !is_bool( $valuesAreEqual ) ) { |
|
33 | 1 | throw new \RuntimeException( 'ValueComparer callback needs to return a boolean' ); |
|
34 | } |
||
35 | |||
36 | 3 | return $valuesAreEqual; |
|
37 | } |
||
38 | |||
40 |