fix phpcs findings

This commit is contained in:
Dennis Eichhorn 2019-09-12 19:48:00 +02:00
parent 3862acb710
commit 5641641a07
22 changed files with 205 additions and 197 deletions

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\HumanResourceManagement\Admin\Install
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\HumanResourceManagement\Admin\Install
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\DataStorage\Database\DatabasePool;
/**
* Navigation class.
*
* @package Modules\HumanResourceManagement\Admin\Install
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\HumanResourceManagement\Admin\Install
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Navigation
{
@ -34,7 +34,7 @@ class Navigation
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public static function install(string $path, DatabasePool $dbPool) : void
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\HumanResourceManagement\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\HumanResourceManagement\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Module\InstallerAbstract;
/**
* Installer class.
*
* @package Modules\HumanResourceManagement\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\HumanResourceManagement\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Installer extends InstallerAbstract
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\HumanResourceManagement\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\HumanResourceManagement\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Module\StatusAbstract;
/**
* Navigation class.
*
* @package Modules\HumanResourceManagement\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\HumanResourceManagement\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Status extends StatusAbstract
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\HumanResourceManagement\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\HumanResourceManagement\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Module\UninstallerAbstract;
/**
* Uninstaller class.
*
* @package Modules\HumanResourceManagement\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\HumanResourceManagement\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Uninstaller extends UninstallerAbstract
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\HumanResourceManagement\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\HumanResourceManagement\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Module\UpdaterAbstract;
/**
* Updater class.
*
* @package Modules\HumanResourceManagement\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\HumanResourceManagement\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Updater extends UpdaterAbstract
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\HumanResourceManagement
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\HumanResourceManagement
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -30,10 +30,10 @@ use phpOMS\Utils\Parser\Markdown\Markdown;
/**
* HumanResourceManagement controller class.
*
* @package Modules\HumanResourceManagement
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\HumanResourceManagement
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class ApiController extends Controller
{
@ -48,7 +48,7 @@ final class ApiController extends Controller
*
* @api
*
* @since 1.0.0
* @since 1.0.0
*/
public function apiEmployeeFromAccountCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
{
@ -70,7 +70,7 @@ final class ApiController extends Controller
*
* @return array<string, bool>
*
* @since 1.0.0
* @since 1.0.0
*/
private function validateEmployeeFromAccountCreate(RequestAbstract $request) : array
{
@ -90,7 +90,7 @@ final class ApiController extends Controller
*
* @return Employee
*
* @since 1.0.0
* @since 1.0.0
*/
private function createEmployeeFromAccountFromRequest(RequestAbstract $request) : Employee
{
@ -111,7 +111,7 @@ final class ApiController extends Controller
*
* @api
*
* @since 1.0.0
* @since 1.0.0
*/
public function apiEmployeeHistoryCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
{
@ -133,7 +133,7 @@ final class ApiController extends Controller
*
* @return array<string, bool>
*
* @since 1.0.0
* @since 1.0.0
*/
private function validateEmployeeHistoryCreate(RequestAbstract $request) : array
{
@ -157,7 +157,7 @@ final class ApiController extends Controller
*
* @return EmployeeHistory
*
* @since 1.0.0
* @since 1.0.0
*/
private function createEmployeeHistoryFromRequest(RequestAbstract $request) : EmployeeHistory
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\HumanResourceManagement
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\HumanResourceManagement
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -25,22 +25,24 @@ use phpOMS\Views\View;
/**
* Human Resources controller class.
*
* @package Modules\HumanResourceManagement
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\HumanResourceManagement
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class BackendController extends Controller
{
/**
* Routing end-point for application behaviour.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return RenderableInterface
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewHrStaffList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
@ -55,13 +57,15 @@ final class BackendController extends Controller
}
/**
* Routing end-point for application behaviour.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return RenderableInterface
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewHrStaffCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
@ -77,13 +81,15 @@ final class BackendController extends Controller
}
/**
* Routing end-point for application behaviour.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return RenderableInterface
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewHrStaffProfile(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
@ -100,13 +106,15 @@ final class BackendController extends Controller
}
/**
* Routing end-point for application behaviour.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return RenderableInterface
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewHrDepartmentList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\HumanResourceManagement
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\HumanResourceManagement
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -21,10 +21,10 @@ use phpOMS\Module\WebInterface;
/**
* Human Resources controller class.
*
* @package Modules\HumanResourceManagement
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\HumanResourceManagement
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Controller extends ModuleAbstract implements WebInterface
{
@ -32,7 +32,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Module path.
*
* @var string
* @var string
* @since 1.0.0
*/
public const MODULE_PATH = __DIR__ . '/../';
@ -40,7 +40,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Module version.
*
* @var string
* @var string
* @since 1.0.0
*/
public const MODULE_VERSION = '1.0.0';
@ -48,7 +48,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Module name.
*
* @var string
* @var string
* @since 1.0.0
*/
public const MODULE_NAME = 'HumanResourceManagement';
@ -56,7 +56,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Module id.
*
* @var int
* @var int
* @since 1.0.0
*/
public const MODULE_ID = 1002400000;
@ -64,7 +64,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Providing.
*
* @var string[]
* @var string[]
* @since 1.0.0
*/
protected static array $providing = [];
@ -72,7 +72,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Dependencies.
*
* @var string[]
* @var string[]
* @since 1.0.0
*/
protected static array $dependencies = [];

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\HumanResourceManagement\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\HumanResourceManagement\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Contract\ArrayableInterface;
/**
* Employee class.
*
* @package Modules\HumanResourceManagement\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\HumanResourceManagement\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Employee implements ArrayableInterface, \JsonSerializable
{
@ -30,7 +30,7 @@ class Employee implements ArrayableInterface, \JsonSerializable
/**
* Employee ID.
*
* @var int
* @var int
* @since 1.0.0
*/
private int $id = 0;

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\HumanResourceManagement\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\HumanResourceManagement\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -26,10 +26,10 @@ use phpOMS\Contract\ArrayableInterface;
/**
* Employee class.
*
* @package Modules\HumanResourceManagement\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\HumanResourceManagement\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class EmployeeHistory implements ArrayableInterface, \JsonSerializable
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -24,7 +24,7 @@ final class EmployeeHistoryMapper extends DataMapperAbstract
/**
* Columns.
*
* @var array<string, array<string, bool|string>>
* @var array<string, array<string, bool|string>>
* @since 1.0.0
*/
protected static array $columns = [
@ -40,7 +40,7 @@ final class EmployeeHistoryMapper extends DataMapperAbstract
/**
* Belongs to.
*
* @var array<string, array<string, string>>
* @var array<string, array<string, string>>
* @since 1.0.0
*/
protected static array $belongsTo = [
@ -61,7 +61,7 @@ final class EmployeeHistoryMapper extends DataMapperAbstract
/**
* Primary field name.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $primaryField = 'hr_staff_history_id';
@ -69,7 +69,7 @@ final class EmployeeHistoryMapper extends DataMapperAbstract
/**
* Primary table.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $table = 'hr_staff_history';

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -23,7 +23,7 @@ final class EmployeeMapper extends DataMapperAbstract
/**
* Columns.
*
* @var array<string, array<string, bool|string>>
* @var array<string, array<string, bool|string>>
* @since 1.0.0
*/
protected static array $columns = [
@ -34,7 +34,7 @@ final class EmployeeMapper extends DataMapperAbstract
/**
* Belongs to.
*
* @var array<string, array<string, string>>
* @var array<string, array<string, string>>
* @since 1.0.0
*/
protected static array $belongsTo = [
@ -47,7 +47,7 @@ final class EmployeeMapper extends DataMapperAbstract
/**
* Has many relation.
*
* @var array<string, array<string, null|string>>
* @var array<string, array<string, null|string>>
* @since 1.0.0
*/
protected static array $hasMany = [
@ -62,7 +62,7 @@ final class EmployeeMapper extends DataMapperAbstract
/**
* Primary table.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $table = 'hr_staff';
@ -70,7 +70,7 @@ final class EmployeeMapper extends DataMapperAbstract
/**
* Primary field name.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $primaryField = 'hr_staff_id';

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\News
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\News
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -17,10 +17,10 @@ namespace Modules\HumanResourceManagement\Models;
/**
* Null model
*
* @package Modules\HumanResourceManagement
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\HumanResourceManagement
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class NullEmployee extends Employee
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\News
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\News
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -17,10 +17,10 @@ namespace Modules\HumanResourceManagement\Models;
/**
* Null model
*
* @package Modules\HumanResourceManagement
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\HumanResourceManagement
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class NullEmployeeHistory extends EmployeeHistory
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\HumanResourceManagement
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\HumanResourceManagement
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Stdlib\Base\Enum;
/**
* Permision state enum.
*
* @package Modules\HumanResourceManagement
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\HumanResourceManagement
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
abstract class PermissionState extends Enum
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\HumanResourceManagement\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\HumanResourceManagement\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\DataStorage\Database\DatabaseType;
/**
* Staff list class.
*
* @package Modules\HumanResourceManagement\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\HumanResourceManagement\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class StaffList
{
@ -30,7 +30,7 @@ class StaffList
/**
* Database instance.
*
* @var \phpOMS\DataStorage\Database\Pool
* @var \phpOMS\DataStorage\Database\Pool
* @since 1.0.0
*/
private $dbPool = null;
@ -40,7 +40,7 @@ class StaffList
*
* @param \phpOMS\DataStorage\Database\DatabasePool $dbPool Database pool instance
*
* @since 1.0.0
* @since 1.0.0
*/
public function __construct($dbPool)
{
@ -58,7 +58,7 @@ class StaffList
*
* @return array
*
* @since 1.0.0
* @since 1.0.0
*/
public function getList($filter = null, $offset = 0, $limit = 100)
{
@ -92,7 +92,7 @@ class StaffList
*
* @return array
*
* @since 1.0.0
* @since 1.0.0
*/
public function getStats()
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
return ['Navigation' => [
'Departments' => 'Departments',

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
return ['HumanResourceManagement' => [
'Birthday' => 'Birthday',

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
/**
* @var \phpOMS\Views\View $this

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
/**
* @var \phpOMS\Views\View $this

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
/**
* @var \phpOMS\Views\View $this

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
$employee = $this->getData('employee');