/** * @param array $results */ protected function finish($results) { $warehouse = $this->_warehouses[$results['warehouseNum'] - 1]; $product = $this->_products[$results['productNum'] - 1]; $warehouse->addProduct($product); Warehouses::getInstance()->save($warehouse); echo "Product added to warehouse stock successfully.\n"; }
/** * @param array $results */ protected function finish($results) { $warehouse = new Warehouse($results); Warehouses::getInstance()->save($warehouse); echo "Warehouse added successfully.\n"; }