costMaximum = $costMaximum; } public function addPopulationItem(ItemInterface $item) : bool { if (isset($this->population[$item->getId()])) { return false; } $this->population[$item->getId()] = $item; return true; } public function setPopulationItem(ItemInterface $item) /* : void */ { $this->population[$item->getId()] = $item; } public function setCostCalculation(\Closure $callback) /* : void */ { } public function setValueCalculation(\Closure $callback) /* : void */ { } public function setTestPopulationBuilder(\Closure $callback) /* : void */ { } public function pack(int $type) { switch ($type) { case AlgorithmType::BRUTEFORCE: return $this->bruteforce(); default: throw new \Exception('Invalid algorithm type'); } } public function bruteforce() { } }