Remove a Phone from the collection.

@param PhoneInterface $phone
976274
public function removePhone(PhoneInterface $phone)
    {
        if (!$this->hasPhone($phone)) {
            throw new \InvalidArgumentException('Trying to remove a phone that does not belong to this contact');
        }

        $this->phones->removeElement($phone);

        if ($phone === $this->defaultPhone) {
            if ($this->phones->count() > 0) {
                $this->defaultPhone = $this->phones->first();

                return;
            }

            $this->defaultPhone = null;
        }
    }
38116
public function removeContact(\Sulu\Bundle\ContactBundle\Entity\ContactInterface $contacts)
    {
        $this->contacts->removeElement($contacts);
    }
1011553
public function setPhone($phone) {
        $phone = trim(str_replace('-', '', $phone));

        if (empty($phone))
            throw new Exception('Phone must be set and cannot be empty.');

        $this->phone = $phone;

        return $this;
    }
495099
public function remove(CacheableInterface $item)
    {
        parent::remove($item);
        $this->adapter->remove($item);
    }
292423
public function removeElement(ResourceInterface $resource): ResourceCollectionInterface
    {
        $this->remove($resource->type(), $resource->id());

        return $this;
    }
633377
public function remove(callable $callback)
    {
        foreach (array_keys($this->storage) as $priority) {
            $indexes = array_keys($this->storage[$priority], $callback, true);
            foreach ($indexes as $index) {
                unset($this->storage[$priority][$index]);
                if (empty($this->storage[$priority])) {
                    unset($this->storage[$priority]);
                }
            }
        }
    }
901244
public function onDeleteNode(NodeInterface $node)
    {
        $textNode = $this->textNodeManager->findTextNodeByNode($node);

        if (null !== $textNode) {
            $this->textNodeManager->remove($textNode);
            $this->textManager->remove($textNode->getText());
        }
    }
1101175
public function free(EntityNodeInterface $entity)
	{
		$this->repository->free($entity);
		$this->repository = null;
	}
296300
public function removeMethodCall($method)
    {
        foreach ($this->calls as $i => $call) {
            if ($call[0] === $method) {
                unset($this->calls[$i]);
                break;
            }
        }

        return $this;
    }
1372194
public function remove($record)
    {
        $params['index'] = $this->getName();
        $params['type'] = $record['type'];
        $params['id'] = $record['id'];

        self::getClient()->delete($params);
    }
1239142
public function remove(TypeInterface $typeToRemove)
    {
        foreach ($this->collection as $key => $type) {
            if ($type === $typeToRemove) {
                unset($this->collection[$key]);

                return;
            }
        }

        throw new \RuntimeException(\sprintf('Cannot remove given type %s', \var_export($typeToRemove, true)));
    }
966884
public function delete(BlueprintInterface $blueprint)
    {
        Notification::where($this->getAttributes($blueprint))->update(['is_deleted' => true]);
    }
1135247
public function remove(GroupInterface $group)
    {
        $this->em->remove($group);
        $this->em->flush();
        return true;

    }
382709
public function deleteTicket(TicketInterface $ticket)
    {
        $this->fireEvent(TicketEvents::TICKET_DELETE, $ticket);

        $this->storageManager('remove', $ticket);
        $this->storageManager('flush');
    }
453765
public function removeCall(Call $call)
    {
        $newQueue = new \SplQueue();
        while (!$this->callQueue->isEmpty()) {
            $c = $this->callQueue->dequeue();

            if ($c === $call)
                continue;

            $newQueue->enqueue($c);
        }
        $this->callQueue = $newQueue;

        $registration = $call->getRegistration();
        if ($registration) {
            $registration->removeCall($call);
        }
    }
120259
public function deleteImage(EventInterface $event) {
        $event->getManager()->trigger('db.image.delete');
        $event->getManager()->trigger('storage.image.delete');

        $model = new Model\ArrayModel();
        $model->setData([
            'imageIdentifier' => $event->getRequest()->getImageIdentifier(),
        ]);

        $event->getResponse()->setModel($model);
    }
1226456
protected function clearSession(CustomerInterface $customer)
    {
        $this->session->remove($this->getSessionVarName($customer));
        $this->session->remove($this->getSessionVarName());
    }