/** * Returns the number of increments associated with the last processed item * * @return int */ public function getIncrementBy() { return $this->tick->getIncrementBy(); }
/** * Indicate progress to the tracker * * Builds a report and send it to the tick method in the output handlers * * @param int $status SUCCESS (default), SKIP, or FAIL * @param string $msg Message to include for this report * @param array $extraInfo * @param int $incrementBy * @return Report */ public function tick($status = Tick::SUCCESS, $msg = null, array $extraInfo = [], $incrementBy = 1) { if (!$this->isRunning()) { $this->start(); } $tick = new Tick($this, $status, $msg, $extraInfo, $incrementBy); // Increment the counter if (array_key_exists($tick->getStatus(), $this->numProcessedItems)) { $this->numProcessedItems[$tick->getStatus()] += $tick->getIncrementBy(); } else { $this->numProcessedItems[$tick->getStatus()] = $tick->getIncrementBy(); } $this->dispatcher->dispatch(Events::TRACKER_TICK, $tick); $this->lastTick = $tick; return $tick->getReport(); }