From e7f8d99ac2614d0b62cef035cd3a8245a0d3cf1d Mon Sep 17 00:00:00 2001 From: "Igor Barkov [iwork]" Date: Mon, 14 Jan 2019 16:40:12 +0200 Subject: [PATCH] make class greater --- classes/InventoryItem.php | 4 ---- classes/Item.php | 1 + classes/ShopItem.php | 9 --------- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/classes/InventoryItem.php b/classes/InventoryItem.php index 0bf483f..686f208 100644 --- a/classes/InventoryItem.php +++ b/classes/InventoryItem.php @@ -3,15 +3,11 @@ class InventoryItem extends Item { private $present; - private $artefact; - private $item_id; public function __construct($row) { parent::__construct($row); $this->present = $row['present']; - $this->artefact = $row['artefact']; - $this->item_id = $row['id']; if ($this->artefact) $this->name = <<{$this->name} diff --git a/classes/Item.php b/classes/Item.php index 1db916f..bb8551f 100644 --- a/classes/Item.php +++ b/classes/Item.php @@ -13,6 +13,7 @@ abstract class Item public $razdel; public $cost; public $ecost; + public $artefact; public $type; # эти. что есть что нет... diff --git a/classes/ShopItem.php b/classes/ShopItem.php index 95ee1cf..47a8d94 100644 --- a/classes/ShopItem.php +++ b/classes/ShopItem.php @@ -2,15 +2,6 @@ class ShopItem extends Item { - private $cost; - private $count; - - public function __construct($row) - { - parent::__construct($row); - $this->cost = $row['cost']; - $this->count = $row['count']; - } public function printInfo() {