/** * @inheritdoc */ public function contains($object) { if (!is_object($object)) { throw new \InvalidArgumentException(gettype($object)); } return ($this->uow->isScheduledForInsert($object) || $this->uow->isInIdentityMap($object)) && !$this->uow->isScheduledForDelete($object); }