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