private function getValueTypeCheckCallback($valueTypes)
    {
        $callback = function ($value) {
            return false;
        };

        // the callback code will return true as soon as an accepted value type is found
        if ($valueTypes & Specifications::TYPE_INTEGER) {
            $callback = function ($value) use ($callback) {
                return is_numeric($value) || $callback($value);
            };
        }
        if ($valueTypes & Specifications::TYPE_STRING) {
            $callback = function ($value) use ($callback) {
                return is_string($value) || $callback($value);
            };
        }
        if ($valueTypes & Specifications::TYPE_BOOLEAN) {
            $callback = function ($value) use ($callback) {
                return is_bool($value) || $callback($value);
            };
        }

        return $callback;
    }
private function getValueTypeCheckCallback($valueTypes)
    {
        $callback = function ($value) {
            return false;
        };

        // the callback code will return true as soon as an accepted value type is found
        if ($valueTypes & Specifications::TYPE_INTEGER) {
            $callback = function ($value) use ($callback) {
                return is_numeric($value) || $callback($value);
            };
        }
        if ($valueTypes & Specifications::TYPE_STRING) {
            $callback = function ($value) use ($callback) {
                return is_string($value) || $callback($value);
            };
        }
        if ($valueTypes & Specifications::TYPE_BOOLEAN) {
            $callback = function ($value) use ($callback) {
                return is_bool($value) || $callback($value);
            };
        }

        return $callback;
    }
private function getValueTypeCheckCallback ( $ valueTypes ) { $ callback = function ( $ value ) { return false ; } ; // the callback code will return true as soon as an accepted value type is found if ( $ valueTypes & Specifications :: TYPE_INTEGER ) { $ callback = function ( $ value ) use ( $ callback ) { return is_numeric ( $ value ) || $ callback ( $ value ) ; } ; } if ( $ valueTypes & Specifications :: TYPE_STRING ) { $ callback = function ( $ value ) use ( $ callback ) { return is_string ( $ value ) || $ callback ( $ value ) ; } ; } if ( $ valueTypes & Specifications :: TYPE_BOOLEAN ) { $ callback = function ( $ value ) use ( $ callback ) { return is_bool ( $ value ) || $ callback ( $ value ) ; } ; } return $ callback ; }
Returns a callback that checks the values types depending on the operator specifications.

@param int $valueTypes The accepted values, as a bit field of Specifications::TYPE_* constants

@return \Closure
Returns a callback that checks the values types depending on the operator specifications .