protected function getNegationWhenConfigured($value, $configuration)
    {
        if (!is_array($configuration) || empty($configuration['negate']) || (bool)$configuration['negate'] === false) {
            return $value;
        }

        return !((bool)$value);
    }
protected function getNegationWhenConfigured($value, $configuration)
    {
        if (!is_array($configuration) || empty($configuration['negate']) || (bool)$configuration['negate'] === false) {
            return $value;
        }

        return !((bool)$value);
    }
protected function getNegationWhenConfigured ( $ value , $ configuration ) { if ( ! is_array ( $ configuration ) || empty ( $ configuration [ 'negate' ] ) || ( bool ) $ configuration [ 'negate' ] === false ) { return $ value ; } return ! ( ( bool ) $ value ) ; }
Negates the result when configured.

@param boolean $value
@param array $configuration
@return boolean
Negates the result when configured .