From eaf13c33e3a8297de471456f09d327ad405e7c22 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 9 Oct 2016 20:07:30 +0200 Subject: [PATCH 1/4] Fix install --- Admin/Install/Navigation.php | 2 +- Admin/Installer.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Admin/Install/Navigation.php b/Admin/Install/Navigation.php index 28ad692..9fdb702 100644 --- a/Admin/Install/Navigation.php +++ b/Admin/Install/Navigation.php @@ -29,7 +29,7 @@ use phpOMS\DataStorage\Database\Pool; */ class Navigation { - public static function install(Pool $dbPool) + public static function install(string $path, Pool $dbPool) { $navData = json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true); diff --git a/Admin/Installer.php b/Admin/Installer.php index a6d9c02..3e1d8ab 100644 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -37,9 +37,9 @@ class Installer extends InstallerAbstract /** * {@inheritdoc} */ - public static function install(Pool $dbPool, InfoManager $info) + public static function install(string $path, Pool $dbPool, InfoManager $info) { - parent::install($dbPool, $info); + parent::install($path, $dbPool, $info); switch ($dbPool->get('core')->getType()) { case DatabaseType::MYSQL: From c7943318b389cdc0a55a53db5872be1d0525245c Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 29 Oct 2016 20:44:52 +0200 Subject: [PATCH 2/4] Adjust database pool name --- Admin/Activate.php | 4 ++-- Admin/Deactivate.php | 4 ++-- Admin/Install/Navigation.php | 4 ++-- Admin/Installer.php | 4 ++-- Admin/Uninstall.php | 4 ++-- Admin/Update.php | 4 ++-- Models/Invoice.php | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Admin/Activate.php b/Admin/Activate.php index 82a61e2..184002e 100644 --- a/Admin/Activate.php +++ b/Admin/Activate.php @@ -16,7 +16,7 @@ namespace Modules\SalesAnalysis\Admin; -use phpOMS\DataStorage\Database\Pool; +use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\Module\ActivateAbstract; use phpOMS\Module\InfoManager; @@ -37,7 +37,7 @@ class Activate extends ActivateAbstract /** * {@inheritdoc} */ - public static function activate(Pool $dbPool, InfoManager $info) + public static function activate(DatabasePool $dbPool, InfoManager $info) { parent::activate($dbPool, $info); } diff --git a/Admin/Deactivate.php b/Admin/Deactivate.php index 9112001..27db97c 100644 --- a/Admin/Deactivate.php +++ b/Admin/Deactivate.php @@ -16,7 +16,7 @@ namespace Modules\SalesAnalysis\Admin; -use phpOMS\DataStorage\Database\Pool; +use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\Module\DeactivateAbstract; use phpOMS\Module\InfoManager; @@ -37,7 +37,7 @@ class Deactivate extends DeactivateAbstract /** * {@inheritdoc} */ - public static function deactivate(Pool $dbPool, InfoManager $info) + public static function deactivate(DatabasePool $dbPool, InfoManager $info) { parent::deactivate($dbPool, $info); } diff --git a/Admin/Install/Navigation.php b/Admin/Install/Navigation.php index 9fdb702..4ff83b3 100644 --- a/Admin/Install/Navigation.php +++ b/Admin/Install/Navigation.php @@ -14,7 +14,7 @@ * @link http://orange-management.com */ namespace Modules\SalesAnalysis\Admin\Install; -use phpOMS\DataStorage\Database\Pool; +use phpOMS\DataStorage\Database\DatabasePool; /** * Navigation class. @@ -29,7 +29,7 @@ use phpOMS\DataStorage\Database\Pool; */ class Navigation { - public static function install(string $path, Pool $dbPool) + public static function install(string $path, DatabasePool $dbPool) { $navData = json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true); diff --git a/Admin/Installer.php b/Admin/Installer.php index 3e1d8ab..48a1623 100644 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -16,7 +16,7 @@ namespace Modules\SalesAnalysis\Admin; use phpOMS\DataStorage\Database\DatabaseType; -use phpOMS\DataStorage\Database\Pool; +use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\Module\InfoManager; use phpOMS\Module\InstallerAbstract; @@ -37,7 +37,7 @@ class Installer extends InstallerAbstract /** * {@inheritdoc} */ - public static function install(string $path, Pool $dbPool, InfoManager $info) + public static function install(string $path, DatabasePool $dbPool, InfoManager $info) { parent::install($path, $dbPool, $info); diff --git a/Admin/Uninstall.php b/Admin/Uninstall.php index 5bccda6..edc4f25 100644 --- a/Admin/Uninstall.php +++ b/Admin/Uninstall.php @@ -16,7 +16,7 @@ namespace Modules\SalesAnalysis\Admin; -use phpOMS\DataStorage\Database\Pool; +use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\Module\UninstallAbstract; /** @@ -36,7 +36,7 @@ class Uninstall extends UninstallAbstract /** * {@inheritdoc} */ - public static function uninstall(Pool $dbPool, InfoManager $info) + public static function uninstall(DatabasePool $dbPool, InfoManager $info) { parent::uninstall($dbPool, $info); } diff --git a/Admin/Update.php b/Admin/Update.php index 8b45209..3a0d2ac 100644 --- a/Admin/Update.php +++ b/Admin/Update.php @@ -16,7 +16,7 @@ namespace Modules\SalesAnalysis\Admin; -use phpOMS\DataStorage\Database\Pool; +use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\Module\UpdateAbstract; use phpOMS\System\File\Directory; @@ -37,7 +37,7 @@ class Update extends UpdateAbstract /** * {@inheritdoc} */ - public static function update(Pool $dbPool, array $info) + public static function update(DatabasePool $dbPool, array $info) { Directory::deletePath(__DIR__ . '/Update'); mkdir('Update'); diff --git a/Models/Invoice.php b/Models/Invoice.php index d7acc57..f78756c 100644 --- a/Models/Invoice.php +++ b/Models/Invoice.php @@ -77,7 +77,7 @@ class Invoice * /** * Constructor * - * @param \phpOMS\DataStorage\Database\Pool $dbPool Database pool instance + * @param \phpOMS\DataStorage\Database\DatabasePool $dbPool Database pool instance * * @since 1.0.0 * @author Dennis Eichhorn From fee0ffe4efd2bd8af67c98daba5eb02c96cd787f Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 7 Dec 2016 20:23:04 +0100 Subject: [PATCH 3/4] Prepare const visibility --- Controller.php | 6 +++--- Models/InvoiceStatus.php | 22 +++++++++++----------- Models/InvoiceType.php | 8 ++++---- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Controller.php b/Controller.php index f68ea24..0f8b8fa 100644 --- a/Controller.php +++ b/Controller.php @@ -45,7 +45,7 @@ class Controller extends ModuleAbstract implements WebInterface * @var string * @since 1.0.0 */ - const MODULE_PATH = __DIR__; + /* public */ const MODULE_PATH = __DIR__; /** * Module version. @@ -53,7 +53,7 @@ class Controller extends ModuleAbstract implements WebInterface * @var string * @since 1.0.0 */ - const MODULE_VERSION = '1.0.0'; + /* public */ const MODULE_VERSION = '1.0.0'; /** * Module name. @@ -61,7 +61,7 @@ class Controller extends ModuleAbstract implements WebInterface * @var string * @since 1.0.0 */ - const MODULE_NAME = 'SalesAnalysis'; + /* public */ const MODULE_NAME = 'SalesAnalysis'; /** * Providing. diff --git a/Models/InvoiceStatus.php b/Models/InvoiceStatus.php index 4df34b0..c336bbf 100644 --- a/Models/InvoiceStatus.php +++ b/Models/InvoiceStatus.php @@ -30,15 +30,15 @@ use phpOMS\Datatypes\Enum; */ abstract class InvoiceStatus extends Enum { - const BLOCKED = 0; /* Invoice needs approval */ - const DRAFT = 1; /* Invoice is still in draft */ - const READY = 2; /* Invoice is ready for accounting transfer */ - const UNPAID = 3; /* Invoice is not paid */ - const PAID_PARTIALLY = 4; /* Invoice is partially paid */ - const PAID = 5; /* Invoice is paid */ - const OFFSETTING = 6; /* This invoice may receive a credit */ - const OPEN = 7; /* offer & confirmation */ - const CHANGED = 8; /* offer & confirmation */ - const CLOSED = 9; /* offer & confirmation */ - const ACCEPTED = 10; /* offer & confirmation */ + /* public */ const BLOCKED = 0; /* Invoice needs approval */ + /* public */ const DRAFT = 1; /* Invoice is still in draft */ + /* public */ const READY = 2; /* Invoice is ready for accounting transfer */ + /* public */ const UNPAID = 3; /* Invoice is not paid */ + /* public */ const PAID_PARTIALLY = 4; /* Invoice is partially paid */ + /* public */ const PAID = 5; /* Invoice is paid */ + /* public */ const OFFSETTING = 6; /* This invoice may receive a credit */ + /* public */ const OPEN = 7; /* offer & confirmation */ + /* public */ const CHANGED = 8; /* offer & confirmation */ + /* public */ const CLOSED = 9; /* offer & confirmation */ + /* public */ const ACCEPTED = 10; /* offer & confirmation */ } diff --git a/Models/InvoiceType.php b/Models/InvoiceType.php index e5e517b..267cec3 100644 --- a/Models/InvoiceType.php +++ b/Models/InvoiceType.php @@ -30,11 +30,11 @@ use phpOMS\Datatypes\Enum; */ abstract class InvoiceType extends Enum { - const OFFER = 0; + /* public */ const OFFER = 0; - const CONTRACT_NOTE = 1; + /* public */ const CONTRACT_NOTE = 1; - const DELIVERY_NOTE = 2; + /* public */ const DELIVERY_NOTE = 2; - const BILL = 3; + /* public */ const BILL = 3; } From 1e663ab1346bb6d1837b80554164b65f91ee30e6 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 7 Dec 2016 20:56:15 +0100 Subject: [PATCH 4/4] Increase php version requirement --- Admin/Activate.php | 2 +- Admin/Deactivate.php | 2 +- Admin/Install/Navigation.php | 2 +- Admin/Installer.php | 2 +- Admin/Uninstall.php | 2 +- Admin/Update.php | 2 +- Controller.php | 2 +- Models/Invoice.php | 2 +- Models/InvoiceStatus.php | 2 +- Models/InvoiceType.php | 2 +- Models/sales_price_names.php | 2 +- Theme/Backend/Lang/Navigation.en.lang.php | 2 +- Theme/Backend/Lang/api.en.lang.php | 2 +- Theme/Backend/Lang/en.lang.php | 2 +- Theme/Backend/analysis-overview-dashboard.tpl.php | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Admin/Activate.php b/Admin/Activate.php index 184002e..372b94f 100644 --- a/Admin/Activate.php +++ b/Admin/Activate.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Admin/Deactivate.php b/Admin/Deactivate.php index 27db97c..3f3c6d7 100644 --- a/Admin/Deactivate.php +++ b/Admin/Deactivate.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Admin/Install/Navigation.php b/Admin/Install/Navigation.php index 4ff83b3..c5ee5c6 100644 --- a/Admin/Install/Navigation.php +++ b/Admin/Install/Navigation.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Admin/Installer.php b/Admin/Installer.php index 48a1623..ddcc29d 100644 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Admin/Uninstall.php b/Admin/Uninstall.php index edc4f25..01de56f 100644 --- a/Admin/Uninstall.php +++ b/Admin/Uninstall.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Admin/Update.php b/Admin/Update.php index 3a0d2ac..80fc975 100644 --- a/Admin/Update.php +++ b/Admin/Update.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Controller.php b/Controller.php index 0f8b8fa..91c8a10 100644 --- a/Controller.php +++ b/Controller.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Models/Invoice.php b/Models/Invoice.php index f78756c..eb908fe 100644 --- a/Models/Invoice.php +++ b/Models/Invoice.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Models/InvoiceStatus.php b/Models/InvoiceStatus.php index c336bbf..3d65502 100644 --- a/Models/InvoiceStatus.php +++ b/Models/InvoiceStatus.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Models/InvoiceType.php b/Models/InvoiceType.php index 267cec3..ef4758a 100644 --- a/Models/InvoiceType.php +++ b/Models/InvoiceType.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Models/sales_price_names.php b/Models/sales_price_names.php index ed174e0..d95bef3 100644 --- a/Models/sales_price_names.php +++ b/Models/sales_price_names.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Theme/Backend/Lang/Navigation.en.lang.php b/Theme/Backend/Lang/Navigation.en.lang.php index 93591c7..3831cca 100644 --- a/Theme/Backend/Lang/Navigation.en.lang.php +++ b/Theme/Backend/Lang/Navigation.en.lang.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Theme/Backend/Lang/api.en.lang.php b/Theme/Backend/Lang/api.en.lang.php index eea62f6..7b5ae90 100644 --- a/Theme/Backend/Lang/api.en.lang.php +++ b/Theme/Backend/Lang/api.en.lang.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index dda581c..12918cd 100644 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Theme/Backend/analysis-overview-dashboard.tpl.php b/Theme/Backend/analysis-overview-dashboard.tpl.php index 9a3f81c..3fdb5c3 100644 --- a/Theme/Backend/analysis-overview-dashboard.tpl.php +++ b/Theme/Backend/analysis-overview-dashboard.tpl.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD