function addItem($item) { parent::addItem($item); $exists = array(); $verificationsCount = count($this->verifications); foreach ($this->verifications as &$verification) { foreach ($verification['reason'] as $reason) { if ($reason == 'exists') { $exists[] = true; } } } if (count($exists) == $verificationsCount) { return true; } //If they were not added, but the reason is that they already exist, we show that they were sent successfully return $this->itemsAdded; }