diff --git a/Admin/Installer.php b/Admin/Installer.php index cf99092..bd82cdc 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -65,7 +65,7 @@ final class Installer extends InstallerAbstract $stock->type = 0; StockMapper::create()->execute($stock); - $stockLocation = new StockLocation((string) ($stock->getId() . '-1')); + $stockLocation = new StockLocation((string) ($stock->id . '-1')); $stockLocation->stock = $stock; StockLocationMapper::create()->execute($stockLocation); } diff --git a/Controller/ApiController.php b/Controller/ApiController.php index fe5cd52..15a1e5d 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -66,11 +66,11 @@ final class ApiController extends Controller StockMapper::create()->execute($stock); $stockLocation = new StockLocation($stock->name . '-1'); - $stockLocation->stock = $stock->getId(); + $stockLocation->stock = $stock->id; StockLocationMapper::create()->execute($stockLocation); $stockShelf = new StockShelf($stockLocation->name . '-1'); - $stockShelf->location = $stockLocation->getId(); + $stockShelf->location = $stockLocation->id; StockShelfMapper::create()->execute($stockShelf); } diff --git a/Models/Stock.php b/Models/Stock.php index 7f112ec..ffb846a 100755 --- a/Models/Stock.php +++ b/Models/Stock.php @@ -30,7 +30,7 @@ class Stock * @var int * @since 1.0.0 */ - protected int $id = 0; + public int $id = 0; /** * NAme. diff --git a/Models/StockLocation.php b/Models/StockLocation.php index 69c997b..256ef90 100755 --- a/Models/StockLocation.php +++ b/Models/StockLocation.php @@ -30,7 +30,7 @@ class StockLocation * @var int * @since 1.0.0 */ - protected int $id = 0; + public int $id = 0; public string $name = ''; diff --git a/Models/StockMovement.php b/Models/StockMovement.php index 53e2ac0..f249119 100755 --- a/Models/StockMovement.php +++ b/Models/StockMovement.php @@ -33,7 +33,7 @@ class StockMovement * @var int * @since 1.0.0 */ - protected int $id = 0; + public int $id = 0; public int $quantity = 0; diff --git a/Models/StockShelf.php b/Models/StockShelf.php index d757377..c7c4f6d 100755 --- a/Models/StockShelf.php +++ b/Models/StockShelf.php @@ -30,7 +30,7 @@ class StockShelf * @var int * @since 1.0.0 */ - protected int $id = 0; + public int $id = 0; public string $name = ''; diff --git a/Theme/Backend/stock-list.tpl.php b/Theme/Backend/stock-list.tpl.php index 963a3e2..31dc248 100755 --- a/Theme/Backend/stock-list.tpl.php +++ b/Theme/Backend/stock-list.tpl.php @@ -32,10 +32,10 @@ echo $this->getData('nav')->render(); ?> $value) : ++$count; - $url = UriFactory::build('{/base}/warehouse/stock?{?}&id=' . $value->getId()); + $url = UriFactory::build('{/base}/warehouse/stock?{?}&id=' . $value->id); ?> - getId(); ?> + id; ?> type; ?> name; ?> diff --git a/Theme/Backend/stock-location-list.tpl.php b/Theme/Backend/stock-location-list.tpl.php index b77671e..0aa9a9a 100755 --- a/Theme/Backend/stock-location-list.tpl.php +++ b/Theme/Backend/stock-location-list.tpl.php @@ -32,10 +32,10 @@ echo $this->getData('nav')->render(); ?> $value) : ++$count; - $url = UriFactory::build('{/base}/warehouse/stock/location?{?}&id=' . $value->getId()); + $url = UriFactory::build('{/base}/warehouse/stock/location?{?}&id=' . $value->id); ?> - getId(); ?> + id; ?> stock->name; ?> name; ?> diff --git a/tests/Models/StockLocationTest.php b/tests/Models/StockLocationTest.php index 482079a..175bff6 100755 --- a/tests/Models/StockLocationTest.php +++ b/tests/Models/StockLocationTest.php @@ -37,6 +37,6 @@ final class StockLocationTest extends \PHPUnit\Framework\TestCase */ public function testDefault() : void { - self::assertEquals(0, $this->stock->getId()); + self::assertEquals(0, $this->stock->id); } } diff --git a/tests/Models/StockMovementTest.php b/tests/Models/StockMovementTest.php index ce08303..6dcf67f 100755 --- a/tests/Models/StockMovementTest.php +++ b/tests/Models/StockMovementTest.php @@ -37,6 +37,6 @@ final class StockMovementTest extends \PHPUnit\Framework\TestCase */ public function testDefault() : void { - self::assertEquals(0, $this->movement->getId()); + self::assertEquals(0, $this->movement->id); } } diff --git a/tests/Models/StockShelfTest.php b/tests/Models/StockShelfTest.php index b042e68..c68e781 100755 --- a/tests/Models/StockShelfTest.php +++ b/tests/Models/StockShelfTest.php @@ -37,6 +37,6 @@ final class StockShelfTest extends \PHPUnit\Framework\TestCase */ public function testDefault() : void { - self::assertEquals(0, $this->stock->getId()); + self::assertEquals(0, $this->stock->id); } } diff --git a/tests/Models/StockTest.php b/tests/Models/StockTest.php index b4471c7..096e940 100755 --- a/tests/Models/StockTest.php +++ b/tests/Models/StockTest.php @@ -37,6 +37,6 @@ final class StockTest extends \PHPUnit\Framework\TestCase */ public function testDefault() : void { - self::assertEquals(0, $this->stock->getId()); + self::assertEquals(0, $this->stock->id); } }