/** * Register a ProcessDetails as free * * @param ProcessDetails $processDetails * @throws \InvalidArgumentException * @return ProcessDetailsCollection */ public function registerFreeProcess(ProcessDetails $processDetails) { $pid = $processDetails->getPid(); if ($this->hasProcess($pid) === FALSE) { throw new \InvalidArgumentException(sprintf('Could not register free process. Process (%d) not in list.', $processDetails->getPid()), 1400761296); } $this->freeProcessIds[$pid] = $pid; return $this; }