From dad14c00346bf660e5a4851e0dac9f26e85f431a Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 2 Oct 2016 12:07:05 +0200 Subject: [PATCH 1/6] Core adjustments for pending issues --- Models/EmployeeMapper.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Models/EmployeeMapper.php b/Models/EmployeeMapper.php index 1431244..68e6868 100644 --- a/Models/EmployeeMapper.php +++ b/Models/EmployeeMapper.php @@ -35,13 +35,10 @@ class EmployeeMapper extends DataMapperAbstract protected static $ownsOne = [ 'account' => [ 'mapper' => AccountMapper::class, - 'src' => 'hr_staff', + 'src' => 'hr_staff_account', ], ]; - protected static $hasMany = [ - ]; - /** * Primary table. * From b776cc05fa1d24b6e2ac161198eda8ff331a4bcc Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 9 Oct 2016 20:07:30 +0200 Subject: [PATCH 2/6] 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 3cede3d..a06053e 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 a099ae2..c694cc6 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 6ed9b6a0b6c9b819797c050b22ea2b8a8ff5afb6 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 29 Oct 2016 20:44:52 +0200 Subject: [PATCH 3/6] 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/StaffList.php | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Admin/Activate.php b/Admin/Activate.php index 9e1fab8..5f8004f 100644 --- a/Admin/Activate.php +++ b/Admin/Activate.php @@ -16,7 +16,7 @@ namespace Modules\HumanResourceManagement\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 f3c9b4e..6a30cda 100644 --- a/Admin/Deactivate.php +++ b/Admin/Deactivate.php @@ -16,7 +16,7 @@ namespace Modules\HumanResourceManagement\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 a06053e..280528a 100644 --- a/Admin/Install/Navigation.php +++ b/Admin/Install/Navigation.php @@ -14,7 +14,7 @@ * @link http://orange-management.com */ namespace Modules\HumanResourceManagement\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 c694cc6..8b5b521 100644 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -16,7 +16,7 @@ namespace Modules\HumanResourceManagement\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 3c3b846..f877ef5 100644 --- a/Admin/Uninstall.php +++ b/Admin/Uninstall.php @@ -16,7 +16,7 @@ namespace Modules\HumanResourceManagement\Admin; -use phpOMS\DataStorage\Database\Pool; +use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\DataStorage\Database\Schema\Builder; use phpOMS\Module\UninstallAbstract; @@ -37,7 +37,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 a2ce705..ca3ad89 100644 --- a/Admin/Update.php +++ b/Admin/Update.php @@ -16,7 +16,7 @@ namespace Modules\HumanResourceManagement\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/StaffList.php b/Models/StaffList.php index 207224c..40da43a 100644 --- a/Models/StaffList.php +++ b/Models/StaffList.php @@ -42,7 +42,7 @@ class StaffList /** * 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 a30efb7d0e95cd9f22f7991f041eb2eb0556482d Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 6 Nov 2016 22:22:07 +0100 Subject: [PATCH 4/6] Fixing doc blocks --- Models/EmployeeMapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Models/EmployeeMapper.php b/Models/EmployeeMapper.php index 68e6868..f5eda2b 100644 --- a/Models/EmployeeMapper.php +++ b/Models/EmployeeMapper.php @@ -24,7 +24,7 @@ class EmployeeMapper extends DataMapperAbstract /** * Columns. * - * @var array + * @var array * @since 1.0.0 */ protected static $columns = [ From 6cb6f5010e73b4849f712b4b6fad5f4e81d79b8d Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 7 Dec 2016 20:23:04 +0100 Subject: [PATCH 5/6] Prepare const visibility --- Controller.php | 6 +++--- Models/PositionType.php | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Controller.php b/Controller.php index 0e6149c..f66ce92 100644 --- a/Controller.php +++ b/Controller.php @@ -42,7 +42,7 @@ class Controller extends ModuleAbstract implements WebInterface * @var string * @since 1.0.0 */ - const MODULE_PATH = __DIR__; + /* public */ const MODULE_PATH = __DIR__; /** * Module version. @@ -50,7 +50,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. @@ -58,7 +58,7 @@ class Controller extends ModuleAbstract implements WebInterface * @var string * @since 1.0.0 */ - const MODULE_NAME = 'HumanResourceManagement'; + /* public */ const MODULE_NAME = 'HumanResourceManagement'; /** * Providing. diff --git a/Models/PositionType.php b/Models/PositionType.php index cc45225..9c50c2e 100644 --- a/Models/PositionType.php +++ b/Models/PositionType.php @@ -30,19 +30,19 @@ use phpOMS\Datatypes\Enum; */ abstract class PositionType extends Enum { - const INTERN = 0; + /* public */ const INTERN = 0; - const APPRENTICE = 1; + /* public */ const APPRENTICE = 1; - const JUNIOR = 2; + /* public */ const JUNIOR = 2; - const REGULAR = 3; + /* public */ const REGULAR = 3; - const SENIOR = 4; + /* public */ const SENIOR = 4; - const ASSISTANT = 5; + /* public */ const ASSISTANT = 5; - const TEAMLEADER = 6; + /* public */ const TEAMLEADER = 6; - const HEAD = 7; + /* public */ const HEAD = 7; } From 26e58684b5dc73d41dc9d205a774620fd648e360 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 7 Dec 2016 20:56:15 +0100 Subject: [PATCH 6/6] 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/Employee.php | 2 +- Models/EmployeeHistory.php | 2 +- Models/EmployeeHistoryMapper.php | 2 +- Models/EmployeeMapper.php | 2 +- Models/PositionType.php | 2 +- Models/StaffList.php | 2 +- Theme/Backend/Lang/Navigation.en.lang.php | 2 +- Theme/Backend/Lang/en.lang.php | 2 +- Theme/Backend/department-list.tpl.php | 2 +- Theme/Backend/staff-create.tpl.php | 2 +- Theme/Backend/staff-list.tpl.php | 2 +- Theme/Backend/staff-single.tpl.php | 2 +- Theme/backend/Lang/Navigation.en.lang.php | 2 +- Theme/backend/Lang/en.lang.php | 2 +- Theme/backend/department-list.tpl.php | 2 +- Theme/backend/staff-create.tpl.php | 2 +- Theme/backend/staff-list.tpl.php | 2 +- Theme/backend/staff-single.tpl.php | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Admin/Activate.php b/Admin/Activate.php index 5f8004f..282192b 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 6a30cda..04bad81 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 280528a..064b72c 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 8b5b521..dcfe238 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 f877ef5..d4c4fbb 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 ca3ad89..e54533b 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 f66ce92..14c43f9 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/Employee.php b/Models/Employee.php index e2ddfea..2d9863c 100644 --- a/Models/Employee.php +++ b/Models/Employee.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Models/EmployeeHistory.php b/Models/EmployeeHistory.php index daeddf3..06acc7d 100644 --- a/Models/EmployeeHistory.php +++ b/Models/EmployeeHistory.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Models/EmployeeHistoryMapper.php b/Models/EmployeeHistoryMapper.php index e33ed0d..30f5e02 100644 --- a/Models/EmployeeHistoryMapper.php +++ b/Models/EmployeeHistoryMapper.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Models/EmployeeMapper.php b/Models/EmployeeMapper.php index f5eda2b..fceaf16 100644 --- a/Models/EmployeeMapper.php +++ b/Models/EmployeeMapper.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Models/PositionType.php b/Models/PositionType.php index 9c50c2e..582f911 100644 --- a/Models/PositionType.php +++ b/Models/PositionType.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Models/StaffList.php b/Models/StaffList.php index 40da43a..46d95af 100644 --- a/Models/StaffList.php +++ b/Models/StaffList.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 e5eb586..2649e49 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/en.lang.php b/Theme/Backend/Lang/en.lang.php index dd4a9d9..3f273a9 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/department-list.tpl.php b/Theme/Backend/department-list.tpl.php index eddc100..fb36b9f 100644 --- a/Theme/Backend/department-list.tpl.php +++ b/Theme/Backend/department-list.tpl.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Theme/Backend/staff-create.tpl.php b/Theme/Backend/staff-create.tpl.php index 3b9344c..1fffbce 100644 --- a/Theme/Backend/staff-create.tpl.php +++ b/Theme/Backend/staff-create.tpl.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Theme/Backend/staff-list.tpl.php b/Theme/Backend/staff-list.tpl.php index af41fe3..abbfd3b 100644 --- a/Theme/Backend/staff-list.tpl.php +++ b/Theme/Backend/staff-list.tpl.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Theme/Backend/staff-single.tpl.php b/Theme/Backend/staff-single.tpl.php index 7cd88f5..dd4a96b 100644 --- a/Theme/Backend/staff-single.tpl.php +++ b/Theme/Backend/staff-single.tpl.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 e5eb586..2649e49 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/en.lang.php b/Theme/backend/Lang/en.lang.php index dd4a9d9..3f273a9 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/department-list.tpl.php b/Theme/backend/department-list.tpl.php index eddc100..fb36b9f 100644 --- a/Theme/backend/department-list.tpl.php +++ b/Theme/backend/department-list.tpl.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Theme/backend/staff-create.tpl.php b/Theme/backend/staff-create.tpl.php index 3b9344c..1fffbce 100644 --- a/Theme/backend/staff-create.tpl.php +++ b/Theme/backend/staff-create.tpl.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Theme/backend/staff-list.tpl.php b/Theme/backend/staff-list.tpl.php index af41fe3..abbfd3b 100644 --- a/Theme/backend/staff-list.tpl.php +++ b/Theme/backend/staff-list.tpl.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Theme/backend/staff-single.tpl.php b/Theme/backend/staff-single.tpl.php index 7cd88f5..dd4a96b 100644 --- a/Theme/backend/staff-single.tpl.php +++ b/Theme/backend/staff-single.tpl.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD