Transformer/UnsetTransformer.php
public function transform($value, array $options = [])
    {
        $resolver = new OptionsResolver();
        $this->configureOptions($resolver);
        $options = $resolver->resolve($options);

        if (!\is_array($value)) {
            throw new \UnexpectedValueException('Given value must be an array');
        }

        if (!array_key_exists($options['property'], $value)) {
            throw new \UnexpectedValueException("Property {$options['property']} does not exists");
        }

        if ($this->checkCondition($value, $options['condition'])) {
            unset($value[$options['property']]);
        }

        return $value;
    }
public function transform($value, array $options = [])
    {
        $resolver = new OptionsResolver();
        $this->configureOptions($resolver);
        $options = $resolver->resolve($options);

        if (!\is_array($value)) {
            throw new \UnexpectedValueException('Given value must be an array');
        }

        if (!array_key_exists($options['property'], $value)) {
            throw new \UnexpectedValueException("Property {$options['property']} does not exists");
        }

        if ($this->checkCondition($value, $options['condition'])) {
            unset($value[$options['property']]);
        }

        return $value;
    }
{@inheritdoc}