total++; $this->$code++; } /** * Returns the total number of items processed. * * @return int */ public function getTotal() { return $this->total; } /** * Returns an array of results. */ public function getResults() { return [ static::ITEM_CREATED => $this->created, static::ITEM_UPDATED => $this->updated, static::ITEM_DELETED => $this->deleted, static::ITEM_SKIPPED => $this->skipped, static::ITEM_FAILED => $this->failed, ]; } }