/** * Returns whether the characteristic is null or equals parent's or not. * * @param \Ekyna\Component\Characteristics\Model\CharacteristicInterface $characteristic * @return bool */ private function isNullOrEqualsParentData(CharacteristicInterface $characteristic) { if ($characteristic->isNull()) { return true; } elseif (null !== $this->parentDatas && null !== ($parentCharacteristic = $this->parentDatas->findCharacteristicByIdentifier($characteristic->getIdentifier()))) { return $parentCharacteristic->equals($characteristic); } return false; }