inProgressProcess; } /** * @return array */ public function getCompleted() { return $this->completedProcess; } /** * @return array */ public function getErrorProcess() { return $this->errorProcess; } /** * @return array */ public function getAllProcess() { return $this->allProcess; } /** * @param $code * @return $this */ public function startProcess($code) { $this->inProgressProcess[$code] = $code; $this->allProcess[] = $code; return $this; } /** * @param $code * @return $this */ public function stopProcess($code) { unset($this->inProgressProcess[$code]); $this->completedProcess[$code] = $code; return $this; } /** * @param $code * @param $error * @return $this */ public function stopProcessWithError($code, $error) { unset($this->inProgressProcess[$code]); $this->error[$code] = ['code' => $code, 'error' => $error]; return $this; } /** * @return array */ public function info() { return [ 'process' => $this->getAllProcess(), 'inProgress' => $this->getInProgress(), 'finished' => $this->getCompleted(), 'error' => $this->getErrorProcess(), ]; } }