protected function getValueChecker()
    {
        return function ($a, $b, ComparatorInterface $comparator) {

            $exceptionMessage = 'Comparator (%s) does not support "%s"';

            $error = null;
            if (!$comparator->supports($a)) {
                $error = sprintf($exceptionMessage, get_class($comparator), gettype($a));
            } elseif (!$comparator->supports($b)) {
                $error = sprintf($exceptionMessage, get_class($comparator), gettype($a));
            }

            if ($error !== null) {
                throw new \RuntimeException($error);
            }
        };
    }
protected function getValueChecker()
    {
        return function ($a, $b, ComparatorInterface $comparator) {

            $exceptionMessage = 'Comparator (%s) does not support "%s"';

            $error = null;
            if (!$comparator->supports($a)) {
                $error = sprintf($exceptionMessage, get_class($comparator), gettype($a));
            } elseif (!$comparator->supports($b)) {
                $error = sprintf($exceptionMessage, get_class($comparator), gettype($a));
            }

            if ($error !== null) {
                throw new \RuntimeException($error);
            }
        };
    }
protected function getValueChecker ( ) { return function ( $ a , $ b , ComparatorInterface $ comparator ) { $ exceptionMessage = 'Comparator (%s) does not support "%s"' ; $ error = null ; if ( ! $ comparator -> supports ( $ a ) ) { $ error = sprintf ( $ exceptionMessage , get_class ( $ comparator ) , gettype ( $ a ) ) ; } elseif ( ! $ comparator -> supports ( $ b ) ) { $ error = sprintf ( $ exceptionMessage , get_class ( $ comparator ) , gettype ( $ a ) ) ; } if ( $ error !== null ) { throw new \ RuntimeException ( $ error ) ; } } ; }
Returns a closure that validates values before passing them to the ComparatorInterface

@return \Closure
Returns a closure that validates values before passing them to the ComparatorInterface