Given the original value, remove if it's present.

@param mixed $value
@param mixed $valueToRemove
@return mixed
547768
protected function removeAttributeValue($value, $valueToRemove)
    {
        $valueToRemove = is_array($valueToRemove) ? $valueToRemove : [ $valueToRemove ];

        foreach ($valueToRemove as $remove) {
            if (is_array($value) && (($key = array_search($remove, $value)) !== false)) {
                unset($value[$key]);
            } elseif (!is_array($value) && ($value == $remove)) {
                $value = '';
            }
        }

        return $value;
    }
745203
public function SetUseOldGetChallengeMethod( $Value )
		{
			$Previous = $this->UseOldGetChallengeMethod;
			
			$this->UseOldGetChallengeMethod = $Value === true;
			
			return $Previous;
		}
1186716
protected function getRestoredPropertyValue($value)
    {
        return ($value instanceof ModelIdentifier)
            ? (new $value->class)->newQuery()->findOrFail($value->id)
            : $value;
    }
1315494
public function removeOptionByValue($value)
    {
        // walk all options
        $options = $this->options;

        // Empty options;
        $this->options = [];

        foreach ($options as $option) {
            if ($option instanceof Option) {
                if ($option->getValue() != $value) {
                    $this->options[] = $option;
                }
            } else {
                if ($option instanceof Optgroup) {
                    $subOptions = [];
                    $options2 = $option->getOptions();
                    foreach ($options2 as $option2) {
                        if ($option2->getValue() != $value) {
                            $subOptions[] = $option2;
                        }
                    }

                    $option->setOptions($subOptions);

                    if (sizeof($subOptions) > 0) {
                        $this->options[] = $option;
                    }
                }
            }
        }

        return $this;
    }
723946
public function lremove($key, $count, $value)
    {
        try {
            return $this->redis->lremove($key, $count, $value);
        } catch (\RedisException $e) {
            die("Error!: " . $e->getMessage() . "<br/>");
        }
    }
163460
public function removePersonImageVersion($value)
    {
        $targetArray = array();
        foreach ($this->getPersonImageVersions() as $element) {
            if ($element != $value) {
                $targetArray []= $element;
            }
        }
        $this->setPersonImageVersions($targetArray);

        return $this;
    }
134246
protected function transformValueContainer(Value\ValueContainerInterface $value)
    {
        if ($this->isVisited($value)) {
            return $value;
        }
        $this->setVisited($value);

        foreach ($value->keys() as $key) {
            if ($value->get($key) instanceof Value\PlaceholderValue) {
                $value->set($key, $value->get($key)->accept($this));
            }
            $value->set($key, $value->get($key)->accept($this));
        }

        return $value;
    }
878747
public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue)
    {
        $storageFieldValue->dataInt = !empty($value->data['destinationContentId'])
            ? $value->data['destinationContentId']
            : null;
        $storageFieldValue->dataText = !empty($value->data['alternativeText'])
            ? $value->data['alternativeText']
            : null;
        $storageFieldValue->sortKeyInt = (int)$value->sortKey;
    }
56845
public function reverseTransform($value)
    {  
        if (empty($value)){
            return new ArrayCollection();
        }
        
        if ($this->collection instanceof PersistentCollection){
            foreach ($this->collection as $item){
                $this->om->remove($item);
            }  
            
            $this->collection->clear();
        }

        $data =  explode(',', $value);
        $referenceClass = $this->referenceClass;
        $setInversedProperty = sprintf('set%s', ucfirst($this->inversedProperty));
        
        foreach ($data as $idx => $id){
            $inversedObject = $this->om->getReference($this->inversedClass, (int) $id);
            $referenceObject = new $referenceClass();
            $referenceObject->{$setInversedProperty}($inversedObject);
            $referenceObject->setPosition($idx);
            $this->collection->add($referenceObject);  
        }
        
        return $this->collection;
    }
208566
public function reverseTransform($value)
    {       
        if (null === $value || '' === $value) {
            return null;
        }

        return $this->om->getReference($this->class, $value);
    }
1178404
public function remove($value) {
		
		if($this->_ReadOnly){
			throw new ReadOnlyException(\get_called_class() . ' is read only');
		}
		
		if(($key = \array_search($value, $this->_Arr)) !== false){
			\array_splice($this->_Arr, $key, 1);
		}
		
		return $this;
		
	}
341769
public function remove($fileToRemove)
    {
        if (is_array($fileToRemove)) {
            $self = $this;
            $this->repository->each(function ($file) use ($fileToRemove, $self) {
                if (starts_with($file, $fileToRemove)) {
                    $self->getRepository()->removeFile($file);
                }
            });
        } else {
            $this->repository->removeFile($fileToRemove);
        }

        return $this;
    }
581048
function remove($value)
    {
        $key = $this->search($value);
        if ($key)
        {
            unset($this->array[$key]);
        }

        return $this;
    }
801154
public function removeValue(ValueInterface $value)
    {
        $this->values->removeElement($value);
        $value->setData(null);

        $this->removeValueByAttribute($value);

        return $this;
    }
1067884
public function move($value)
    {
        // No need to update if $value is already current one
        if ($value === $this->current()) {
            return;
        }

        $index = $this->search($value);

        if (false === $index) {
            throw new \InvalidArgumentException(sprintf('"%s" value not found in JobGraph', $value));
        }

        return $this->seek($index);
    }
1259304
public function delete($values /*, $value2, ... */)
    {
        $mapping = $this->getMapping();

        if ($mapping === null || $mapping->type !== Type::SET) {
            throw ODMException::queryPathIsNotSet(__METHOD__);
        }

        $values = $this->getExpr()->value(func_get_args());
        $values->setMapping($mapping);

        return $this->getExpr()->addUpdate(new Delete($this, $values));
    }
791224
protected function cleanValue($key, $value)
    {
        if (is_array($value)) {
            return $this->cleanArray($value);
        }

        return $this->transform($key, $value);
    }