fix phpcs findings

This commit is contained in:
Dennis Eichhorn 2019-09-12 19:46:27 +02:00
parent af294ff9ac
commit 6336898978
886 changed files with 8899 additions and 8898 deletions

1
.gitattributes vendored
View File

@ -1,4 +1,5 @@
* text=false * text=false
*.php ident
# Force the following filetypes to have unix eols, so Windows does not break them # Force the following filetypes to have unix eols, so Windows does not break them
*.php text eol=lf *.php text eol=lf

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Account * @package phpOMS\Account
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -25,10 +25,10 @@ use phpOMS\Validation\Network\Email;
* The account class is the base model for accounts. This model contains the most common account * The account class is the base model for accounts. This model contains the most common account
* information. This model is not comparable to a profile which contains much more information. * information. This model is not comparable to a profile which contains much more information.
* *
* @package phpOMS\Account * @package phpOMS\Account
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class Account implements ArrayableInterface, \JsonSerializable class Account implements ArrayableInterface, \JsonSerializable
{ {
@ -36,7 +36,7 @@ class Account implements ArrayableInterface, \JsonSerializable
/** /**
* Id. * Id.
* *
* @var int * @var int
* @since 1.0.0 * @since 1.0.0
*/ */
protected int $id = 0; protected int $id = 0;
@ -44,7 +44,7 @@ class Account implements ArrayableInterface, \JsonSerializable
/** /**
* Names. * Names.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected string $name1 = ''; protected string $name1 = '';
@ -52,7 +52,7 @@ class Account implements ArrayableInterface, \JsonSerializable
/** /**
* Names. * Names.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected string $name2 = ''; protected string $name2 = '';
@ -60,7 +60,7 @@ class Account implements ArrayableInterface, \JsonSerializable
/** /**
* Names. * Names.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected string $name3 = ''; protected string $name3 = '';
@ -68,7 +68,7 @@ class Account implements ArrayableInterface, \JsonSerializable
/** /**
* Email. * Email.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected string $email = ''; protected string $email = '';
@ -78,7 +78,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* Used in order to make sure ips don't change * Used in order to make sure ips don't change
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected string $origin = ''; protected string $origin = '';
@ -86,7 +86,7 @@ class Account implements ArrayableInterface, \JsonSerializable
/** /**
* Login. * Login.
* *
* @var null|string * @var null|string
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?string $login = null; protected ?string $login = null;
@ -94,7 +94,7 @@ class Account implements ArrayableInterface, \JsonSerializable
/** /**
* Last activity. * Last activity.
* *
* @var \DateTime * @var \DateTime
* @since 1.0.0 * @since 1.0.0
*/ */
protected \DateTime $lastActive; protected \DateTime $lastActive;
@ -102,7 +102,7 @@ class Account implements ArrayableInterface, \JsonSerializable
/** /**
* Last activity. * Last activity.
* *
* @var \DateTime * @var \DateTime
* @since 1.0.0 * @since 1.0.0
*/ */
protected \DateTime $createdAt; protected \DateTime $createdAt;
@ -110,7 +110,7 @@ class Account implements ArrayableInterface, \JsonSerializable
/** /**
* Groups. * Groups.
* *
* @var int[] * @var int[]
* @since 1.0.0 * @since 1.0.0
*/ */
protected array $groups = []; protected array $groups = [];
@ -118,7 +118,7 @@ class Account implements ArrayableInterface, \JsonSerializable
/** /**
* Password. * Password.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected string $password = ''; protected string $password = '';
@ -126,7 +126,7 @@ class Account implements ArrayableInterface, \JsonSerializable
/** /**
* Account type. * Account type.
* *
* @var int * @var int
* @since 1.0.0 * @since 1.0.0
*/ */
protected int $type = AccountType::USER; protected int $type = AccountType::USER;
@ -134,7 +134,7 @@ class Account implements ArrayableInterface, \JsonSerializable
/** /**
* Account status. * Account status.
* *
* @var int * @var int
* @since 1.0.0 * @since 1.0.0
*/ */
protected int $status = AccountStatus::INACTIVE; protected int $status = AccountStatus::INACTIVE;
@ -142,7 +142,7 @@ class Account implements ArrayableInterface, \JsonSerializable
/** /**
* Localization. * Localization.
* *
* @var Localization * @var Localization
* @since 1.0.0 * @since 1.0.0
*/ */
protected Localization $l11n; protected Localization $l11n;
@ -156,7 +156,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @param int $id Account id * @param int $id Account id
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __construct(int $id = 0) public function __construct(int $id = 0)
{ {
@ -171,7 +171,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @return int Account id * @return int Account id
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getId() : int public function getId() : int
{ {
@ -185,7 +185,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @return Localization * @return Localization
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getL11n() : Localization public function getL11n() : Localization
{ {
@ -200,7 +200,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @return array Returns array of all groups * @return array Returns array of all groups
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getGroups() : array public function getGroups() : array
{ {
@ -214,7 +214,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function addGroup($group) : void public function addGroup($group) : void
{ {
@ -228,7 +228,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setL11n(Localization $l11n) : void public function setL11n(Localization $l11n) : void
{ {
@ -240,7 +240,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @return string Returns the login name or null * @return string Returns the login name or null
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getName() : ?string public function getName() : ?string
{ {
@ -252,7 +252,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @return string Returns the name1 * @return string Returns the name1
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getName1() : string public function getName1() : string
{ {
@ -266,7 +266,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setName1(string $name) : void public function setName1(string $name) : void
{ {
@ -278,7 +278,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @return string Returns name 2 * @return string Returns name 2
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getName2() : string public function getName2() : string
{ {
@ -292,7 +292,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setName2(string $name) : void public function setName2(string $name) : void
{ {
@ -304,7 +304,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @return string Returns name 3 * @return string Returns name 3
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getName3() : string public function getName3() : string
{ {
@ -318,7 +318,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setName3(string $name) : void public function setName3(string $name) : void
{ {
@ -330,7 +330,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @return string Returns the email address * @return string Returns the email address
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getEmail() : string public function getEmail() : string
{ {
@ -346,7 +346,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @throws \InvalidArgumentException Exception is thrown if the provided string is not a valid email * @throws \InvalidArgumentException Exception is thrown if the provided string is not a valid email
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setEmail(string $email) : void public function setEmail(string $email) : void
{ {
@ -362,7 +362,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @return int Returns the status (AccountStatus) * @return int Returns the status (AccountStatus)
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getStatus() : int public function getStatus() : int
{ {
@ -378,7 +378,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @throws InvalidEnumValue This exception is thrown if a invalid status is used * @throws InvalidEnumValue This exception is thrown if a invalid status is used
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setStatus(int $status) : void public function setStatus(int $status) : void
{ {
@ -394,7 +394,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @return int Returns the type (AccountType) * @return int Returns the type (AccountType)
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getType() : int public function getType() : int
{ {
@ -410,7 +410,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @throws InvalidEnumValue This exception is thrown if an invalid type is used * @throws InvalidEnumValue This exception is thrown if an invalid type is used
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setType(int $type) : void public function setType(int $type) : void
{ {
@ -426,7 +426,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @return \DateTime * @return \DateTime
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getLastActive() : \DateTime public function getLastActive() : \DateTime
{ {
@ -438,7 +438,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @return \DateTime * @return \DateTime
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getCreatedAt() : \DateTime public function getCreatedAt() : \DateTime
{ {
@ -454,7 +454,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @throws \Exception Throws this exception if the password_hash function fails * @throws \Exception Throws this exception if the password_hash function fails
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function generatePassword(string $password) : void public function generatePassword(string $password) : void
{ {
@ -474,7 +474,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setName(string $name) : void public function setName(string $name) : void
{ {
@ -486,7 +486,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function updateLastActive() : void public function updateLastActive() : void
{ {
@ -498,7 +498,7 @@ class Account implements ArrayableInterface, \JsonSerializable
* *
* @return string Returns the json_encode of this object * @return string Returns the json_encode of this object
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __toString() : string public function __toString() : string
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Account * @package phpOMS\Account
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -22,10 +22,10 @@ use phpOMS\DataStorage\Session\SessionInterface;
* *
* The account manager is used to manage accounts. * The account manager is used to manage accounts.
* *
* @package phpOMS\Account * @package phpOMS\Account
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class AccountManager implements \Countable final class AccountManager implements \Countable
{ {
@ -33,7 +33,7 @@ final class AccountManager implements \Countable
/** /**
* Accounts. * Accounts.
* *
* @var Account[] * @var Account[]
* @since 1.0.0 * @since 1.0.0
*/ */
private array $accounts = []; private array $accounts = [];
@ -41,7 +41,7 @@ final class AccountManager implements \Countable
/** /**
* Session. * Session.
* *
* @var SessionInterface * @var SessionInterface
* @since 1.0.0 * @since 1.0.0
*/ */
private SessionInterface $session; private SessionInterface $session;
@ -51,7 +51,7 @@ final class AccountManager implements \Countable
* *
* @param SessionInterface $session Session * @param SessionInterface $session Session
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __construct(SessionInterface $session) public function __construct(SessionInterface $session)
{ {
@ -65,7 +65,7 @@ final class AccountManager implements \Countable
* *
* @return Account * @return Account
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function get(int $id = 0) : Account public function get(int $id = 0) : Account
{ {
@ -89,7 +89,7 @@ final class AccountManager implements \Countable
* *
* @return bool Returns true if the account could be added otherwise false is returned * @return bool Returns true if the account could be added otherwise false is returned
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function add(Account $account) : bool public function add(Account $account) : bool
{ {
@ -109,7 +109,7 @@ final class AccountManager implements \Countable
* *
* @return bool Returns true if the account could be removed otherwise false * @return bool Returns true if the account could be removed otherwise false
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function remove(int $id) : bool public function remove(int $id) : bool
{ {
@ -127,7 +127,7 @@ final class AccountManager implements \Countable
* *
* @return int Returns the amount of accounts in the manager (>= 0) * @return int Returns the amount of accounts in the manager (>= 0)
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function count() : int public function count() : int
{ {

View File

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

View File

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

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Account * @package phpOMS\Account
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -20,10 +20,10 @@ use phpOMS\Stdlib\Base\Exception\InvalidEnumValue;
/** /**
* Account group class. * Account group class.
* *
* @package phpOMS\Account * @package phpOMS\Account
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class Group implements ArrayableInterface, \JsonSerializable class Group implements ArrayableInterface, \JsonSerializable
{ {
@ -31,7 +31,7 @@ class Group implements ArrayableInterface, \JsonSerializable
/** /**
* Group id. * Group id.
* *
* @var int * @var int
* @since 1.0.0 * @since 1.0.0
*/ */
protected int $id = 0; protected int $id = 0;
@ -39,7 +39,7 @@ class Group implements ArrayableInterface, \JsonSerializable
/** /**
* Group name. * Group name.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected string $name = ''; protected string $name = '';
@ -47,7 +47,7 @@ class Group implements ArrayableInterface, \JsonSerializable
/** /**
* Group name. * Group name.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected string $description = ''; protected string $description = '';
@ -55,7 +55,7 @@ class Group implements ArrayableInterface, \JsonSerializable
/** /**
* Group members. * Group members.
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
protected array $members = []; protected array $members = [];
@ -63,7 +63,7 @@ class Group implements ArrayableInterface, \JsonSerializable
/** /**
* Parents. * Parents.
* *
* @var int[] * @var int[]
* @since 1.0.0 * @since 1.0.0
*/ */
protected array $parents = []; protected array $parents = [];
@ -71,7 +71,7 @@ class Group implements ArrayableInterface, \JsonSerializable
/** /**
* Group status. * Group status.
* *
* @var int * @var int
* @since 1.0.0 * @since 1.0.0
*/ */
protected int $status = GroupStatus::INACTIVE; protected int $status = GroupStatus::INACTIVE;
@ -83,7 +83,7 @@ class Group implements ArrayableInterface, \JsonSerializable
* *
* @return int Returns the id of the group * @return int Returns the id of the group
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getId() : int public function getId() : int
{ {
@ -95,7 +95,7 @@ class Group implements ArrayableInterface, \JsonSerializable
* *
* @return string Returns the name of the group * @return string Returns the name of the group
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getName() : string public function getName() : string
{ {
@ -109,7 +109,7 @@ class Group implements ArrayableInterface, \JsonSerializable
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setName(string $name) : void public function setName(string $name) : void
{ {
@ -121,7 +121,7 @@ class Group implements ArrayableInterface, \JsonSerializable
* *
* @return string Returns the description of the group * @return string Returns the description of the group
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getDescription() : string public function getDescription() : string
{ {
@ -135,7 +135,7 @@ class Group implements ArrayableInterface, \JsonSerializable
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setDescription(string $description) : void public function setDescription(string $description) : void
{ {
@ -147,7 +147,7 @@ class Group implements ArrayableInterface, \JsonSerializable
* *
* @return int Group status * @return int Group status
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getStatus() : int public function getStatus() : int
{ {
@ -163,7 +163,7 @@ class Group implements ArrayableInterface, \JsonSerializable
* *
* @throws InvalidEnumValue This exception is thrown if an invalid status is used * @throws InvalidEnumValue This exception is thrown if an invalid status is used
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setStatus(int $status) : void public function setStatus(int $status) : void
{ {
@ -179,7 +179,7 @@ class Group implements ArrayableInterface, \JsonSerializable
* *
* @return string Returns the json_encode of this object * @return string Returns the json_encode of this object
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __toString() : string public function __toString() : string
{ {
@ -205,7 +205,7 @@ class Group implements ArrayableInterface, \JsonSerializable
* *
* @return array<string, mixed> * @return array<string, mixed>
* *
* @since 1.0.0 * @since 1.0.0
*/ */
/** /**
* {@inheritdoc} * {@inheritdoc}

View File

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

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Account * @package phpOMS\Account
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Account;
/** /**
* Null account class. * Null account class.
* *
* @package phpOMS\Account * @package phpOMS\Account
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class NullAccount extends Account final class NullAccount extends Account
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Account * @package phpOMS\Account
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -20,17 +20,17 @@ namespace phpOMS\Account;
* This permission abstract is the basis for all permissions. Contrary to it's name it is not an * This permission abstract is the basis for all permissions. Contrary to it's name it is not an
* abstract class and can be used directly if needed. * abstract class and can be used directly if needed.
* *
* @package phpOMS\Account * @package phpOMS\Account
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class PermissionAbstract implements \JsonSerializable class PermissionAbstract implements \JsonSerializable
{ {
/** /**
* Permission id. * Permission id.
* *
* @var int * @var int
* @since 1.0.0 * @since 1.0.0
*/ */
protected int $id = 0; protected int $id = 0;
@ -38,7 +38,7 @@ class PermissionAbstract implements \JsonSerializable
/** /**
* Unit id. * Unit id.
* *
* @var null|int * @var null|int
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?int $unit = null; protected ?int $unit = null;
@ -46,7 +46,7 @@ class PermissionAbstract implements \JsonSerializable
/** /**
* App name. * App name.
* *
* @var null|string * @var null|string
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?string $app = null; protected ?string $app = null;
@ -54,7 +54,7 @@ class PermissionAbstract implements \JsonSerializable
/** /**
* Module id. * Module id.
* *
* @var null|string * @var null|string
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?string $module = null; protected ?string $module = null;
@ -62,7 +62,7 @@ class PermissionAbstract implements \JsonSerializable
/** /**
* Providing module id. * Providing module id.
* *
* @var int * @var int
* @since 1.0.0 * @since 1.0.0
*/ */
protected int $from = 0; protected int $from = 0;
@ -70,7 +70,7 @@ class PermissionAbstract implements \JsonSerializable
/** /**
* Type. * Type.
* *
* @var null|int * @var null|int
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?int $type = null; protected ?int $type = null;
@ -78,7 +78,7 @@ class PermissionAbstract implements \JsonSerializable
/** /**
* Element id. * Element id.
* *
* @var null|int * @var null|int
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?int $element = null; protected ?int $element = null;
@ -86,7 +86,7 @@ class PermissionAbstract implements \JsonSerializable
/** /**
* Component id. * Component id.
* *
* @var null|int * @var null|int
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?int $component = null; protected ?int $component = null;
@ -94,7 +94,7 @@ class PermissionAbstract implements \JsonSerializable
/** /**
* Permission. * Permission.
* *
* @var int * @var int
* @since 1.0.0 * @since 1.0.0
*/ */
protected int $permission = PermissionType::NONE; protected int $permission = PermissionType::NONE;
@ -110,7 +110,7 @@ class PermissionAbstract implements \JsonSerializable
* @param null|int $component (e.g. address) (null if all are acceptable) * @param null|int $component (e.g. address) (null if all are acceptable)
* @param int $permission Permission to check * @param int $permission Permission to check
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __construct( public function __construct(
int $unit = null, int $unit = null,
@ -137,7 +137,7 @@ class PermissionAbstract implements \JsonSerializable
* *
* @return int Retunrs the id of the permission * @return int Retunrs the id of the permission
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getId() : int public function getId() : int
{ {
@ -149,7 +149,7 @@ class PermissionAbstract implements \JsonSerializable
* *
* @return null|int * @return null|int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getUnit() : ?int public function getUnit() : ?int
{ {
@ -163,7 +163,7 @@ class PermissionAbstract implements \JsonSerializable
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setUnit(int $unit = null) : void public function setUnit(int $unit = null) : void
{ {
@ -175,7 +175,7 @@ class PermissionAbstract implements \JsonSerializable
* *
* @return null|string * @return null|string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getApp() : ?string public function getApp() : ?string
{ {
@ -189,7 +189,7 @@ class PermissionAbstract implements \JsonSerializable
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setApp(string $app = null) : void public function setApp(string $app = null) : void
{ {
@ -201,7 +201,7 @@ class PermissionAbstract implements \JsonSerializable
* *
* @return null|string * @return null|string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getModule() : ?string public function getModule() : ?string
{ {
@ -215,7 +215,7 @@ class PermissionAbstract implements \JsonSerializable
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setModule(string $module = null) : void public function setModule(string $module = null) : void
{ {
@ -227,7 +227,7 @@ class PermissionAbstract implements \JsonSerializable
* *
* @return int Returns the module responsible for setting this permission * @return int Returns the module responsible for setting this permission
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getFrom() : int public function getFrom() : int
{ {
@ -241,7 +241,7 @@ class PermissionAbstract implements \JsonSerializable
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setFrom(int $from = 0) : void public function setFrom(int $from = 0) : void
{ {
@ -253,7 +253,7 @@ class PermissionAbstract implements \JsonSerializable
* *
* @return null|int * @return null|int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getType() : ?int public function getType() : ?int
{ {
@ -267,7 +267,7 @@ class PermissionAbstract implements \JsonSerializable
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setType(int $type = null) : void public function setType(int $type = null) : void
{ {
@ -279,7 +279,7 @@ class PermissionAbstract implements \JsonSerializable
* *
* @return null|int * @return null|int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getElement() : ?int public function getElement() : ?int
{ {
@ -293,7 +293,7 @@ class PermissionAbstract implements \JsonSerializable
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setElement(int $element = null) : void public function setElement(int $element = null) : void
{ {
@ -305,7 +305,7 @@ class PermissionAbstract implements \JsonSerializable
* *
* @return null|int * @return null|int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getComponent() : ?int public function getComponent() : ?int
{ {
@ -319,7 +319,7 @@ class PermissionAbstract implements \JsonSerializable
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setComponent(int $component = null) : void public function setComponent(int $component = null) : void
{ {
@ -331,7 +331,7 @@ class PermissionAbstract implements \JsonSerializable
* *
* @return int Returns the permission (PermissionType) * @return int Returns the permission (PermissionType)
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getPermission() : int public function getPermission() : int
{ {
@ -345,7 +345,7 @@ class PermissionAbstract implements \JsonSerializable
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setPermission(int $permission = 0) : void public function setPermission(int $permission = 0) : void
{ {
@ -359,7 +359,7 @@ class PermissionAbstract implements \JsonSerializable
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function addPermission(int $permission = 0) : void public function addPermission(int $permission = 0) : void
{ {
@ -373,7 +373,7 @@ class PermissionAbstract implements \JsonSerializable
* *
* @return bool Returns true if the permission is set otherwise returns false * @return bool Returns true if the permission is set otherwise returns false
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function hasPermissionFlags(int $permission) : bool public function hasPermissionFlags(int $permission) : bool
{ {
@ -395,7 +395,7 @@ class PermissionAbstract implements \JsonSerializable
* *
* @return bool Returns true if the permission is set, false otherwise * @return bool Returns true if the permission is set, false otherwise
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function hasPermission( public function hasPermission(
int $permission, int $permission,

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Account * @package phpOMS\Account
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,17 +17,17 @@ namespace phpOMS\Account;
/** /**
* Permission handling trait. * Permission handling trait.
* *
* @package phpOMS\Account * @package phpOMS\Account
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
trait PermissionHandlingTrait trait PermissionHandlingTrait
{ {
/** /**
* Permissions. * Permissions.
* *
* @var PermissionAbstract[] * @var PermissionAbstract[]
* @since 1.0.0 * @since 1.0.0
*/ */
protected array $permissions = []; protected array $permissions = [];
@ -35,7 +35,7 @@ trait PermissionHandlingTrait
/** /**
* Amount of permissions. * Amount of permissions.
* *
* @var int * @var int
* @since 1.0.0 * @since 1.0.0
*/ */
private int $pLength = 0; private int $pLength = 0;
@ -49,7 +49,7 @@ trait PermissionHandlingTrait
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setPermissions(array $permissions) : void public function setPermissions(array $permissions) : void
{ {
@ -66,7 +66,7 @@ trait PermissionHandlingTrait
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function addPermissions(array $permissions) : void public function addPermissions(array $permissions) : void
{ {
@ -90,7 +90,7 @@ trait PermissionHandlingTrait
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function addPermission(PermissionAbstract $permission) : void public function addPermission(PermissionAbstract $permission) : void
{ {
@ -103,7 +103,7 @@ trait PermissionHandlingTrait
* *
* @return PermissionAbstract[] * @return PermissionAbstract[]
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getPermissions() : array public function getPermissions() : array
{ {
@ -125,7 +125,7 @@ trait PermissionHandlingTrait
* *
* @return bool Returns true if the permission is set, false otherwise * @return bool Returns true if the permission is set, false otherwise
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function hasPermission( public function hasPermission(
int $permission, int $permission,

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Account * @package phpOMS\Account
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -21,10 +21,10 @@ use phpOMS\Stdlib\Base\Enum;
* *
* A permission can be long to a group or an account. * A permission can be long to a group or an account.
* *
* @package phpOMS\Account * @package phpOMS\Account
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
abstract class PermissionOwner extends Enum abstract class PermissionOwner extends Enum
{ {

View File

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

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\CoinMatching * @package phpOMS\Algorithm\CoinMatching
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\CoinMatching;
/** /**
* Matching a value with a set of coins * Matching a value with a set of coins
* *
* @package phpOMS\Algorithm\CoinMatching * @package phpOMS\Algorithm\CoinMatching
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class MinimumCoinProblem class MinimumCoinProblem
{ {

View File

@ -5,11 +5,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\Knappsack * @package phpOMS\Algorithm\Knappsack
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -19,10 +19,10 @@ namespace phpOMS\Algorithm\Backpack;
/** /**
* Matching a value with a set of coins * Matching a value with a set of coins
* *
* @package phpOMS\Algorithm\Knappsack * @package phpOMS\Algorithm\Knappsack
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class Backpack class Backpack
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\Knappsack * @package phpOMS\Algorithm\Knappsack
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\Knappsack;
/** /**
* Matching a value with a set of coins * Matching a value with a set of coins
* *
* @package phpOMS\Algorithm\Knappsack * @package phpOMS\Algorithm\Knappsack
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class Item class Item
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\PathFinding;
/** /**
* Perform path finding. * Perform path finding.
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class JumpPointSearch implements PathFinderInterface class JumpPointSearch implements PathFinderInterface
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\PathFinding;
/** /**
* Node on grid. * Node on grid.
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class AStarNode extends Node class AStarNode extends Node
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\PathFinding;
/** /**
* Grid of nodes. * Grid of nodes.
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class Grid class Grid
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Math\Topology\Metrics2D;
/** /**
* Node on grid. * Node on grid.
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class Heuristic class Heuristic
{ {

View File

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

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\PathFinding;
/** /**
* Node on grid. * Node on grid.
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class JumpPointNode extends Node class JumpPointNode extends Node
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\PathFinding;
/** /**
* Perform path finding. * Perform path finding.
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class JumpPointSearch implements PathFinderInterface class JumpPointSearch implements PathFinderInterface
{ {

View File

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

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\PathFinding;
/** /**
* Node on grid. * Node on grid.
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class Node class Node
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\PathFinding;
/** /**
* Node on grid. * Node on grid.
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class NullJumpPointNode extends JumpPointNode class NullJumpPointNode extends JumpPointNode
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\PathFinding;
/** /**
* Node on grid. * Node on grid.
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class NullNode extends Node class NullNode extends Node
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\PathFinding;
/** /**
* Path in grids. * Path in grids.
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class Path class Path
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\PathFinding;
/** /**
* Path finder interface * Path finder interface
* *
* @package phpOMS\Algorithm\PathFinding * @package phpOMS\Algorithm\PathFinding
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
interface PathFinderInterface { interface PathFinderInterface {
public static function findPath( public static function findPath(

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\Sort;
/** /**
* BitonicSort class. * BitonicSort class.
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class BitonicSort implements SortInterface class BitonicSort implements SortInterface
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\Sort;
/** /**
* Bubblesort class. * Bubblesort class.
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class BubbleSort implements SortInterface class BubbleSort implements SortInterface
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\Sort;
/** /**
* Bucketsort class. * Bucketsort class.
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class BucketSort class BucketSort
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\Sort;
/** /**
* CocktailShakerSort class. * CocktailShakerSort class.
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class CocktailShakerSort implements SortInterface class CocktailShakerSort implements SortInterface
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\Sort;
/** /**
* CombSort class. * CombSort class.
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class CombSort implements SortInterface class CombSort implements SortInterface
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\Sort;
/** /**
* CycleSort class. * CycleSort class.
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class CycleSort implements SortInterface class CycleSort implements SortInterface
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\Sort;
/** /**
* FlashSort class. * FlashSort class.
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class FlashSort implements SortInterface class FlashSort implements SortInterface
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\Sort;
/** /**
* GnomeSort class. * GnomeSort class.
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class GnomeSort implements SortInterface class GnomeSort implements SortInterface
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\Sort;
/** /**
* OddEvenSort class. * OddEvenSort class.
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class OddEvenSort implements SortInterface class OddEvenSort implements SortInterface
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\Sort;
/** /**
* QuickSort class. * QuickSort class.
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class QuickSort implements SortInterface class QuickSort implements SortInterface
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\Sort;
/** /**
* SelectionSort class. * SelectionSort class.
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class SelectionSort implements SortInterface class SelectionSort implements SortInterface
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\Sort;
/** /**
* SortInterface class. * SortInterface class.
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
interface SortInterface interface SortInterface
{ {

View File

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

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Algorithm\Sort;
/** /**
* SortableInterface class. * SortableInterface class.
* *
* @package phpOMS\Algorithm\Sort; * @package phpOMS\Algorithm\Sort;
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
interface SortableInterface interface SortableInterface
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS * @package phpOMS
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -50,10 +50,10 @@ use phpOMS\DataStorage\Session\SessionInterface;
* @property \phpOMS\Account\AccountManager $accountManager * @property \phpOMS\Account\AccountManager $accountManager
* @property \phpOMS\Log\FileLogger $logger * @property \phpOMS\Log\FileLogger $logger
* *
* @package phpOMS * @package phpOMS
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class ApplicationAbstract class ApplicationAbstract
{ {
@ -61,7 +61,7 @@ class ApplicationAbstract
/** /**
* App name. * App name.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected string $appName = ''; protected string $appName = '';
@ -69,7 +69,7 @@ class ApplicationAbstract
/** /**
* Organization id. * Organization id.
* *
* @var int * @var int
* @since 1.0.0 * @since 1.0.0
*/ */
protected int $orgId = 0; protected int $orgId = 0;
@ -77,7 +77,7 @@ class ApplicationAbstract
/** /**
* App theme. * App theme.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected string $theme = ''; protected string $theme = '';
@ -85,7 +85,7 @@ class ApplicationAbstract
/** /**
* Database object. * Database object.
* *
* @var null|DatabasePool * @var null|DatabasePool
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?DatabasePool $dbPool = null; protected ?DatabasePool $dbPool = null;
@ -93,7 +93,7 @@ class ApplicationAbstract
/** /**
* Application settings object. * Application settings object.
* *
* @var null|CoreSettings * @var null|CoreSettings
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?CoreSettings $appSettings = null; protected ?CoreSettings $appSettings = null;
@ -101,7 +101,7 @@ class ApplicationAbstract
/** /**
* Account manager instance. * Account manager instance.
* *
* @var null|AccountManager * @var null|AccountManager
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?AccountManager $accountManager = null; protected ?AccountManager $accountManager = null;
@ -109,7 +109,7 @@ class ApplicationAbstract
/** /**
* Cache instance. * Cache instance.
* *
* @var null|CachePool * @var null|CachePool
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?CachePool $cachePool = null; protected ?CachePool $cachePool = null;
@ -117,7 +117,7 @@ class ApplicationAbstract
/** /**
* ModuleManager instance. * ModuleManager instance.
* *
* @var null|ModuleManager * @var null|ModuleManager
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?ModuleManager $moduleManager = null; protected ?ModuleManager $moduleManager = null;
@ -125,7 +125,7 @@ class ApplicationAbstract
/** /**
* Router instance. * Router instance.
* *
* @var null|Router * @var null|Router
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?Router $router = null; protected ?Router $router = null;
@ -133,7 +133,7 @@ class ApplicationAbstract
/** /**
* Dispatcher instance. * Dispatcher instance.
* *
* @var null|Dispatcher * @var null|Dispatcher
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?Dispatcher $dispatcher = null; protected ?Dispatcher $dispatcher = null;
@ -141,7 +141,7 @@ class ApplicationAbstract
/** /**
* Session instance. * Session instance.
* *
* @var null|SessionInterface * @var null|SessionInterface
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?SessionInterface $sessionManager = null; protected ?SessionInterface $sessionManager = null;
@ -149,7 +149,7 @@ class ApplicationAbstract
/** /**
* Cookie instance. * Cookie instance.
* *
* @var null|CookieJar * @var null|CookieJar
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?CookieJar $cookieJar = null; protected ?CookieJar $cookieJar = null;
@ -157,7 +157,7 @@ class ApplicationAbstract
/** /**
* Server localization. * Server localization.
* *
* @var null|Localization * @var null|Localization
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?Localization $l11nServer = null; protected ?Localization $l11nServer = null;
@ -165,7 +165,7 @@ class ApplicationAbstract
/** /**
* Server localization. * Server localization.
* *
* @var null|FileLogger * @var null|FileLogger
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?FileLogger $logger = null; protected ?FileLogger $logger = null;
@ -173,7 +173,7 @@ class ApplicationAbstract
/** /**
* L11n manager. * L11n manager.
* *
* @var null|L11nManager * @var null|L11nManager
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?L11nManager $l11nManager = null; protected ?L11nManager $l11nManager = null;
@ -181,7 +181,7 @@ class ApplicationAbstract
/** /**
* Event manager. * Event manager.
* *
* @var null|EventManager * @var null|EventManager
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?EventManager $eventManager = null; protected ?EventManager $eventManager = null;
@ -196,7 +196,7 @@ class ApplicationAbstract
* *
* @todo replace with proper setter (faster) * @todo replace with proper setter (faster)
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __set($name, $value) : void public function __set($name, $value) : void
{ {
@ -216,7 +216,7 @@ class ApplicationAbstract
* *
* @todo replace with proper getter (faster) * @todo replace with proper getter (faster)
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __get($name) public function __get($name)
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Asset * @package phpOMS\Asset
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Asset;
/** /**
* Asset manager class. * Asset manager class.
* *
* @package phpOMS\Asset * @package phpOMS\Asset
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class AssetManager implements \Countable final class AssetManager implements \Countable
{ {
@ -28,7 +28,7 @@ final class AssetManager implements \Countable
/** /**
* Assets. * Assets.
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
private array $assets = []; private array $assets = [];
@ -42,7 +42,7 @@ final class AssetManager implements \Countable
* *
* @return bool Returns true if the asset could be set otherwise false * @return bool Returns true if the asset could be set otherwise false
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function set(string $id, string $asset, bool $overwrite = true) : bool public function set(string $id, string $asset, bool $overwrite = true) : bool
{ {
@ -62,7 +62,7 @@ final class AssetManager implements \Countable
* *
* @return bool Returns true if the asset could be removed otherwise false * @return bool Returns true if the asset could be removed otherwise false
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function remove(string $id) : bool public function remove(string $id) : bool
{ {
@ -82,7 +82,7 @@ final class AssetManager implements \Countable
* *
* @return null|string * @return null|string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function get(string $id) : ?string public function get(string $id) : ?string
{ {
@ -98,7 +98,7 @@ final class AssetManager implements \Countable
* *
* @return int Returns the amount of assets (>= 0) * @return int Returns the amount of assets (>= 0)
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function count() : int public function count() : int
{ {

View File

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

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Auth * @package phpOMS\Auth
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -21,17 +21,17 @@ use phpOMS\DataStorage\Session\SessionInterface;
* *
* Responsible for authenticating and initializing the connection * Responsible for authenticating and initializing the connection
* *
* @package phpOMS\Auth * @package phpOMS\Auth
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class Auth final class Auth
{ {
/** /**
* Constructor. * Constructor.
* *
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
private function __construct() private function __construct()
@ -45,7 +45,7 @@ final class Auth
* *
* @return int Returns the user id * @return int Returns the user id
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function authenticate(SessionInterface $session) : int public static function authenticate(SessionInterface $session) : int
{ {
@ -61,7 +61,7 @@ final class Auth
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function logout(SessionInterface $session) : void public static function logout(SessionInterface $session) : void
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Auth * @package phpOMS\Auth
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -21,10 +21,10 @@ use phpOMS\Stdlib\Base\Enum;
* *
* These are possible answers to authentications. * These are possible answers to authentications.
* *
* @package phpOMS\Auth * @package phpOMS\Auth
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
abstract class LoginReturnType extends Enum abstract class LoginReturnType extends Enum
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS * @package phpOMS
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -19,10 +19,10 @@ namespace phpOMS;
* *
* This exception is thrown if a file couldn't be autoloaded * This exception is thrown if a file couldn't be autoloaded
* *
* @package phpOMS * @package phpOMS
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class AutoloadException extends \RuntimeException final class AutoloadException extends \RuntimeException
{ {
@ -33,7 +33,7 @@ final class AutoloadException extends \RuntimeException
* @param int $code Exception code * @param int $code Exception code
* @param \Exception $previous Previous exception * @param \Exception $previous Previous exception
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __construct(string $message, int $code = 0, \Exception $previous = null) public function __construct(string $message, int $code = 0, \Exception $previous = null)
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS * @package phpOMS
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -19,17 +19,17 @@ namespace phpOMS;
/** /**
* Autoloader class. * Autoloader class.
* *
* @package phpOMS * @package phpOMS
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class Autoloader final class Autoloader
{ {
/** /**
* Base paths for autoloading * Base paths for autoloading
* *
* @var string[] * @var string[]
* @since 1.0.0 * @since 1.0.0
*/ */
private static $paths = [ private static $paths = [
@ -40,7 +40,7 @@ final class Autoloader
/** /**
* Constructor. * Constructor.
* *
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
private function __construct() private function __construct()
@ -55,7 +55,7 @@ final class Autoloader
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function addPath(string $path) : void public static function addPath(string $path) : void
{ {
@ -73,7 +73,7 @@ final class Autoloader
* *
* @throws AutoloadException Throws this exception if the class to autoload doesn't exist. This could also be related to a wrong namespace/file path correlation. * @throws AutoloadException Throws this exception if the class to autoload doesn't exist. This could also be related to a wrong namespace/file path correlation.
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function defaultAutoloader(string $class) : void public static function defaultAutoloader(string $class) : void
{ {
@ -98,7 +98,7 @@ final class Autoloader
* *
* @return bool Returns true if the namespace/class exists, otherwise false * @return bool Returns true if the namespace/class exists, otherwise false
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function exists(string $class) : bool public static function exists(string $class) : bool
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Business\Finance * @package phpOMS\Business\Finance
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Business\Finance;
/** /**
* Depreciation class. * Depreciation class.
* *
* @package phpOMS\Business\Finance * @package phpOMS\Business\Finance
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class Depreciation final class Depreciation
{ {
@ -32,7 +32,7 @@ final class Depreciation
* *
* @return float Returns the straight line depreciation * @return float Returns the straight line depreciation
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getStraightLineDepreciation(float $start, int $duration) : float public static function getStraightLineDepreciation(float $start, int $duration) : float
{ {
@ -48,7 +48,7 @@ final class Depreciation
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getStraightLineResidualInT(float $start, int $duration, int $t) : float public static function getStraightLineResidualInT(float $start, int $duration, int $t) : float
{ {
@ -66,7 +66,7 @@ final class Depreciation
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getArithmeticDegressivDepreciationFactor(float $start, float $residual, int $duration) : float public static function getArithmeticDegressivDepreciationFactor(float $start, float $residual, int $duration) : float
{ {
@ -83,7 +83,7 @@ final class Depreciation
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getArithmeticDegressivDepreciationInT(float $start, float $residual, int $duration, int $t) : float public static function getArithmeticDegressivDepreciationInT(float $start, float $residual, int $duration, int $t) : float
{ {
@ -100,7 +100,7 @@ final class Depreciation
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getArithmeticDegressivDepreciationResidualInT(float $start, float $residual, int $duration, int $t) : float public static function getArithmeticDegressivDepreciationResidualInT(float $start, float $residual, int $duration, int $t) : float
{ {
@ -122,7 +122,7 @@ final class Depreciation
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getArithmeticProgressivDepreciationFactor(float $start, float $residual, int $duration) : float public static function getArithmeticProgressivDepreciationFactor(float $start, float $residual, int $duration) : float
{ {
@ -139,7 +139,7 @@ final class Depreciation
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getArithmeticProgressivDepreciationInT(float $start, float $residual, int $duration, int $t) : float public static function getArithmeticProgressivDepreciationInT(float $start, float $residual, int $duration, int $t) : float
{ {
@ -156,7 +156,7 @@ final class Depreciation
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getArithmeticProgressivDepreciationResidualInT(float $start, float $residual, int $duration, int $t) : float public static function getArithmeticProgressivDepreciationResidualInT(float $start, float $residual, int $duration, int $t) : float
{ {
@ -172,7 +172,7 @@ final class Depreciation
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getGeometicProgressivDepreciationRate(float $start, float $residual, int $duration) : float public static function getGeometicProgressivDepreciationRate(float $start, float $residual, int $duration) : float
{ {
@ -189,7 +189,7 @@ final class Depreciation
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getGeometicProgressivDepreciationInT(float $start, float $residual, int $duration, int $t) : float public static function getGeometicProgressivDepreciationInT(float $start, float $residual, int $duration, int $t) : float
{ {
@ -208,7 +208,7 @@ final class Depreciation
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getGeometicProgressivDepreciationResidualInT(float $start, float $residual, int $duration, int $t) : float public static function getGeometicProgressivDepreciationResidualInT(float $start, float $residual, int $duration, int $t) : float
{ {
@ -230,7 +230,7 @@ final class Depreciation
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getGeometicDegressivDepreciationRate(float $start, float $residual, int $duration) : float public static function getGeometicDegressivDepreciationRate(float $start, float $residual, int $duration) : float
{ {
@ -247,7 +247,7 @@ final class Depreciation
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getGeometicDegressivDepreciationInT(float $start, float $residual, int $duration, int $t) : float public static function getGeometicDegressivDepreciationInT(float $start, float $residual, int $duration, int $t) : float
{ {
@ -265,7 +265,7 @@ final class Depreciation
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getGeometicDegressivDepreciationResidualInT(float $start, float $residual, int $duration, int $t) : float public static function getGeometicDegressivDepreciationResidualInT(float $start, float $residual, int $duration, int $t) : float
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Business\Finance * @package phpOMS\Business\Finance
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Math\Statistic\Average;
/** /**
* Finance class. * Finance class.
* *
* @package phpOMS\Business\Finance * @package phpOMS\Business\Finance
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.CamelCaseParameterName) * @SuppressWarnings(PHPMD.CamelCaseParameterName)
* @SuppressWarnings(PHPMD.CamelCaseVariableName) * @SuppressWarnings(PHPMD.CamelCaseVariableName)
@ -43,7 +43,7 @@ final class FinanceFormulas
* *
* @return float Returns the APY * @return float Returns the APY
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getAnnualPercentageYield(float $r, int $n) : float public static function getAnnualPercentageYield(float $r, int $n) : float
{ {
@ -60,7 +60,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getStateAnnualInterestRateOfAPY(float $apy, int $n) : float public static function getStateAnnualInterestRateOfAPY(float $apy, int $n) : float
{ {
@ -76,7 +76,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getFutureValueOfAnnuity(float $P, float $r, int $n) : float public static function getFutureValueOfAnnuity(float $P, float $r, int $n) : float
{ {
@ -92,7 +92,7 @@ final class FinanceFormulas
* *
* @return int * @return int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getNumberOfPeriodsOfFVA(float $fva, float $P, float $r) : int public static function getNumberOfPeriodsOfFVA(float $fva, float $P, float $r) : int
{ {
@ -108,7 +108,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPeriodicPaymentOfFVA(float $fva, float $r, int $n) : float public static function getPeriodicPaymentOfFVA(float $fva, float $r, int $n) : float
{ {
@ -124,7 +124,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getFutureValueOfAnnuityConinuousCompounding(float $cf, float $r, int $t) : float public static function getFutureValueOfAnnuityConinuousCompounding(float $cf, float $r, int $t) : float
{ {
@ -140,7 +140,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getCashFlowOfFVACC(float $fvacc, float $r, int $t) : float public static function getCashFlowOfFVACC(float $fvacc, float $r, int $t) : float
{ {
@ -156,7 +156,7 @@ final class FinanceFormulas
* *
* @return int * @return int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getTimeOfFVACC(float $fvacc, float $cf, float $r) : int public static function getTimeOfFVACC(float $fvacc, float $cf, float $r) : int
{ {
@ -172,7 +172,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getAnnuityPaymentPV(float $pv, float $r, int $n) : float public static function getAnnuityPaymentPV(float $pv, float $r, int $n) : float
{ {
@ -188,7 +188,7 @@ final class FinanceFormulas
* *
* @return int * @return int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getNumberOfAPPV(float $p, float $pv, float $r) : int public static function getNumberOfAPPV(float $p, float $pv, float $r) : int
{ {
@ -204,7 +204,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPresentValueOfAPPV(float $p, float $r, int $n) : float public static function getPresentValueOfAPPV(float $p, float $r, int $n) : float
{ {
@ -220,7 +220,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getAnnuityPaymentFV(float $fv, float $r, int $n) : float public static function getAnnuityPaymentFV(float $fv, float $r, int $n) : float
{ {
@ -236,7 +236,7 @@ final class FinanceFormulas
* *
* @return int * @return int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getNumberOfAPFV(float $p, float $fv, float $r) : int public static function getNumberOfAPFV(float $p, float $fv, float $r) : int
{ {
@ -252,7 +252,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getFutureValueOfAPFV(float $p, float $r, int $n) : float public static function getFutureValueOfAPFV(float $p, float $r, int $n) : float
{ {
@ -267,7 +267,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getAnnutiyPaymentFactorPV(float $r, int $n) : float public static function getAnnutiyPaymentFactorPV(float $r, int $n) : float
{ {
@ -282,7 +282,7 @@ final class FinanceFormulas
* *
* @return int Returns the PV * @return int Returns the PV
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getNumberOfAPFPV(float $p, float $r) : int public static function getNumberOfAPFPV(float $p, float $r) : int
{ {
@ -298,7 +298,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPresentValueOfAnnuity(float $P, float $r, int $n) : float public static function getPresentValueOfAnnuity(float $P, float $r, int $n) : float
{ {
@ -314,7 +314,7 @@ final class FinanceFormulas
* *
* @return int * @return int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getNumberOfPeriodsOfPVA(float $pva, float $P, float $r) : int public static function getNumberOfPeriodsOfPVA(float $pva, float $P, float $r) : int
{ {
@ -330,7 +330,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPeriodicPaymentOfPVA(float $pva, float $r, int $n) : float public static function getPeriodicPaymentOfPVA(float $pva, float $r, int $n) : float
{ {
@ -345,7 +345,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPresentValueAnnuityFactor(float $r, int $n) : float public static function getPresentValueAnnuityFactor(float $r, int $n) : float
{ {
@ -360,7 +360,7 @@ final class FinanceFormulas
* *
* @return int * @return int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPeriodsOfPVAF(float $p, float $r) : int public static function getPeriodsOfPVAF(float $p, float $r) : int
{ {
@ -376,7 +376,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPresentValueOfAnnuityDue(float $P, float $r, int $n) : float public static function getPresentValueOfAnnuityDue(float $P, float $r, int $n) : float
{ {
@ -394,7 +394,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPeriodicPaymentOfPVAD(float $PV, float $r, int $n) : float public static function getPeriodicPaymentOfPVAD(float $PV, float $r, int $n) : float
{ {
@ -410,7 +410,7 @@ final class FinanceFormulas
* *
* @return int * @return int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPeriodsOfPVAD(float $PV, float $P, float $r) : int public static function getPeriodsOfPVAD(float $PV, float $P, float $r) : int
{ {
@ -426,7 +426,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getFutureValueOfAnnuityDue(float $P, float $r, int $n) : float public static function getFutureValueOfAnnuityDue(float $P, float $r, int $n) : float
{ {
@ -442,7 +442,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPeriodicPaymentOfFVAD(float $FV, float $r, int $n) : float public static function getPeriodicPaymentOfFVAD(float $FV, float $r, int $n) : float
{ {
@ -458,7 +458,7 @@ final class FinanceFormulas
* *
* @return int * @return int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPeriodsOfFVAD(float $FV, float $P, float $r) : int public static function getPeriodsOfFVAD(float $FV, float $P, float $r) : int
{ {
@ -473,7 +473,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getAssetToSalesRatio(float $assets, float $revenue) : float public static function getAssetToSalesRatio(float $assets, float $revenue) : float
{ {
@ -488,7 +488,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getAssetTurnoverRatio(float $assets, float $revenue) : float public static function getAssetTurnoverRatio(float $assets, float $revenue) : float
{ {
@ -503,7 +503,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getAverageCollectionPeriod(float $receivables, int $period = 365) : float public static function getAverageCollectionPeriod(float $receivables, int $period = 365) : float
{ {
@ -518,7 +518,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getReceivablesTurnover(float $sales, float $receivables) : float public static function getReceivablesTurnover(float $sales, float $receivables) : float
{ {
@ -534,7 +534,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getCompoundInterest(float $P, float $r, int $n) : float public static function getCompoundInterest(float $P, float $r, int $n) : float
{ {
@ -550,7 +550,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPrincipalOfCompundInterest(float $C, float $r, int $n) : float public static function getPrincipalOfCompundInterest(float $C, float $r, int $n) : float
{ {
@ -566,7 +566,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPeriodsOfCompundInterest(float $P, float $C, float $r) : float public static function getPeriodsOfCompundInterest(float $P, float $C, float $r) : float
{ {
@ -582,7 +582,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getContinuousCompounding(float $P, float $r, int $t) : float public static function getContinuousCompounding(float $P, float $r, int $t) : float
{ {
@ -598,7 +598,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPrincipalOfContinuousCompounding(float $C, float $r, int $t) : float public static function getPrincipalOfContinuousCompounding(float $C, float $r, int $t) : float
{ {
@ -614,7 +614,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPeriodsOfContinuousCompounding(float $P, float $C, float $r) : float public static function getPeriodsOfContinuousCompounding(float $P, float $C, float $r) : float
{ {
@ -630,7 +630,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getRateOfContinuousCompounding(float $P, float $C, float $t) : float public static function getRateOfContinuousCompounding(float $P, float $C, float $t) : float
{ {
@ -645,7 +645,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getCurrentRatio(float $assets, float $liabilities) : float public static function getCurrentRatio(float $assets, float $liabilities) : float
{ {
@ -659,7 +659,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getDaysInInventory(float $inventory) : float public static function getDaysInInventory(float $inventory) : float
{ {
@ -674,7 +674,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getDebtCoverageRatio(float $income, float $service) : float public static function getDebtCoverageRatio(float $income, float $service) : float
{ {
@ -689,7 +689,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getDebtRatio(float $liabilities, float $assets) : float public static function getDebtRatio(float $liabilities, float $assets) : float
{ {
@ -704,7 +704,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getDebtToEquityRatio(float $liabilities, float $equity) : float public static function getDebtToEquityRatio(float $liabilities, float $equity) : float
{ {
@ -719,7 +719,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getDebtToIncomeRatio(float $payments, float $income) : float public static function getDebtToIncomeRatio(float $payments, float $income) : float
{ {
@ -735,7 +735,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getDiscountedPaybackPeriod(float $CF, float $O1, float $r) : float public static function getDiscountedPaybackPeriod(float $CF, float $O1, float $r) : float
{ {
@ -749,7 +749,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getDoublingTime(float $r) : float public static function getDoublingTime(float $r) : float
{ {
@ -763,7 +763,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getDoublingRate(float $t) : float public static function getDoublingRate(float $t) : float
{ {
@ -777,7 +777,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getDoublingTimeContinuousCompounding(float $r) : float public static function getDoublingTimeContinuousCompounding(float $r) : float
{ {
@ -791,7 +791,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getDoublingContinuousCompoundingRate(float $t) : float public static function getDoublingContinuousCompoundingRate(float $t) : float
{ {
@ -807,7 +807,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getEquivalentAnnualAnnuity(float $NPV, float $r, int $n) : float public static function getEquivalentAnnualAnnuity(float $NPV, float $r, int $n) : float
{ {
@ -823,7 +823,7 @@ final class FinanceFormulas
* *
* @return int * @return int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPeriodsOfEAA(float $C, float $NPV, float $r) : int public static function getPeriodsOfEAA(float $C, float $NPV, float $r) : int
{ {
@ -839,7 +839,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getNetPresentValueOfEAA(float $C, float $r, int $n) : float public static function getNetPresentValueOfEAA(float $C, float $r, int $n) : float
{ {
@ -857,7 +857,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getFreeCashFlowToEquity(float $income, float $depamo, float $capital, float $wc, float $borrowing) : float public static function getFreeCashFlowToEquity(float $income, float $depamo, float $capital, float $wc, float $borrowing) : float
{ {
@ -875,7 +875,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getFreeCashFlowToFirm(float $ebit, float $t, float $depamo, float $capital, float $wc) : float public static function getFreeCashFlowToFirm(float $ebit, float $t, float $depamo, float $capital, float $wc) : float
{ {
@ -895,7 +895,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getFutureValue(float $C, float $r, int $n) : float public static function getFutureValue(float $C, float $r, int $n) : float
{ {
@ -911,7 +911,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getFutureValueContinuousCompounding(float $PV, float $r, int $t) : float public static function getFutureValueContinuousCompounding(float $PV, float $r, int $t) : float
{ {
@ -931,7 +931,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getFutureValueFactor(float $r, int $n) : float public static function getFutureValueFactor(float $r, int $n) : float
{ {
@ -945,7 +945,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getGeometricMeanReturn(array $r) : float public static function getGeometricMeanReturn(array $r) : float
{ {
@ -962,7 +962,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getGrowingAnnuityFV(float $P, float $r, float $g, int $n) : float public static function getGrowingAnnuityFV(float $P, float $r, float $g, int $n) : float
{ {
@ -979,7 +979,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getGrowingAnnuityPaymentPV(float $PV, float $r, float $g, int $n) : float public static function getGrowingAnnuityPaymentPV(float $PV, float $r, float $g, int $n) : float
{ {
@ -996,7 +996,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getGrowingAnnuityPaymentFV(float $FV, float $r, float $g, int $n) : float public static function getGrowingAnnuityPaymentFV(float $FV, float $r, float $g, int $n) : float
{ {
@ -1013,7 +1013,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getGrowingAnnuityPV(float $P, float $r, float $g, int $n) : float public static function getGrowingAnnuityPV(float $P, float $r, float $g, int $n) : float
{ {
@ -1029,7 +1029,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getGrowingPerpetuityPV(float $D, float $r, float $g) : float public static function getGrowingPerpetuityPV(float $D, float $r, float $g) : float
{ {
@ -1044,7 +1044,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getInterestCoverageRatio(float $ebit, float $expense) : float public static function getInterestCoverageRatio(float $ebit, float $expense) : float
{ {
@ -1059,7 +1059,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getInventoryTurnoverRatio(float $sales, float $inventory) : float public static function getInventoryTurnoverRatio(float $sales, float $inventory) : float
{ {
@ -1076,7 +1076,7 @@ final class FinanceFormulas
* *
* @throws \UnexpectedValueException Throws this exception if the length of the array is 0 * @throws \UnexpectedValueException Throws this exception if the length of the array is 0
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getNetPresentValue(array $C, float $r) : float public static function getNetPresentValue(array $C, float $r) : float
{ {
@ -1103,7 +1103,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getNetProfitMargin(float $income, float $sales) : float public static function getNetProfitMargin(float $income, float $sales) : float
{ {
@ -1118,7 +1118,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getNetWorkingCapital(float $assets, float $liabilities) : float public static function getNetWorkingCapital(float $assets, float $liabilities) : float
{ {
@ -1134,7 +1134,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getNumberOfPeriodsPVFV(float $FV, float $PV, float $r) : float public static function getNumberOfPeriodsPVFV(float $FV, float $PV, float $r) : float
{ {
@ -1149,7 +1149,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPaybackPeriod(float $investment, float $cash) : float public static function getPaybackPeriod(float $investment, float $cash) : float
{ {
@ -1164,7 +1164,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPresentValueOfPerpetuity(float $D, float $r) : float public static function getPresentValueOfPerpetuity(float $D, float $r) : float
{ {
@ -1180,7 +1180,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPresentValue(float $C, float $r, int $n) : float public static function getPresentValue(float $C, float $r, int $n) : float
{ {
@ -1196,7 +1196,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPresentValueContinuousCompounding(float $C, float $r, int $t) : float public static function getPresentValueContinuousCompounding(float $C, float $r, int $t) : float
{ {
@ -1211,7 +1211,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPresentValueFactor(float $r, int $n) : float public static function getPresentValueFactor(float $r, int $n) : float
{ {
@ -1226,7 +1226,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getQuickRatio(float $assets, float $liabilities) : float public static function getQuickRatio(float $assets, float $liabilities) : float
{ {
@ -1241,7 +1241,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getRateOfOnflation(float $newCPI, float $oldCPI) : float public static function getRateOfOnflation(float $newCPI, float $oldCPI) : float
{ {
@ -1256,7 +1256,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getRealRateOfReturn(float $nominal, float $inflation) : float public static function getRealRateOfReturn(float $nominal, float $inflation) : float
{ {
@ -1271,7 +1271,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getReceivablesTurnoverRatio(float $sales, float $receivable) : float public static function getReceivablesTurnoverRatio(float $sales, float $receivable) : float
{ {
@ -1286,7 +1286,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getRetentionRatio(float $income, float $dividends) : float public static function getRetentionRatio(float $income, float $dividends) : float
{ {
@ -1301,7 +1301,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getReturnOnAssets(float $income, float $assets) : float public static function getReturnOnAssets(float $income, float $assets) : float
{ {
@ -1316,7 +1316,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getReturnOnEquity(float $income, float $equity) : float public static function getReturnOnEquity(float $income, float $equity) : float
{ {
@ -1331,7 +1331,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getReturnOnInvestment(float $earnings, float $investment) : float public static function getReturnOnInvestment(float $earnings, float $investment) : float
{ {
@ -1347,7 +1347,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getSimpleInterest(float $P, float $r, int $t) : float public static function getSimpleInterest(float $P, float $r, int $t) : float
{ {
@ -1363,7 +1363,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getSimpleInterestRate(float $I, float $P, int $t) : float public static function getSimpleInterestRate(float $I, float $P, int $t) : float
{ {
@ -1379,7 +1379,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getSimpleInterestPrincipal(float $I, float $r, int $t) : float public static function getSimpleInterestPrincipal(float $I, float $r, int $t) : float
{ {
@ -1395,7 +1395,7 @@ final class FinanceFormulas
* *
* @return int * @return int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getSimpleInterestTime(float $I, float $P, float $r) : int public static function getSimpleInterestTime(float $I, float $P, float $r) : int
{ {
@ -1410,7 +1410,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getRelativeMarketShareByShare(float $ownShare, float $competitorShare) : float public static function getRelativeMarketShareByShare(float $ownShare, float $competitorShare) : float
{ {
@ -1425,7 +1425,7 @@ final class FinanceFormulas
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getRelativeMarketShareBySales(float $ownSales, float $competitorSales) : float public static function getRelativeMarketShareBySales(float $ownSales, float $competitorSales) : float
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Business\Finance * @package phpOMS\Business\Finance
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Business\Finance;
/** /**
* Finance class. * Finance class.
* *
* @package phpOMS\Business\Finance * @package phpOMS\Business\Finance
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.CamelCaseParameterName) * @SuppressWarnings(PHPMD.CamelCaseParameterName)
* @SuppressWarnings(PHPMD.CamelCaseVariableName) * @SuppressWarnings(PHPMD.CamelCaseVariableName)
@ -37,7 +37,7 @@ final class Loan
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPaymentsOnBalloonLoan(float $PV, float $r, int $n, float $balloon = 0.0) : float public static function getPaymentsOnBalloonLoan(float $PV, float $r, int $n, float $balloon = 0.0) : float
{ {
@ -54,7 +54,7 @@ final class Loan
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getBalloonBalanceOfLoan(float $PV, float $P, float $r, int $n) : float public static function getBalloonBalanceOfLoan(float $PV, float $P, float $r, int $n) : float
{ {
@ -70,7 +70,7 @@ final class Loan
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getLoanPayment(float $PV, float $r, int $n) : float public static function getLoanPayment(float $PV, float $r, int $n) : float
{ {
@ -87,7 +87,7 @@ final class Loan
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getRemainingBalanceLoan(float $PV, float $P, float $r, int $n) : float public static function getRemainingBalanceLoan(float $PV, float $P, float $r, int $n) : float
{ {
@ -102,7 +102,7 @@ final class Loan
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getLoanToDepositRatio(float $loans, float $deposits) : float public static function getLoanToDepositRatio(float $loans, float $deposits) : float
{ {
@ -117,7 +117,7 @@ final class Loan
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getLoanToValueRatio(float $loan, float $collateral) : float public static function getLoanToValueRatio(float $loan, float $collateral) : float
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Business\Finance * @package phpOMS\Business\Finance
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Business\Finance;
/** /**
* Finance class. * Finance class.
* *
* @package phpOMS\Business\Finance * @package phpOMS\Business\Finance
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class Lorenzkurve final class Lorenzkurve
{ {
@ -31,7 +31,7 @@ final class Lorenzkurve
* *
* @return float Returns the gini coefficient * @return float Returns the gini coefficient
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getGiniCoefficient(array $data) : float public static function getGiniCoefficient(array $data) : float
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Business\Finance * @package phpOMS\Business\Finance
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Business\Finance;
/** /**
* Finance class. * Finance class.
* *
* @package phpOMS\Business\Finance * @package phpOMS\Business\Finance
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.CamelCaseParameterName) * @SuppressWarnings(PHPMD.CamelCaseParameterName)
* @SuppressWarnings(PHPMD.CamelCaseVariableName) * @SuppressWarnings(PHPMD.CamelCaseVariableName)
@ -36,7 +36,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getBondEquivalentYield(float $fv, float $price, int $days) : float public static function getBondEquivalentYield(float $fv, float $price, int $days) : float
{ {
@ -51,7 +51,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getBookValuePerShare(float $total, int $common) : float public static function getBookValuePerShare(float $total, int $common) : float
{ {
@ -67,7 +67,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getExpectedReturnCAPM(float $rf, float $beta, float $r) : float public static function getExpectedReturnCAPM(float $rf, float $beta, float $r) : float
{ {
@ -82,7 +82,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getCapitalGainsYield(float $P0, float $P1) : float public static function getCapitalGainsYield(float $P0, float $P1) : float
{ {
@ -97,7 +97,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getCurrentYield(float $coupons, float $price) : float public static function getCurrentYield(float $coupons, float $price) : float
{ {
@ -113,7 +113,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getDilutedEarningsPerShare(float $income, float $avg, float $other) : float public static function getDilutedEarningsPerShare(float $income, float $avg, float $other) : float
{ {
@ -128,7 +128,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getDividendPayoutRatio(float $dividends, float $income) : float public static function getDividendPayoutRatio(float $dividends, float $income) : float
{ {
@ -143,7 +143,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getDividendYield(float $dividends, float $price) : float public static function getDividendYield(float $dividends, float $price) : float
{ {
@ -158,7 +158,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getDividendsPerShare(float $dividends, int $shares) : float public static function getDividendsPerShare(float $dividends, int $shares) : float
{ {
@ -173,7 +173,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getEarningsPerShare(float $income, float $shares) : float public static function getEarningsPerShare(float $income, float $shares) : float
{ {
@ -188,7 +188,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getEquityMultiplier(float $assets, float $equity) : float public static function getEquityMultiplier(float $assets, float $equity) : float
{ {
@ -202,7 +202,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getHoldingPeriodReturn(array $r) : float public static function getHoldingPeriodReturn(array $r) : float
{ {
@ -224,7 +224,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getNetAssetValue(float $assets, float $liabilities, int $shares) : float public static function getNetAssetValue(float $assets, float $liabilities, int $shares) : float
{ {
@ -239,7 +239,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPriceToBookValue(float $market, float $book) : float public static function getPriceToBookValue(float $market, float $book) : float
{ {
@ -254,7 +254,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPriceEarningsRatio(float $price, float $earnings) : float public static function getPriceEarningsRatio(float $price, float $earnings) : float
{ {
@ -269,7 +269,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPriceToSalesRatio(float $price, float $sales) : float public static function getPriceToSalesRatio(float $price, float $sales) : float
{ {
@ -285,7 +285,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPresentValueOfStockConstantGrowth(float $dividend, float $r, float $g = 0.0) : float public static function getPresentValueOfStockConstantGrowth(float $dividend, float $r, float $g = 0.0) : float
{ {
@ -300,7 +300,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getTaxEquivalentYield(float $free, float $tax) : float public static function getTaxEquivalentYield(float $free, float $tax) : float
{ {
@ -316,7 +316,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getTotalStockReturn(float $P0, float $P1, float $D) : float public static function getTotalStockReturn(float $P0, float $P1, float $D) : float
{ {
@ -333,7 +333,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getYieldToMaturity(float $C, float $F, float $P, int $n) : float public static function getYieldToMaturity(float $C, float $F, float $P, int $n) : float
{ {
@ -349,7 +349,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getZeroCouponBondValue(float $F, float $r, int $t) : float public static function getZeroCouponBondValue(float $F, float $r, int $t) : float
{ {
@ -365,7 +365,7 @@ final class StockBonds
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getZeroCouponBondEffectiveYield(float $F, float $PV, int $n) : float public static function getZeroCouponBondEffectiveYield(float $F, float $PV, int $n) : float
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Business\Marketing * @package phpOMS\Business\Marketing
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -19,10 +19,10 @@ namespace phpOMS\Business\Marketing;
* *
* This class provided basic marketing metric calculations * This class provided basic marketing metric calculations
* *
* @package phpOMS\Business\Marketing * @package phpOMS\Business\Marketing
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class Metrics final class Metrics
{ {
@ -37,7 +37,7 @@ final class Metrics
* *
* @return float Returns the customer retention * @return float Returns the customer retention
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getCustomerRetention(int $ce, int $cn, int $cs) : float public static function getCustomerRetention(int $ce, int $cn, int $cs) : float
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Business\Marketing * @package phpOMS\Business\Marketing
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -20,17 +20,17 @@ namespace phpOMS\Business\Marketing;
* The net promoter score is a basic evaluation of the happiness of customers. * The net promoter score is a basic evaluation of the happiness of customers.
* Instead of customers the NPS can also be transferred to non-customers. * Instead of customers the NPS can also be transferred to non-customers.
* *
* @package phpOMS\Business\Marketing * @package phpOMS\Business\Marketing
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class NetPromoterScore final class NetPromoterScore
{ {
/** /**
* Score values * Score values
* *
* @var int[] * @var int[]
* @since 1.0.0 * @since 1.0.0
*/ */
private array $scores = []; private array $scores = [];
@ -42,7 +42,7 @@ final class NetPromoterScore
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function add(int $score) : void public function add(int $score) : void
{ {
@ -59,7 +59,7 @@ final class NetPromoterScore
* *
* @return int Retunrs the NPS * @return int Retunrs the NPS
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getScore() : int public function getScore() : int
{ {
@ -89,7 +89,7 @@ final class NetPromoterScore
* *
* @return int Returns the amount of detractors (>= 0) * @return int Returns the amount of detractors (>= 0)
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function countDetractors() : int public function countDetractors() : int
{ {
@ -110,7 +110,7 @@ final class NetPromoterScore
* *
* @return int Returns the amount of passives (>= 0) * @return int Returns the amount of passives (>= 0)
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function countPassives() : int public function countPassives() : int
{ {
@ -131,7 +131,7 @@ final class NetPromoterScore
* *
* @return int Returns the amount of promoters (>= 0) * @return int Returns the amount of promoters (>= 0)
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function countPromoters() : int public function countPromoters() : int
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Business\Programming * @package phpOMS\Business\Programming
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -19,10 +19,10 @@ namespace phpOMS\Business\Programming;
* *
* This class provides basic programming metric calculations. * This class provides basic programming metric calculations.
* *
* @package phpOMS\Business\Programming * @package phpOMS\Business\Programming
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class Metrics final class Metrics
{ {
@ -37,7 +37,7 @@ final class Metrics
* *
* @return int ABC metric score * @return int ABC metric score
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function abcScore(int $a, int $b, int $c) : int public static function abcScore(int $a, int $b, int $c) : int
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Business\Sales * @package phpOMS\Business\Sales
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -20,10 +20,10 @@ namespace phpOMS\Business\Sales;
* This class can be used to calculate the market share based on a rank or vice versa * This class can be used to calculate the market share based on a rank or vice versa
* the rank based on a marketshare in a Zipf distributed market. * the rank based on a marketshare in a Zipf distributed market.
* *
* @package phpOMS\Business\Sales * @package phpOMS\Business\Sales
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class MarketShareEstimation final class MarketShareEstimation
{ {
@ -38,7 +38,7 @@ final class MarketShareEstimation
* *
* @return int Returns the rank * @return int Returns the rank
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getRankFromMarketShare(int $participants, float $marketShare, float $modifier = 1.0) : int public static function getRankFromMarketShare(int $participants, float $marketShare, float $modifier = 1.0) : int
{ {
@ -61,7 +61,7 @@ final class MarketShareEstimation
* *
* @return float Returns the Market share * @return float Returns the Market share
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getMarketShareFromRank(int $participants, int $rank, float $modifier = 1.0) : float public static function getMarketShareFromRank(int $participants, int $rank, float $modifier = 1.0) : float
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Config * @package phpOMS\Config
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\Config;
/** /**
* Options class. * Options class.
* *
* @package phpOMS\Config * @package phpOMS\Config
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
interface OptionsInterface interface OptionsInterface
{ {
@ -32,7 +32,7 @@ interface OptionsInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function exists($key) : bool; public function exists($key) : bool;
@ -45,7 +45,7 @@ interface OptionsInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setOption($key, $value, bool $overwrite = true) : bool; public function setOption($key, $value, bool $overwrite = true) : bool;
@ -57,7 +57,7 @@ interface OptionsInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setOptions(array $pair, bool $overwrite = true) : bool; public function setOptions(array $pair, bool $overwrite = true) : bool;
@ -68,7 +68,7 @@ interface OptionsInterface
* *
* @return mixed Option value * @return mixed Option value
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getOption($key); public function getOption($key);
} }

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Config * @package phpOMS\Config
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -19,10 +19,10 @@ namespace phpOMS\Config;
* *
* This trait basically implements the OptionsInterface * This trait basically implements the OptionsInterface
* *
* @package phpOMS\Config * @package phpOMS\Config
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
trait OptionsTrait trait OptionsTrait
{ {
@ -30,7 +30,7 @@ trait OptionsTrait
/** /**
* Options. * Options.
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
private array $options = []; private array $options = [];

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Config * @package phpOMS\Config
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -24,10 +24,10 @@ use phpOMS\DataStorage\Database\Connection\ConnectionAbstract;
* *
* Responsible for providing a database/cache bound settings manger * Responsible for providing a database/cache bound settings manger
* *
* @package phpOMS\Config * @package phpOMS\Config
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
abstract class SettingsAbstract implements OptionsInterface abstract class SettingsAbstract implements OptionsInterface
{ {
@ -36,7 +36,7 @@ abstract class SettingsAbstract implements OptionsInterface
/** /**
* Cache manager (pool). * Cache manager (pool).
* *
* @var null|CachePool * @var null|CachePool
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?CachePool $cache = null; protected ?CachePool $cache = null;
@ -44,7 +44,7 @@ abstract class SettingsAbstract implements OptionsInterface
/** /**
* Database connection instance. * Database connection instance.
* *
* @var null|ConnectionAbstract * @var null|ConnectionAbstract
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?ConnectionAbstract $connection = null; protected ?ConnectionAbstract $connection = null;
@ -52,7 +52,7 @@ abstract class SettingsAbstract implements OptionsInterface
/** /**
* Settings table. * Settings table.
* *
* @var null|string * @var null|string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static ?string $table = null; protected static ?string $table = null;
@ -60,7 +60,7 @@ abstract class SettingsAbstract implements OptionsInterface
/** /**
* Columns to identify the value. * Columns to identify the value.
* *
* @var string[] * @var string[]
* @since 1.0.0 * @since 1.0.0
*/ */
protected static array $columns = [ protected static array $columns = [
@ -70,7 +70,7 @@ abstract class SettingsAbstract implements OptionsInterface
/** /**
* Field where the actual value is stored. * Field where the actual value is stored.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected string $valueField = 'option'; protected string $valueField = 'option';
@ -82,7 +82,7 @@ abstract class SettingsAbstract implements OptionsInterface
* *
* @return mixed Option value * @return mixed Option value
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function get($columns) public function get($columns)
{ {
@ -133,7 +133,7 @@ abstract class SettingsAbstract implements OptionsInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function set(array $options, bool $store = false) : void public function set(array $options, bool $store = false) : void
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Contract * @package phpOMS\Contract
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -19,10 +19,10 @@ namespace phpOMS\Contract;
* *
* This can be helpful for \JsonSerializable classes or classes which need to be represented as array. * This can be helpful for \JsonSerializable classes or classes which need to be represented as array.
* *
* @package phpOMS\Contract * @package phpOMS\Contract
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
interface ArrayableInterface interface ArrayableInterface
{ {
@ -32,7 +32,7 @@ interface ArrayableInterface
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function toArray() : array; public function toArray() : array;
} }

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\Contract * @package phpOMS\Contract
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -20,10 +20,10 @@ namespace phpOMS\Contract;
* This is primarily used for classes that provide formatted output or output, * This is primarily used for classes that provide formatted output or output,
* that get rendered. * that get rendered.
* *
* @package phpOMS\Contract * @package phpOMS\Contract
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
interface RenderableInterface interface RenderableInterface
{ {
@ -33,7 +33,7 @@ interface RenderableInterface
* *
* @return string Returns rendered output * @return string Returns rendered output
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function render() : string; public function render() : string;
} }

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Cache * @package phpOMS\DataStorage\Cache
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -24,17 +24,17 @@ use phpOMS\DataStorage\DataStoragePoolInterface;
* *
* Responsible for storing cache implementation. * Responsible for storing cache implementation.
* *
* @package phpOMS\DataStorage\Cache * @package phpOMS\DataStorage\Cache
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class CachePool implements DataStoragePoolInterface final class CachePool implements DataStoragePoolInterface
{ {
/** /**
* MemCache instance. * MemCache instance.
* *
* @var DataStorageConnectionInterface[] * @var DataStorageConnectionInterface[]
* @since 1.0.0 * @since 1.0.0
*/ */
private ?array $pool = null; private ?array $pool = null;
@ -47,7 +47,7 @@ final class CachePool implements DataStoragePoolInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function add(string $key, DataStorageConnectionInterface $cache) : bool public function add(string $key, DataStorageConnectionInterface $cache) : bool
{ {
@ -67,7 +67,7 @@ final class CachePool implements DataStoragePoolInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function remove(string $key) : bool public function remove(string $key) : bool
{ {
@ -87,7 +87,7 @@ final class CachePool implements DataStoragePoolInterface
* *
* @return DataStorageConnectionInterface * @return DataStorageConnectionInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function get(string $key = '') : DataStorageConnectionInterface public function get(string $key = '') : DataStorageConnectionInterface
{ {
@ -110,7 +110,7 @@ final class CachePool implements DataStoragePoolInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function create(string $key, array $config) : bool public function create(string $key, array $config) : bool
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Cache * @package phpOMS\DataStorage\Cache
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -21,10 +21,10 @@ use phpOMS\Stdlib\Base\Enum;
* *
* Possible caching status * Possible caching status
* *
* @package phpOMS\DataStorage\Cache * @package phpOMS\DataStorage\Cache
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
abstract class CacheStatus extends Enum abstract class CacheStatus extends Enum
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Cache * @package phpOMS\DataStorage\Cache
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -21,10 +21,10 @@ use phpOMS\Stdlib\Base\Enum;
* *
* Cache types that are supported by the application * Cache types that are supported by the application
* *
* @package phpOMS\DataStorage\Cache * @package phpOMS\DataStorage\Cache
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
abstract class CacheType extends Enum abstract class CacheType extends Enum
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Cache\Connection * @package phpOMS\DataStorage\Cache\Connection
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -21,10 +21,10 @@ use phpOMS\Stdlib\Base\Enum;
* *
* Possible caching types * Possible caching types
* *
* @package phpOMS\DataStorage\Cache\Connection * @package phpOMS\DataStorage\Cache\Connection
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
abstract class CacheValueType extends Enum abstract class CacheValueType extends Enum
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Cache\Connection * @package phpOMS\DataStorage\Cache\Connection
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -23,10 +23,10 @@ use phpOMS\DataStorage\Cache\CacheType;
* Handles the cache connection. * Handles the cache connection.
* Implementing wrapper functions for multiple caches is planned (far away). * Implementing wrapper functions for multiple caches is planned (far away).
* *
* @package phpOMS\DataStorage\Cache\Connection * @package phpOMS\DataStorage\Cache\Connection
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
abstract class ConnectionAbstract implements ConnectionInterface abstract class ConnectionAbstract implements ConnectionInterface
{ {
@ -36,7 +36,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
* *
* This can be used externally to define queries and execute them. * This can be used externally to define queries and execute them.
* *
* @var mixed * @var mixed
* @since 1.0.0 * @since 1.0.0
*/ */
protected $con = null; protected $con = null;
@ -46,7 +46,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
* *
* The database prefix name for unique table names * The database prefix name for unique table names
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
public string $prefix = ''; public string $prefix = '';
@ -54,7 +54,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
/** /**
* Database data. * Database data.
* *
* @var null|string[] * @var null|string[]
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?array $dbdata = null; protected ?array $dbdata = null;
@ -62,7 +62,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
/** /**
* Database type. * Database type.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected string $type = CacheType::UNDEFINED; protected string $type = CacheType::UNDEFINED;
@ -70,7 +70,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
/** /**
* Database status. * Database status.
* *
* @var int * @var int
* @since 1.0.0 * @since 1.0.0
*/ */
protected int $status = CacheStatus::CLOSED; protected int $status = CacheStatus::CLOSED;
@ -96,7 +96,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getCache() : string public function getCache() : string
{ {
@ -108,7 +108,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getHost() : string public function getHost() : string
{ {
@ -120,7 +120,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
* *
* @return int * @return int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getPort() : int public function getPort() : int
{ {
@ -132,7 +132,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getPrefix() : string public function getPrefix() : string
{ {
@ -144,7 +144,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
* *
* Sets the database connection to null * Sets the database connection to null
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __destruct() public function __destruct()
{ {
@ -154,7 +154,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
/** /**
* Closes the chache. * Closes the chache.
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function close() : void public function close() : void
{ {
@ -169,7 +169,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
protected function parseValue($value) protected function parseValue($value)
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Cache\Connection * @package phpOMS\DataStorage\Cache\Connection
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\DataStorage\Cache\CacheType;
/** /**
* Cache connection factory. * Cache connection factory.
* *
* @package phpOMS\DataStorage\Cache\Connection * @package phpOMS\DataStorage\Cache\Connection
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class ConnectionFactory class ConnectionFactory
{ {
@ -30,7 +30,7 @@ class ConnectionFactory
/** /**
* Constructor. * Constructor.
* *
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
private function __construct() private function __construct()
@ -46,7 +46,7 @@ class ConnectionFactory
* *
* @throws \InvalidArgumentException throws this exception if the cache is not supported * @throws \InvalidArgumentException throws this exception if the cache is not supported
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function create(array $cacheData) : ConnectionInterface public static function create(array $cacheData) : ConnectionInterface
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Cache\Connection * @package phpOMS\DataStorage\Cache\Connection
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\DataStorage\DataStorageConnectionInterface;
/** /**
* Cache interface. * Cache interface.
* *
* @package phpOMS\DataStorage\Cache\Connection * @package phpOMS\DataStorage\Cache\Connection
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
interface ConnectionInterface extends DataStorageConnectionInterface interface ConnectionInterface extends DataStorageConnectionInterface
{ {
@ -36,7 +36,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function set($key, $value, int $expire = -1) : void; public function set($key, $value, int $expire = -1) : void;
@ -49,7 +49,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function add($key, $value, int $expire = -1) : bool; public function add($key, $value, int $expire = -1) : bool;
@ -61,7 +61,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
* *
* @return mixed Cache value * @return mixed Cache value
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function get($key, int $expire = -1); public function get($key, int $expire = -1);
@ -73,7 +73,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function delete($key, int $expire = -1) : bool; public function delete($key, int $expire = -1) : bool;
@ -84,7 +84,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function flush(int $expire = 0) : bool; public function flush(int $expire = 0) : bool;
@ -93,7 +93,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function flushAll() : bool; public function flushAll() : bool;
@ -106,7 +106,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function replace($key, $value, int $expire = -1) : bool; public function replace($key, $value, int $expire = -1) : bool;
@ -115,7 +115,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
* *
* @return mixed[] Stats array * @return mixed[] Stats array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function stats() : array; public function stats() : array;
@ -124,7 +124,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
* *
* @return int Storage threshold * @return int Storage threshold
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getThreshold() : int; public function getThreshold() : int;
} }

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Cache\Connection * @package phpOMS\DataStorage\Cache\Connection
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -35,10 +35,10 @@ use phpOMS\System\File\Local\File;
* delimiter (1 byte) * delimiter (1 byte)
* data (n bytes) * data (n bytes)
* *
* @package phpOMS\DataStorage\Cache\Connection * @package phpOMS\DataStorage\Cache\Connection
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class FileCache extends ConnectionAbstract class FileCache extends ConnectionAbstract
{ {
@ -50,7 +50,7 @@ class FileCache extends ConnectionAbstract
/** /**
* Delimiter for cache meta data * Delimiter for cache meta data
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
private const DELIM = '$'; private const DELIM = '$';
@ -58,7 +58,7 @@ class FileCache extends ConnectionAbstract
/** /**
* File path sanitizer * File path sanitizer
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
private const SANITIZE = '~'; private const SANITIZE = '~';
@ -66,7 +66,7 @@ class FileCache extends ConnectionAbstract
/** /**
* Only cache if data is larger than threshold (0-100). * Only cache if data is larger than threshold (0-100).
* *
* @var int * @var int
* @since 1.0.0 * @since 1.0.0
*/ */
private int $threshold = 50; private int $threshold = 50;
@ -76,7 +76,7 @@ class FileCache extends ConnectionAbstract
* *
* @param string $path Cache path * @param string $path Cache path
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __construct(string $path) public function __construct(string $path)
{ {
@ -184,7 +184,7 @@ class FileCache extends ConnectionAbstract
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function build($value, int $expire) : string private function build($value, int $expire) : string
{ {
@ -203,7 +203,7 @@ class FileCache extends ConnectionAbstract
* *
* @throws \InvalidArgumentException This exception is thrown if an unsupported datatype is used * @throws \InvalidArgumentException This exception is thrown if an unsupported datatype is used
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function dataType($value) : int private function dataType($value) : int
{ {
@ -238,7 +238,7 @@ class FileCache extends ConnectionAbstract
* *
* @throws InvalidEnumValue This exception is thrown if an unsupported cache value type is used * @throws InvalidEnumValue This exception is thrown if an unsupported cache value type is used
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function stringify($value, int $type) : string private function stringify($value, int $type) : string
{ {
@ -266,7 +266,7 @@ class FileCache extends ConnectionAbstract
* *
* @return int * @return int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function getExpire(string $raw) : int private function getExpire(string $raw) : int
{ {
@ -331,7 +331,7 @@ class FileCache extends ConnectionAbstract
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function reverseValue(int $type, string $raw, int $expireEnd) private function reverseValue(int $type, string $raw, int $expireEnd)
{ {
@ -465,7 +465,7 @@ class FileCache extends ConnectionAbstract
* *
* @return string Path to cache file * @return string Path to cache file
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function getPath($key) : string private function getPath($key) : string
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Cache\Connection * @package phpOMS\DataStorage\Cache\Connection
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -21,10 +21,10 @@ use phpOMS\DataStorage\Cache\Exception\InvalidConnectionConfigException;
/** /**
* Memcache class. * Memcache class.
* *
* @package phpOMS\DataStorage\Cache\Connection * @package phpOMS\DataStorage\Cache\Connection
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class MemCached extends ConnectionAbstract class MemCached extends ConnectionAbstract
{ {
@ -36,7 +36,7 @@ class MemCached extends ConnectionAbstract
/** /**
* Only cache if data is larger than threshold (0-100). * Only cache if data is larger than threshold (0-100).
* *
* @var int * @var int
* @since 1.0.0 * @since 1.0.0
*/ */
private int $threshold = 0; private int $threshold = 0;
@ -46,7 +46,7 @@ class MemCached extends ConnectionAbstract
* *
* @param array $data Cache data * @param array $data Cache data
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __construct(array $data) public function __construct(array $data)
{ {
@ -194,7 +194,7 @@ class MemCached extends ConnectionAbstract
/** /**
* Destructor. * Destructor.
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __destruct() public function __destruct()
{ {
@ -206,7 +206,7 @@ class MemCached extends ConnectionAbstract
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function close() : void public function close() : void
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Cache\Connection * @package phpOMS\DataStorage\Cache\Connection
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\DataStorage\Cache\Connection;
/** /**
* Null cache class. * Null cache class.
* *
* @package phpOMS\DataStorage\Cache\Connection * @package phpOMS\DataStorage\Cache\Connection
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class NullCache extends ConnectionAbstract class NullCache extends ConnectionAbstract
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Cache\Connection * @package phpOMS\DataStorage\Cache\Connection
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -21,10 +21,10 @@ use phpOMS\DataStorage\Cache\Exception\InvalidConnectionConfigException;
/** /**
* RedisCache class. * RedisCache class.
* *
* @package phpOMS\DataStorage\Cache\Connection * @package phpOMS\DataStorage\Cache\Connection
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class RedisCache extends ConnectionAbstract class RedisCache extends ConnectionAbstract
{ {
@ -38,7 +38,7 @@ class RedisCache extends ConnectionAbstract
* *
* @param array $data Cache data * @param array $data Cache data
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __construct(array $data) public function __construct(array $data)
{ {
@ -222,7 +222,7 @@ class RedisCache extends ConnectionAbstract
/** /**
* Destructor. * Destructor.
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __destruct() public function __destruct()
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Cache\Exception * @package phpOMS\DataStorage\Cache\Exception
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\DataStorage\Cache\Exception;
/** /**
* Invalid cache config exception class. * Invalid cache config exception class.
* *
* @package phpOMS\DataStorage\Cache\Exception * @package phpOMS\DataStorage\Cache\Exception
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class InvalidConnectionConfigException extends \InvalidArgumentException final class InvalidConnectionConfigException extends \InvalidArgumentException
{ {
@ -31,7 +31,7 @@ final class InvalidConnectionConfigException extends \InvalidArgumentException
* @param int $code Exception code * @param int $code Exception code
* @param \Exception $previous Previous exception * @param \Exception $previous Previous exception
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __construct(string $message = '', int $code = 0, \Exception $previous = null) public function __construct(string $message = '', int $code = 0, \Exception $previous = null)
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Cookie * @package phpOMS\DataStorage\Cookie
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -19,24 +19,24 @@ use phpOMS\DataStorage\LockException;
/** /**
* CookieJar class * CookieJar class
* *
* @package phpOMS\DataStorage\Cookie * @package phpOMS\DataStorage\Cookie
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class CookieJar final class CookieJar
{ {
/** /**
* Locked. * Locked.
* *
* @var bool * @var bool
* @since 1.0.0 * @since 1.0.0
*/ */
private static bool $isLocked = false; private static bool $isLocked = false;
/** /**
* Cookie values. * Cookie values.
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
private array $cookies = []; private array $cookies = [];
@ -58,7 +58,7 @@ final class CookieJar
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function lock() : void public static function lock() : void
{ {
@ -70,7 +70,7 @@ final class CookieJar
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function isLocked() : bool public static function isLocked() : bool
{ {
@ -91,7 +91,7 @@ final class CookieJar
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function set(string $id, $value, int $expire = 86400, string $path = '/', string $domain = null, bool $secure = false, bool $httpOnly = true, bool $overwrite = true) : bool public function set(string $id, $value, int $expire = 86400, string $path = '/', string $domain = null, bool $secure = false, bool $httpOnly = true, bool $overwrite = true) : bool
{ {
@ -118,7 +118,7 @@ final class CookieJar
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function get(string $id) public function get(string $id)
{ {
@ -134,7 +134,7 @@ final class CookieJar
* *
* @throws LockException Throws this exception if the cookie is already sent * @throws LockException Throws this exception if the cookie is already sent
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function delete(string $id) : bool public function delete(string $id) : bool
{ {
@ -162,7 +162,7 @@ final class CookieJar
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function remove(string $id) : bool public function remove(string $id) : bool
{ {
@ -182,7 +182,7 @@ final class CookieJar
* *
* @throws LockException Throws this exception if the cookie is already sent * @throws LockException Throws this exception if the cookie is already sent
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function save() : void public function save() : void
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage * @package phpOMS\DataStorage
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -21,10 +21,10 @@ use phpOMS\DataStorage\Database\Query\Builder;
* *
* This interface is used for DB, Cache & Session implementations * This interface is used for DB, Cache & Session implementations
* *
* @package phpOMS\DataStorage * @package phpOMS\DataStorage
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
interface DataMapperInterface interface DataMapperInterface
{ {
@ -36,7 +36,7 @@ interface DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function create($obj); public static function create($obj);
@ -47,7 +47,7 @@ interface DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function update($obj); public static function update($obj);
@ -58,7 +58,7 @@ interface DataMapperInterface
* *
* @return int Status * @return int Status
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function delete($obj); public static function delete($obj);
@ -69,7 +69,7 @@ interface DataMapperInterface
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function find(string $search) : array; public static function find(string $search) : array;
@ -80,7 +80,7 @@ interface DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function listResults(Builder $query); public static function listResults(Builder $query);
@ -91,7 +91,7 @@ interface DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function populate(array $result); public static function populate(array $result);
@ -102,7 +102,7 @@ interface DataMapperInterface
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function populateIterable(array $result) : array; public static function populateIterable(array $result) : array;
@ -113,7 +113,7 @@ interface DataMapperInterface
* *
* @return $this * @return $this
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function with(...$objects); public static function with(...$objects);
@ -124,7 +124,7 @@ interface DataMapperInterface
* *
* @return self * @return self
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function get($primaryKey); public static function get($primaryKey);
} }

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage * @package phpOMS\DataStorage
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\DataStorage;
/** /**
* Database connection interface. * Database connection interface.
* *
* @package phpOMS\DataStorage * @package phpOMS\DataStorage
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
interface DataStorageConnectionInterface interface DataStorageConnectionInterface
{ {
@ -30,7 +30,7 @@ interface DataStorageConnectionInterface
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getPrefix() : string; public function getPrefix() : string;
@ -45,7 +45,7 @@ interface DataStorageConnectionInterface
* *
* @todo make private, reason was that not everyone wants to connect during initialization?! * @todo make private, reason was that not everyone wants to connect during initialization?!
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function connect(array $data) : void; public function connect(array $data) : void;
@ -54,7 +54,7 @@ interface DataStorageConnectionInterface
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getType() : string; public function getType() : string;
@ -63,7 +63,7 @@ interface DataStorageConnectionInterface
* *
* @return int * @return int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getStatus() : int; public function getStatus() : int;
@ -72,7 +72,7 @@ interface DataStorageConnectionInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function close() : void; public function close() : void;
} }

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage * @package phpOMS\DataStorage
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -19,10 +19,10 @@ namespace phpOMS\DataStorage;
* *
* DB, Cache, Session * DB, Cache, Session
* *
* @package phpOMS\DataStorage * @package phpOMS\DataStorage
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
interface DataStoragePoolInterface interface DataStoragePoolInterface
{ {
@ -35,7 +35,7 @@ interface DataStoragePoolInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function add(string $key, DataStorageConnectionInterface $db) : bool; public function add(string $key, DataStorageConnectionInterface $db) : bool;
@ -46,7 +46,7 @@ interface DataStoragePoolInterface
* *
* @return DataStorageConnectionInterface * @return DataStorageConnectionInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function get(string $key = '') : DataStorageConnectionInterface; public function get(string $key = '') : DataStorageConnectionInterface;
@ -57,7 +57,7 @@ interface DataStoragePoolInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function remove(string $key) : bool; public function remove(string $key) : bool;
@ -69,7 +69,7 @@ interface DataStoragePoolInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function create(string $key, array $config) : bool; public function create(string $key, array $config) : bool;
} }

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Database * @package phpOMS\DataStorage\Database
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -20,17 +20,17 @@ use phpOMS\DataStorage\DataStorageConnectionInterface;
/** /**
* Database query builder. * Database query builder.
* *
* @package phpOMS\DataStorage\Database * @package phpOMS\DataStorage\Database
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
abstract class BuilderAbstract abstract class BuilderAbstract
{ {
/** /**
* Grammar. * Grammar.
* *
* @var null|GrammarAbstract * @var null|GrammarAbstract
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?GrammarAbstract $grammar = null; protected ?GrammarAbstract $grammar = null;
@ -38,7 +38,7 @@ abstract class BuilderAbstract
/** /**
* Database connection. * Database connection.
* *
* @var null|DataStorageConnectionInterface * @var null|DataStorageConnectionInterface
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?DataStorageConnectionInterface $connection = null; protected ?DataStorageConnectionInterface $connection = null;
@ -46,7 +46,7 @@ abstract class BuilderAbstract
/** /**
* Query type. * Query type.
* *
* @var int * @var int
* @since 1.0.0 * @since 1.0.0
*/ */
protected int $type = QueryType::NONE; protected int $type = QueryType::NONE;
@ -54,7 +54,7 @@ abstract class BuilderAbstract
/** /**
* Prefix. * Prefix.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected string $prefix = ''; protected string $prefix = '';
@ -62,7 +62,7 @@ abstract class BuilderAbstract
/** /**
* Raw. * Raw.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
public string $raw = ''; public string $raw = '';
@ -72,7 +72,7 @@ abstract class BuilderAbstract
* *
* @return DataStorageConnectionInterface * @return DataStorageConnectionInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getConnection() : DataStorageConnectionInterface public function getConnection() : DataStorageConnectionInterface
{ {
@ -86,7 +86,7 @@ abstract class BuilderAbstract
* *
* @return self * @return self
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function prefix(string $prefix) : self public function prefix(string $prefix) : self
{ {
@ -102,7 +102,7 @@ abstract class BuilderAbstract
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function quote(string $value) : string public function quote(string $value) : string
{ {
@ -114,7 +114,7 @@ abstract class BuilderAbstract
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getPrefix() : string public function getPrefix() : string
{ {
@ -126,7 +126,7 @@ abstract class BuilderAbstract
* *
* @return int * @return int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getType() : int public function getType() : int
{ {
@ -138,7 +138,7 @@ abstract class BuilderAbstract
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
abstract public function toSql() : string; abstract public function toSql() : string;
} }

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Database\Connection * @package phpOMS\DataStorage\Database\Connection
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -25,10 +25,10 @@ use phpOMS\DataStorage\Database\Schema\Grammar\Grammar as SchemaGrammar;
* Handles the database connection. * Handles the database connection.
* Implementing wrapper functions for multiple databases is planned (far away). * Implementing wrapper functions for multiple databases is planned (far away).
* *
* @package phpOMS\DataStorage\Database\Connection * @package phpOMS\DataStorage\Database\Connection
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
abstract class ConnectionAbstract implements ConnectionInterface abstract class ConnectionAbstract implements ConnectionInterface
{ {
@ -38,7 +38,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
* *
* This can be used externally to define queries and execute them. * This can be used externally to define queries and execute them.
* *
* @var null|\PDO * @var null|\PDO
* @since 1.0.0 * @since 1.0.0
*/ */
public ?\PDO $con = null; public ?\PDO $con = null;
@ -48,7 +48,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
* *
* The database prefix name for unique table names * The database prefix name for unique table names
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
public string $prefix = ''; public string $prefix = '';
@ -56,7 +56,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
/** /**
* Database data. * Database data.
* *
* @var null|string[] * @var null|string[]
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?array $dbdata = null; protected ?array $dbdata = null;
@ -64,7 +64,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
/** /**
* Database type. * Database type.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected string $type = DatabaseType::UNDEFINED; protected string $type = DatabaseType::UNDEFINED;
@ -72,7 +72,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
/** /**
* Database status. * Database status.
* *
* @var int * @var int
* @since 1.0.0 * @since 1.0.0
*/ */
protected int $status = DatabaseStatus::CLOSED; protected int $status = DatabaseStatus::CLOSED;
@ -80,7 +80,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
/** /**
* Database grammar. * Database grammar.
* *
* @var null|Grammar * @var null|Grammar
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?Grammar $grammar = null; protected ?Grammar $grammar = null;
@ -88,7 +88,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
/** /**
* Database grammar. * Database grammar.
* *
* @var null|SchemaGrammar * @var null|SchemaGrammar
* @since 1.0.0 * @since 1.0.0
*/ */
protected ?SchemaGrammar $schemaGrammar = null; protected ?SchemaGrammar $schemaGrammar = null;
@ -114,7 +114,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getDatabase() : string public function getDatabase() : string
{ {
@ -126,7 +126,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getHost() : string public function getHost() : string
{ {
@ -138,7 +138,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
* *
* @return int * @return int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getPort() : int public function getPort() : int
{ {
@ -150,7 +150,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getPrefix() : string public function getPrefix() : string
{ {
@ -178,7 +178,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
* *
* Sets the database connection to null * Sets the database connection to null
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __destruct() public function __destruct()
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Database\Connection * @package phpOMS\DataStorage\Database\Connection
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\DataStorage\Database\DatabaseType;
/** /**
* Database connection factory. * Database connection factory.
* *
* @package phpOMS\DataStorage\Database\Connection * @package phpOMS\DataStorage\Database\Connection
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class ConnectionFactory final class ConnectionFactory
{ {
@ -30,7 +30,7 @@ final class ConnectionFactory
/** /**
* Constructor. * Constructor.
* *
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
private function __construct() private function __construct()
@ -48,7 +48,7 @@ final class ConnectionFactory
* *
* @throws \InvalidArgumentException throws this exception if the database is not supported * @throws \InvalidArgumentException throws this exception if the database is not supported
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function create(array $dbdata) : ConnectionAbstract public static function create(array $dbdata) : ConnectionAbstract
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Database\Connection * @package phpOMS\DataStorage\Database\Connection
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -21,10 +21,10 @@ use phpOMS\DataStorage\DataStorageConnectionInterface;
/** /**
* Database connection interface. * Database connection interface.
* *
* @package phpOMS\DataStorage\Database\Connection * @package phpOMS\DataStorage\Database\Connection
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
interface ConnectionInterface extends DataStorageConnectionInterface interface ConnectionInterface extends DataStorageConnectionInterface
{ {
@ -33,7 +33,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
* *
* @return Grammar * @return Grammar
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getGrammar() : Grammar; public function getGrammar() : Grammar;
@ -42,7 +42,7 @@ interface ConnectionInterface extends DataStorageConnectionInterface
* *
* @return SchemaGrammar * @return SchemaGrammar
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getSchemaGrammar() : SchemaGrammar; public function getSchemaGrammar() : SchemaGrammar;
} }

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Database\Connection * @package phpOMS\DataStorage\Database\Connection
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -26,10 +26,10 @@ use phpOMS\DataStorage\Database\Schema\Grammar\MysqlGrammar as MysqlSchemaGramma
* Handles the database connection. * Handles the database connection.
* Implementing wrapper functions for multiple databases is planned (far away). * Implementing wrapper functions for multiple databases is planned (far away).
* *
* @package phpOMS\DataStorage\Database\Connection * @package phpOMS\DataStorage\Database\Connection
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class MysqlConnection extends ConnectionAbstract final class MysqlConnection extends ConnectionAbstract
{ {
@ -41,7 +41,7 @@ final class MysqlConnection extends ConnectionAbstract
* *
* @param string[] $dbdata the basic database information for establishing a connection * @param string[] $dbdata the basic database information for establishing a connection
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __construct(array $dbdata) public function __construct(array $dbdata)
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Database\Connection * @package phpOMS\DataStorage\Database\Connection
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\DataStorage\Database\Connection;
/** /**
* Database handler. * Database handler.
* *
* @package phpOMS\DataStorage\Database\Connection * @package phpOMS\DataStorage\Database\Connection
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class NullConnection extends ConnectionAbstract final class NullConnection extends ConnectionAbstract
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Database\Connection * @package phpOMS\DataStorage\Database\Connection
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -26,10 +26,10 @@ use phpOMS\DataStorage\Database\Schema\Grammar\PostgresGrammar as PostgresSchema
* Handles the database connection. * Handles the database connection.
* Implementing wrapper functions for multiple databases is planned (far away). * Implementing wrapper functions for multiple databases is planned (far away).
* *
* @package phpOMS\DataStorage\Database\Connection * @package phpOMS\DataStorage\Database\Connection
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class PostgresConnection extends ConnectionAbstract final class PostgresConnection extends ConnectionAbstract
{ {
@ -40,7 +40,7 @@ final class PostgresConnection extends ConnectionAbstract
* *
* @param string[] $dbdata the basic database information for establishing a connection * @param string[] $dbdata the basic database information for establishing a connection
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __construct(array $dbdata) public function __construct(array $dbdata)
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Database\Connection * @package phpOMS\DataStorage\Database\Connection
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -26,10 +26,10 @@ use phpOMS\DataStorage\Database\Schema\Grammar\SQLiteGrammar as SQLiteSchemaGram
* Handles the database connection. * Handles the database connection.
* Implementing wrapper functions for multiple databases is planned (far away). * Implementing wrapper functions for multiple databases is planned (far away).
* *
* @package phpOMS\DataStorage\Database\Connection * @package phpOMS\DataStorage\Database\Connection
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class SQLiteConnection extends ConnectionAbstract final class SQLiteConnection extends ConnectionAbstract
{ {
@ -41,7 +41,7 @@ final class SQLiteConnection extends ConnectionAbstract
* *
* @param string[] $dbdata the basic database information for establishing a connection * @param string[] $dbdata the basic database information for establishing a connection
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __construct(array $dbdata) public function __construct(array $dbdata)
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Database\Connection * @package phpOMS\DataStorage\Database\Connection
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -26,10 +26,10 @@ use phpOMS\DataStorage\Database\Schema\Grammar\MysqlGrammar as MysqlSchemaGramma
* Handles the database connection. * Handles the database connection.
* Implementing wrapper functions for multiple databases is planned (far away). * Implementing wrapper functions for multiple databases is planned (far away).
* *
* @package phpOMS\DataStorage\Database\Connection * @package phpOMS\DataStorage\Database\Connection
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class SqlServerConnection extends ConnectionAbstract final class SqlServerConnection extends ConnectionAbstract
{ {
@ -40,7 +40,7 @@ final class SqlServerConnection extends ConnectionAbstract
* *
* @param string[] $dbdata the basic database information for establishing a connection * @param string[] $dbdata the basic database information for establishing a connection
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __construct(array $dbdata) public function __construct(array $dbdata)
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Database * @package phpOMS\DataStorage\Database
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -27,10 +27,10 @@ use phpOMS\Utils\ArrayUtils;
* *
* DB, Cache, Session * DB, Cache, Session
* *
* @package phpOMS\DataStorage\Database * @package phpOMS\DataStorage\Database
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
* @todo: currently hasmany, owns one etc. are not using joins. In some cases this could improve the performance instead of separately querying the database * @todo: currently hasmany, owns one etc. are not using joins. In some cases this could improve the performance instead of separately querying the database
*/ */
class DataMapperAbstract implements DataMapperInterface class DataMapperAbstract implements DataMapperInterface
@ -38,7 +38,7 @@ class DataMapperAbstract implements DataMapperInterface
/** /**
* Database connection. * Database connection.
* *
* @var null|ConnectionAbstract * @var null|ConnectionAbstract
* @since 1.0.0 * @since 1.0.0
*/ */
protected static ?ConnectionAbstract $db = null; protected static ?ConnectionAbstract $db = null;
@ -46,7 +46,7 @@ class DataMapperAbstract implements DataMapperInterface
/** /**
* Overwriting extended values. * Overwriting extended values.
* *
* @var bool * @var bool
* @since 1.0.0 * @since 1.0.0
*/ */
protected static bool $overwrite = true; protected static bool $overwrite = true;
@ -54,7 +54,7 @@ class DataMapperAbstract implements DataMapperInterface
/** /**
* Primary field name. * Primary field name.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static string $primaryField = ''; protected static string $primaryField = '';
@ -62,7 +62,7 @@ class DataMapperAbstract implements DataMapperInterface
/** /**
* Primary field name. * Primary field name.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static string $createdAt = ''; protected static string $createdAt = '';
@ -70,7 +70,7 @@ class DataMapperAbstract implements DataMapperInterface
/** /**
* Language * Language
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static string $languageField = ''; protected static string $languageField = '';
@ -78,7 +78,7 @@ class DataMapperAbstract implements DataMapperInterface
/** /**
* Columns. * Columns.
* *
* @var array<string, array<string, string>> * @var array<string, array<string, string>>
* @since 1.0.0 * @since 1.0.0
*/ */
protected static array $columns = []; protected static array $columns = [];
@ -88,7 +88,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* Most often used for localizations * Most often used for localizations
* *
* @var array<string, array<string, string>> * @var array<string, array<string, string>>
* @since 1.0.0 * @since 1.0.0
*/ */
protected static array $conditionals = []; protected static array $conditionals = [];
@ -96,7 +96,7 @@ class DataMapperAbstract implements DataMapperInterface
/** /**
* Has many relation. * Has many relation.
* *
* @var array<string, array> * @var array<string, array>
* @since 1.0.0 * @since 1.0.0
*/ */
protected static array $hasMany = []; protected static array $hasMany = [];
@ -106,7 +106,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* Relation is defined in current mapper * Relation is defined in current mapper
* *
* @var array<string, array> * @var array<string, array>
* @since 1.0.0 * @since 1.0.0
*/ */
protected static array $ownsOne = []; protected static array $ownsOne = [];
@ -116,12 +116,12 @@ class DataMapperAbstract implements DataMapperInterface
* *
* Relation is defined in current mapper * Relation is defined in current mapper
* *
* @var string[] * @var string[]
* @since 1.0.0 * @since 1.0.0
*/ /** */ /**
* Belongs to. * Belongs to.
* *
* @var array<string, array<string, string>> * @var array<string, array<string, string>>
* @since 1.0.0 * @since 1.0.0
*/ */
protected static array $belongsTo = []; protected static array $belongsTo = [];
@ -129,7 +129,7 @@ class DataMapperAbstract implements DataMapperInterface
/** /**
* Table. * Table.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static string $table = ''; protected static string $table = '';
@ -137,7 +137,7 @@ class DataMapperAbstract implements DataMapperInterface
/** /**
* Fields to load. * Fields to load.
* *
* @var array[] * @var array[]
* @since 1.0.0 * @since 1.0.0
*/ */
protected static array $fields = []; protected static array $fields = [];
@ -145,7 +145,7 @@ class DataMapperAbstract implements DataMapperInterface
/** /**
* Initialized objects for cross reference to reduce initialization costs * Initialized objects for cross reference to reduce initialization costs
* *
* @var array[] * @var array[]
* @since 1.0.0 * @since 1.0.0
*/ */
protected static array $initObjects = []; protected static array $initObjects = [];
@ -153,7 +153,7 @@ class DataMapperAbstract implements DataMapperInterface
/** /**
* Initialized arrays for cross reference to reduce initialization costs * Initialized arrays for cross reference to reduce initialization costs
* *
* @var array[] * @var array[]
* @since 1.0.0 * @since 1.0.0
*/ */
protected static array $initArrays = []; protected static array $initArrays = [];
@ -161,7 +161,7 @@ class DataMapperAbstract implements DataMapperInterface
/** /**
* Highest mapper to know when to clear initialized objects * Highest mapper to know when to clear initialized objects
* *
* @var null|string * @var null|string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static ?string $parentMapper = null; protected static ?string $parentMapper = null;
@ -169,7 +169,7 @@ class DataMapperAbstract implements DataMapperInterface
/** /**
* Extended value collection. * Extended value collection.
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
protected static array $collection = [ protected static array $collection = [
@ -184,7 +184,7 @@ class DataMapperAbstract implements DataMapperInterface
/** /**
* Constructor. * Constructor.
* *
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
private function __construct() private function __construct()
@ -196,7 +196,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
private function __clone() private function __clone()
@ -210,7 +210,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function setConnection(ConnectionAbstract $con) : void public static function setConnection(ConnectionAbstract $con) : void
{ {
@ -222,7 +222,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPrimaryField() : string public static function getPrimaryField() : string
{ {
@ -234,7 +234,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getTable() : string public static function getTable() : string
{ {
@ -248,7 +248,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function extend($class) : void private static function extend($class) : void
{ {
@ -272,7 +272,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function with(...$objects) : void public static function with(...$objects) : void
{ {
@ -288,7 +288,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function clear() : void public static function clear() : void
{ {
@ -324,7 +324,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function find(string $search) : array public static function find(string $search) : array
{ {
@ -350,7 +350,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function create($obj, int $relations = RelationType::ALL, bool $force = false) public static function create($obj, int $relations = RelationType::ALL, bool $force = false)
{ {
@ -387,7 +387,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function createConditionals(\ReflectionClass $refClass, object $obj, $objId): void private static function createConditionals(\ReflectionClass $refClass, object $obj, $objId): void
{ {
@ -401,7 +401,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function createArray(array &$obj, int $relations = RelationType::ALL) public static function createArray(array &$obj, int $relations = RelationType::ALL)
{ {
@ -431,7 +431,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function createModel(object $obj, \ReflectionClass $refClass) private static function createModel(object $obj, \ReflectionClass $refClass)
{ {
@ -498,7 +498,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function createConditionalsArray(array &$obj, $objId): void private static function createConditionalsArray(array &$obj, $objId): void
{ {
@ -511,7 +511,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function createModelArray(array &$obj) private static function createModelArray(array &$obj)
{ {
@ -568,7 +568,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function getObjectId(object $obj, \ReflectionClass $refClass = null) private static function getObjectId(object $obj, \ReflectionClass $refClass = null)
{ {
@ -597,7 +597,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function setObjectId(\ReflectionClass $refClass, object $obj, $objId) : void private static function setObjectId(\ReflectionClass $refClass, object $obj, $objId) : void
{ {
@ -626,7 +626,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function createRelation(string $member, $id1, $id2) : bool public static function createRelation(string $member, $id1, $id2) : bool
{ {
@ -650,7 +650,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @throws InvalidMapperException Throws this exception if the mapper in the has many relation is invalid * @throws InvalidMapperException Throws this exception if the mapper in the has many relation is invalid
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function createHasMany(\ReflectionClass $refClass, object $obj, $objId) : void private static function createHasMany(\ReflectionClass $refClass, object $obj, $objId) : void
{ {
@ -738,7 +738,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @throws InvalidMapperException Throws this exception if the mapper in the has many relation is invalid * @throws InvalidMapperException Throws this exception if the mapper in the has many relation is invalid
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function createHasManyArray(array &$obj, $objId) : void private static function createHasManyArray(array &$obj, $objId) : void
{ {
@ -796,7 +796,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function createOwnsOne(string $propertyName, $obj) private static function createOwnsOne(string $propertyName, $obj)
{ {
@ -824,7 +824,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function createOwnsOneArray(string $propertyName, array &$obj) private static function createOwnsOneArray(string $propertyName, array &$obj)
{ {
@ -852,7 +852,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function createBelongsTo(string $propertyName, $obj) private static function createBelongsTo(string $propertyName, $obj)
{ {
@ -881,7 +881,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function createBelongsToArray(string $propertyName, array $obj) private static function createBelongsToArray(string $propertyName, array $obj)
{ {
@ -911,7 +911,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function createRelationTable(string $propertyName, array $objsIds, $objId) : void private static function createRelationTable(string $propertyName, array $objsIds, $objId) : void
{ {
@ -942,7 +942,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function parseValue(string $type, $value = null) private static function parseValue(string $type, $value = null)
{ {
@ -984,7 +984,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @throws InvalidMapperException Throws this exception if the mapper in the has many relation is invalid * @throws InvalidMapperException Throws this exception if the mapper in the has many relation is invalid
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function updateHasMany(\ReflectionClass $refClass, object $obj, $objId, int $relations = RelationType::ALL, $depth = 1) : void private static function updateHasMany(\ReflectionClass $refClass, object $obj, $objId, int $relations = RelationType::ALL, $depth = 1) : void
{ {
@ -1073,7 +1073,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @throws InvalidMapperException Throws this exception if the mapper in the has many relation is invalid * @throws InvalidMapperException Throws this exception if the mapper in the has many relation is invalid
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function updateHasManyArray(array &$obj, $objId, int $relations = RelationType::ALL, $depth = 1) : void private static function updateHasManyArray(array &$obj, $objId, int $relations = RelationType::ALL, $depth = 1) : void
{ {
@ -1136,7 +1136,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function updateRelationTable(array $objsIds, $objId) private static function updateRelationTable(array $objsIds, $objId)
{ {
@ -1165,7 +1165,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function deleteRelationTable(string $propertyName, array $objsIds, $objId) private static function deleteRelationTable(string $propertyName, array $objsIds, $objId)
{ {
@ -1199,7 +1199,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function updateOwnsOne(string $propertyName, object $obj, int $relations = RelationType::ALL, int $depth = 1) private static function updateOwnsOne(string $propertyName, object $obj, int $relations = RelationType::ALL, int $depth = 1)
{ {
@ -1223,7 +1223,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function updateOwnsOneArray(string $propertyName, array $obj, int $relations = RelationType::ALL, int $depth = 1) private static function updateOwnsOneArray(string $propertyName, array $obj, int $relations = RelationType::ALL, int $depth = 1)
{ {
@ -1247,7 +1247,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function updateBelongsTo(string $propertyName, $obj, int $relations = RelationType::ALL, int $depth = 1) private static function updateBelongsTo(string $propertyName, $obj, int $relations = RelationType::ALL, int $depth = 1)
{ {
@ -1273,7 +1273,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function updateBelongsToArray(string $propertyName, $obj, int $relations = RelationType::ALL, int $depth = 1) private static function updateBelongsToArray(string $propertyName, $obj, int $relations = RelationType::ALL, int $depth = 1)
{ {
@ -1298,7 +1298,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function updateModel(object $obj, $objId, \ReflectionClass $refClass = null, int $relations = RelationType::ALL, int $depth = 1) : void private static function updateModel(object $obj, $objId, \ReflectionClass $refClass = null, int $relations = RelationType::ALL, int $depth = 1) : void
{ {
@ -1407,7 +1407,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function updateModelArray(array $obj, $objId, int $relations = RelationType::ALL, int $depth = 1) : void private static function updateModelArray(array $obj, $objId, int $relations = RelationType::ALL, int $depth = 1) : void
{ {
@ -1463,7 +1463,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function updateConditionalsArray(array $obj, $objId, int $relations = RelationType::ALL, int $depth = 1) : void private static function updateConditionalsArray(array $obj, $objId, int $relations = RelationType::ALL, int $depth = 1) : void
{ {
@ -1504,7 +1504,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function update($obj, int $relations = RelationType::ALL, int $depth = 1) public static function update($obj, int $relations = RelationType::ALL, int $depth = 1)
{ {
@ -1547,7 +1547,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function updateArray(array &$obj, int $relations = RelationType::ALL, int $depth = 1) public static function updateArray(array &$obj, int $relations = RelationType::ALL, int $depth = 1)
{ {
@ -1595,7 +1595,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @throws InvalidMapperException Throws this exception if the mapper in the has many relation is invalid * @throws InvalidMapperException Throws this exception if the mapper in the has many relation is invalid
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function deleteHasMany(\ReflectionClass $refClass, object $obj, $objId, int $relations) : void private static function deleteHasMany(\ReflectionClass $refClass, object $obj, $objId, int $relations) : void
{ {
@ -1664,7 +1664,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function deleteOwnsOne(string $propertyName, $obj) private static function deleteOwnsOne(string $propertyName, $obj)
{ {
@ -1689,7 +1689,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function deleteBelongsTo(string $propertyName, $obj) private static function deleteBelongsTo(string $propertyName, $obj)
{ {
@ -1732,7 +1732,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function deleteModel(object $obj, $objId, int $relations = RelationType::REFERENCE, \ReflectionClass $refClass = null) : void private static function deleteModel(object $obj, $objId, int $relations = RelationType::REFERENCE, \ReflectionClass $refClass = null) : void
{ {
@ -1787,7 +1787,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function delete($obj, int $relations = RelationType::REFERENCE) public static function delete($obj, int $relations = RelationType::REFERENCE)
{ {
@ -1825,7 +1825,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function populateIterable(array $result) : array public static function populateIterable(array $result) : array
{ {
@ -1849,7 +1849,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function populateIterableArray(array $result) : array public static function populateIterableArray(array $result) : array
{ {
@ -1874,7 +1874,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function populate(array $result, $obj = null) public static function populate(array $result, $obj = null)
{ {
@ -1906,7 +1906,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function populateManyToMany(array $result, &$obj, int $depth = 3) : void public static function populateManyToMany(array $result, &$obj, int $depth = 3) : void
{ {
@ -1942,7 +1942,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function populateManyToManyArray(array $result, array &$obj, int $depth = 3) : void public static function populateManyToManyArray(array $result, array &$obj, int $depth = 3) : void
{ {
@ -1967,7 +1967,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @todo accept reflection class as parameter * @todo accept reflection class as parameter
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function populateOwnsOne(&$obj, int $depth = 3) : void public static function populateOwnsOne(&$obj, int $depth = 3) : void
{ {
@ -2012,7 +2012,7 @@ class DataMapperAbstract implements DataMapperInterface
* @todo accept reflection class as parameter * @todo accept reflection class as parameter
* @todo do this in the getRaw() part as a join. check if has conditionals and then join the data an then everything can be done in the getModel function. * @todo do this in the getRaw() part as a join. check if has conditionals and then join the data an then everything can be done in the getModel function.
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getConditionals($key, string $table) : array public static function getConditionals($key, string $table) : array
{ {
@ -2046,7 +2046,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @todo accept reflection class as parameter * @todo accept reflection class as parameter
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function populateOwnsOneArray(array &$obj, int $depth = 3) : void public static function populateOwnsOneArray(array &$obj, int $depth = 3) : void
{ {
@ -2070,7 +2070,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @todo accept reflection class as parameter * @todo accept reflection class as parameter
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function populateBelongsTo(&$obj, int $depth = 3) : void public static function populateBelongsTo(&$obj, int $depth = 3) : void
{ {
@ -2115,7 +2115,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @todo accept reflection class as parameter * @todo accept reflection class as parameter
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function populateBelongsToArray(array &$obj, int $depth = 3) : void public static function populateBelongsToArray(array &$obj, int $depth = 3) : void
{ {
@ -2139,7 +2139,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @throws \UnexpectedValueException * @throws \UnexpectedValueException
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function populateAbstract(array $result, $obj, array $columns) public static function populateAbstract(array $result, $obj, array $columns)
{ {
@ -2220,7 +2220,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function populateAbstractArray(array $result, array $obj, array $columns) : array public static function populateAbstractArray(array $result, array $obj, array $columns) : array
{ {
@ -2261,7 +2261,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @todo: implement language * @todo: implement language
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function get($primaryKey, int $relations = RelationType::ALL, $fill = null, int $depth = 3) public static function get($primaryKey, int $relations = RelationType::ALL, $fill = null, int $depth = 3)
{ {
@ -2320,7 +2320,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function getNullModelObj() private static function getNullModelObj()
{ {
@ -2343,7 +2343,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getArray($primaryKey, int $relations = RelationType::ALL, int $depth = 3) : array public static function getArray($primaryKey, int $relations = RelationType::ALL, int $depth = 3) : array
{ {
@ -2388,7 +2388,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getFor($refKey, string $ref, int $relations = RelationType::ALL, $fill = null, int $depth = 3) public static function getFor($refKey, string $ref, int $relations = RelationType::ALL, $fill = null, int $depth = 3)
{ {
@ -2438,7 +2438,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getForArray($refKey, string $ref, int $relations = RelationType::ALL, int $depth = 3) public static function getForArray($refKey, string $ref, int $relations = RelationType::ALL, int $depth = 3)
{ {
@ -2475,7 +2475,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getAll(int $relations = RelationType::ALL, int $depth = 3, string $lang = '') : array public static function getAll(int $relations = RelationType::ALL, int $depth = 3, string $lang = '') : array
{ {
@ -2503,7 +2503,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getAllArray(int $relations = RelationType::ALL, int $depth = 3, string $lang = '') : array public static function getAllArray(int $relations = RelationType::ALL, int $depth = 3, string $lang = '') : array
{ {
@ -2529,7 +2529,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function listResults(Builder $query) : array public static function listResults(Builder $query) : array
{ {
@ -2558,7 +2558,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getNewest(int $limit = 1, Builder $query = null, int $relations = RelationType::ALL, int $depth = 3, string $lang = '') : array public static function getNewest(int $limit = 1, Builder $query = null, int $relations = RelationType::ALL, int $depth = 3, string $lang = '') : array
{ {
@ -2603,7 +2603,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getAllByQuery(Builder $query, int $relations = RelationType::ALL, int $depth = 3) : array public static function getAllByQuery(Builder $query, int $relations = RelationType::ALL, int $depth = 3) : array
{ {
@ -2633,7 +2633,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getRandom(int $amount = 1, int $relations = RelationType::ALL, int $depth = 3) public static function getRandom(int $amount = 1, int $relations = RelationType::ALL, int $depth = 3)
{ {
@ -2662,7 +2662,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function fillRelations(array &$obj, int $relations = RelationType::ALL, int $depth = 3) : void public static function fillRelations(array &$obj, int $relations = RelationType::ALL, int $depth = 3) : void
{ {
@ -2714,7 +2714,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function fillRelationsArray(array &$obj, int $relations = RelationType::ALL, int $depth = 3) : void public static function fillRelationsArray(array &$obj, int $relations = RelationType::ALL, int $depth = 3) : void
{ {
@ -2768,7 +2768,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getRaw($primaryKey) : array public static function getRaw($primaryKey) : array
{ {
@ -2791,7 +2791,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPrimaryKeysBy($refKey, string $ref) : array public static function getPrimaryKeysBy($refKey, string $ref) : array
{ {
@ -2820,7 +2820,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getHasManyPrimaryKeys($refKey, string $ref) : array public static function getHasManyPrimaryKeys($refKey, string $ref) : array
{ {
@ -2848,7 +2848,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getAllRaw(string $lang = '') : array public static function getAllRaw(string $lang = '') : array
{ {
@ -2874,7 +2874,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getHasManyRaw($primaryKey, int $relations = RelationType::ALL) : array public static function getHasManyRaw($primaryKey, int $relations = RelationType::ALL) : array
{ {
@ -2923,7 +2923,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getQuery(Builder $query = null) : Builder public static function getQuery(Builder $query = null) : Builder
{ {
@ -2940,7 +2940,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getCreatedAt() : string public static function getCreatedAt() : string
{ {
@ -2956,7 +2956,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getByRequest(RequestAbstract $request) public static function getByRequest(RequestAbstract $request)
{ {
@ -3001,7 +3001,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function addInitialized(string $mapper, $id, object $obj = null) : void private static function addInitialized(string $mapper, $id, object $obj = null) : void
{ {
@ -3021,7 +3021,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function addInitializedArray(string $mapper, $id, array $obj = null) : void private static function addInitializedArray(string $mapper, $id, array $obj = null) : void
{ {
@ -3040,7 +3040,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function isInitialized(string $mapper, $id) : bool private static function isInitialized(string $mapper, $id) : bool
{ {
@ -3055,7 +3055,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function isInitializedArray(string $mapper, $id) : bool private static function isInitializedArray(string $mapper, $id) : bool
{ {
@ -3070,7 +3070,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function getInitialized(string $mapper, $id) private static function getInitialized(string $mapper, $id)
{ {
@ -3085,7 +3085,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function getInitializedArray(string $mapper, $id) private static function getInitializedArray(string $mapper, $id)
{ {
@ -3100,7 +3100,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function removeInitialized(string $mapper, $id) private static function removeInitialized(string $mapper, $id)
{ {
@ -3122,7 +3122,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @throws \Exception Throws this exception if the member couldn't be found * @throws \Exception Throws this exception if the member couldn't be found
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function getColumnByMember(string $name) : string private static function getColumnByMember(string $name) : string
{ {
@ -3142,7 +3142,7 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function isNullObject($obj) : bool private static function isNullObject($obj) : bool
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Database * @package phpOMS\DataStorage\Database
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\DataStorage\Database\Schema\Exception\TableException;
/** /**
* Database exception factory. * Database exception factory.
* *
* @package phpOMS\DataStorage\Database * @package phpOMS\DataStorage\Database
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class DatabaseExceptionFactory class DatabaseExceptionFactory
{ {
@ -33,7 +33,7 @@ class DatabaseExceptionFactory
* *
* @return string Returns exception namespace/class * @return string Returns exception namespace/class
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function createException(\PDOException $e) : string public static function createException(\PDOException $e) : string
{ {
@ -52,7 +52,7 @@ class DatabaseExceptionFactory
* *
* @return string Returns exception pessage * @return string Returns exception pessage
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function createExceptionMessage(\PDOException $e) : string public static function createExceptionMessage(\PDOException $e) : string
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Database * @package phpOMS\DataStorage\Database
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -22,10 +22,10 @@ use phpOMS\DataStorage\DataStoragePoolInterface;
/** /**
* Database pool handler. * Database pool handler.
* *
* @package phpOMS\DataStorage\Database * @package phpOMS\DataStorage\Database
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class DatabasePool implements DataStoragePoolInterface final class DatabasePool implements DataStoragePoolInterface
{ {
@ -33,7 +33,7 @@ final class DatabasePool implements DataStoragePoolInterface
/** /**
* Databases. * Databases.
* *
* @var DataStorageConnectionInterface[] * @var DataStorageConnectionInterface[]
* @since 1.0.0 * @since 1.0.0
*/ */
private array $pool = []; private array $pool = [];
@ -41,7 +41,7 @@ final class DatabasePool implements DataStoragePoolInterface
/** /**
* Constructor. * Constructor.
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __construct() public function __construct()
{ {
@ -55,7 +55,7 @@ final class DatabasePool implements DataStoragePoolInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function add(string $key, DataStorageConnectionInterface $db) : bool public function add(string $key, DataStorageConnectionInterface $db) : bool
{ {
@ -75,7 +75,7 @@ final class DatabasePool implements DataStoragePoolInterface
* *
* @return DataStorageConnectionInterface * @return DataStorageConnectionInterface
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function get(string $key = '') : DataStorageConnectionInterface public function get(string $key = '') : DataStorageConnectionInterface
{ {
@ -97,7 +97,7 @@ final class DatabasePool implements DataStoragePoolInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function remove(string $key) : bool public function remove(string $key) : bool
{ {
@ -118,7 +118,7 @@ final class DatabasePool implements DataStoragePoolInterface
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function create(string $key, array $config) : bool public function create(string $key, array $config) : bool
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Database * @package phpOMS\DataStorage\Database
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -21,10 +21,10 @@ use phpOMS\Stdlib\Base\Enum;
* *
* Possible database connection status * Possible database connection status
* *
* @package phpOMS\DataStorage\Database * @package phpOMS\DataStorage\Database
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
abstract class DatabaseStatus extends Enum abstract class DatabaseStatus extends Enum
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Database * @package phpOMS\DataStorage\Database
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -21,10 +21,10 @@ use phpOMS\Stdlib\Base\Enum;
* *
* Database types that are supported by the application * Database types that are supported by the application
* *
* @package phpOMS\DataStorage\Database * @package phpOMS\DataStorage\Database
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
abstract class DatabaseType extends Enum abstract class DatabaseType extends Enum
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Database\Exception * @package phpOMS\DataStorage\Database\Exception
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\DataStorage\Database\Exception;
/** /**
* Permission exception class. * Permission exception class.
* *
* @package phpOMS\DataStorage\Database\Exception * @package phpOMS\DataStorage\Database\Exception
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class InvalidConnectionConfigException extends \InvalidArgumentException final class InvalidConnectionConfigException extends \InvalidArgumentException
{ {
@ -31,7 +31,7 @@ final class InvalidConnectionConfigException extends \InvalidArgumentException
* @param int $code Exception code * @param int $code Exception code
* @param \Exception $previous Previous exception * @param \Exception $previous Previous exception
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __construct(string $message = '', int $code = 0, \Exception $previous = null) public function __construct(string $message = '', int $code = 0, \Exception $previous = null)
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Database\Exception * @package phpOMS\DataStorage\Database\Exception
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\DataStorage\Database\Exception;
/** /**
* Permission exception class. * Permission exception class.
* *
* @package phpOMS\DataStorage\Database\Exception * @package phpOMS\DataStorage\Database\Exception
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class InvalidDatabaseTypeException extends \InvalidArgumentException final class InvalidDatabaseTypeException extends \InvalidArgumentException
{ {
@ -31,7 +31,7 @@ final class InvalidDatabaseTypeException extends \InvalidArgumentException
* @param int $code Exception code * @param int $code Exception code
* @param \Exception $previous Previous exception * @param \Exception $previous Previous exception
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __construct(string $message = '', int $code = 0, \Exception $previous = null) public function __construct(string $message = '', int $code = 0, \Exception $previous = null)
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Database\Exception * @package phpOMS\DataStorage\Database\Exception
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\DataStorage\Database\Exception;
/** /**
* Permission exception class. * Permission exception class.
* *
* @package phpOMS\DataStorage\Database\Exception * @package phpOMS\DataStorage\Database\Exception
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class InvalidMapperException extends \RuntimeException final class InvalidMapperException extends \RuntimeException
{ {
@ -31,7 +31,7 @@ final class InvalidMapperException extends \RuntimeException
* @param int $code Exception code * @param int $code Exception code
* @param \Exception $previous Previous exception * @param \Exception $previous Previous exception
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __construct(string $message = '', int $code = 0, \Exception $previous = null) public function __construct(string $message = '', int $code = 0, \Exception $previous = null)
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Database * @package phpOMS\DataStorage\Database
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -19,17 +19,17 @@ use phpOMS\DataStorage\Database\Query\QueryType;
/** /**
* Grammar. * Grammar.
* *
* @package phpOMS\DataStorage\Database * @package phpOMS\DataStorage\Database
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
abstract class GrammarAbstract abstract class GrammarAbstract
{ {
/** /**
* Comment style. * Comment style.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected string $comment = '--'; protected string $comment = '--';
@ -37,7 +37,7 @@ abstract class GrammarAbstract
/** /**
* String quotes style. * String quotes style.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected string $valueQuotes = '\''; protected string $valueQuotes = '\'';
@ -45,7 +45,7 @@ abstract class GrammarAbstract
/** /**
* System identifier. * System identifier.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected string $systemIdentifier = '"'; protected string $systemIdentifier = '"';
@ -53,7 +53,7 @@ abstract class GrammarAbstract
/** /**
* And operator. * And operator.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected string $and = 'AND'; protected string $and = 'AND';
@ -61,7 +61,7 @@ abstract class GrammarAbstract
/** /**
* Or operator. * Or operator.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected string $or = 'OR'; protected string $or = 'OR';
@ -69,7 +69,7 @@ abstract class GrammarAbstract
/** /**
* Table prefix. * Table prefix.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected string $tablePrefix = ''; protected string $tablePrefix = '';
@ -77,7 +77,7 @@ abstract class GrammarAbstract
/** /**
* Special keywords. * Special keywords.
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
protected array $specialKeywords = [ protected array $specialKeywords = [
@ -91,7 +91,7 @@ abstract class GrammarAbstract
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function compileQuery(BuilderAbstract $query) : string public function compileQuery(BuilderAbstract $query) : string
{ {
@ -116,7 +116,7 @@ abstract class GrammarAbstract
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
* *
* @since 1.0.0 * @since 1.0.0
*/ */
protected function compileComponents(BuilderAbstract $query) : array protected function compileComponents(BuilderAbstract $query) : array
{ {
@ -147,7 +147,7 @@ abstract class GrammarAbstract
* *
* @throws \InvalidArgumentException Throws this exception if the query type is undefined * @throws \InvalidArgumentException Throws this exception if the query type is undefined
* *
* @since 1.0.0 * @since 1.0.0
*/ */
abstract protected function getComponents(int $type) : array; abstract protected function getComponents(int $type) : array;
@ -156,7 +156,7 @@ abstract class GrammarAbstract
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getDateFormat() : string public function getDateFormat() : string
{ {
@ -168,7 +168,7 @@ abstract class GrammarAbstract
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getTablePrefix() : string public function getTablePrefix() : string
{ {
@ -182,7 +182,7 @@ abstract class GrammarAbstract
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setTablePrefix(string $prefix) : void public function setTablePrefix(string $prefix) : void
{ {
@ -198,7 +198,7 @@ abstract class GrammarAbstract
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
protected function expressionizeTableColumn(array $elements, string $prefix = '', bool $column = true) : string protected function expressionizeTableColumn(array $elements, string $prefix = '', bool $column = true) : string
{ {
@ -232,7 +232,7 @@ abstract class GrammarAbstract
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
protected function compileSystem(string $system, string $prefix = '') : string protected function compileSystem(string $system, string $prefix = '') : string
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Database\Query * @package phpOMS\DataStorage\Database\Query
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -20,17 +20,17 @@ use phpOMS\DataStorage\Database\Connection\ConnectionAbstract;
/** /**
* Database query builder. * Database query builder.
* *
* @package phpOMS\DataStorage\Database\Query * @package phpOMS\DataStorage\Database\Query
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class Builder extends BuilderAbstract class Builder extends BuilderAbstract
{ {
/** /**
* Is read only. * Is read only.
* *
* @var bool * @var bool
* @since 1.0.0 * @since 1.0.0
*/ */
protected bool $isReadOnly = false; protected bool $isReadOnly = false;
@ -38,7 +38,7 @@ class Builder extends BuilderAbstract
/** /**
* Columns. * Columns.
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
public array $selects = []; public array $selects = [];
@ -46,7 +46,7 @@ class Builder extends BuilderAbstract
/** /**
* Columns. * Columns.
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
public array $updates = []; public array $updates = [];
@ -54,7 +54,7 @@ class Builder extends BuilderAbstract
/** /**
* Stupid work around because value needs to be not null for it to work in Grammar. * Stupid work around because value needs to be not null for it to work in Grammar.
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
public array $deletes = [1]; public array $deletes = [1];
@ -62,7 +62,7 @@ class Builder extends BuilderAbstract
/** /**
* Into. * Into.
* *
* @var \Closure|string * @var \Closure|string
* @since 1.0.0 * @since 1.0.0
*/ */
public $into = null; public $into = null;
@ -70,7 +70,7 @@ class Builder extends BuilderAbstract
/** /**
* Into columns. * Into columns.
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
public array $inserts = []; public array $inserts = [];
@ -78,7 +78,7 @@ class Builder extends BuilderAbstract
/** /**
* Into columns. * Into columns.
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
public array $values = []; public array $values = [];
@ -86,7 +86,7 @@ class Builder extends BuilderAbstract
/** /**
* Into columns. * Into columns.
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
public array $sets = []; public array $sets = [];
@ -94,7 +94,7 @@ class Builder extends BuilderAbstract
/** /**
* Distinct. * Distinct.
* *
* @var bool * @var bool
* @since 1.0.0 * @since 1.0.0
*/ */
public bool $distinct = false; public bool $distinct = false;
@ -102,7 +102,7 @@ class Builder extends BuilderAbstract
/** /**
* From. * From.
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
public array $from = []; public array $from = [];
@ -110,7 +110,7 @@ class Builder extends BuilderAbstract
/** /**
* Joins. * Joins.
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
public array $joins = []; public array $joins = [];
@ -118,7 +118,7 @@ class Builder extends BuilderAbstract
/** /**
* Ons of joins. * Ons of joins.
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
public array $ons = []; public array $ons = [];
@ -126,7 +126,7 @@ class Builder extends BuilderAbstract
/** /**
* Where. * Where.
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
public array $wheres = []; public array $wheres = [];
@ -134,7 +134,7 @@ class Builder extends BuilderAbstract
/** /**
* Group. * Group.
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
public array $groups = []; public array $groups = [];
@ -142,7 +142,7 @@ class Builder extends BuilderAbstract
/** /**
* Order. * Order.
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
public array $orders = []; public array $orders = [];
@ -150,7 +150,7 @@ class Builder extends BuilderAbstract
/** /**
* Limit. * Limit.
* *
* @var null|int * @var null|int
* @since 1.0.0 * @since 1.0.0
*/ */
public ?int $limit = null; public ?int $limit = null;
@ -158,7 +158,7 @@ class Builder extends BuilderAbstract
/** /**
* Offset. * Offset.
* *
* @var null|int * @var null|int
* @since 1.0.0 * @since 1.0.0
*/ */
public ?int $offset = null; public ?int $offset = null;
@ -166,7 +166,7 @@ class Builder extends BuilderAbstract
/** /**
* Binds. * Binds.
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
private array $binds = []; private array $binds = [];
@ -174,7 +174,7 @@ class Builder extends BuilderAbstract
/** /**
* Union. * Union.
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
public array $unions = []; public array $unions = [];
@ -182,7 +182,7 @@ class Builder extends BuilderAbstract
/** /**
* Lock. * Lock.
* *
* @var bool * @var bool
* @since 1.0.0 * @since 1.0.0
*/ */
public bool $lock = false; public bool $lock = false;
@ -190,7 +190,7 @@ class Builder extends BuilderAbstract
/** /**
* Comparison OPERATORS. * Comparison OPERATORS.
* *
* @var string[] * @var string[]
* @since 1.0.0 * @since 1.0.0
*/ */
public const OPERATORS = [ public const OPERATORS = [
@ -229,7 +229,7 @@ class Builder extends BuilderAbstract
* @param ConnectionAbstract $connection Database connection * @param ConnectionAbstract $connection Database connection
* @param bool $readOnly Query is read only * @param bool $readOnly Query is read only
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __construct(ConnectionAbstract $connection, bool $readOnly = false) public function __construct(ConnectionAbstract $connection, bool $readOnly = false)
{ {
@ -244,7 +244,7 @@ class Builder extends BuilderAbstract
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setConnection(ConnectionAbstract $connection) : void public function setConnection(ConnectionAbstract $connection) : void
{ {
@ -261,7 +261,7 @@ class Builder extends BuilderAbstract
* *
* @todo Closure is not working this way, needs to be evaluated befor assigning * @todo Closure is not working this way, needs to be evaluated befor assigning
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function select(...$columns) : self public function select(...$columns) : self
{ {
@ -287,7 +287,7 @@ class Builder extends BuilderAbstract
* *
* @todo Closure is not working this way, needs to be evaluated befor assigning * @todo Closure is not working this way, needs to be evaluated befor assigning
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function random(...$columns) : self public function random(...$columns) : self
{ {
@ -305,7 +305,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function bind($binds) : self public function bind($binds) : self
{ {
@ -325,7 +325,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function newQuery() : self public function newQuery() : self
{ {
@ -337,7 +337,7 @@ class Builder extends BuilderAbstract
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function toSql() : string public function toSql() : string
{ {
@ -353,7 +353,7 @@ class Builder extends BuilderAbstract
* *
* @throws \Exception * @throws \Exception
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function raw(string $raw) : self public function raw(string $raw) : self
{ {
@ -375,7 +375,7 @@ class Builder extends BuilderAbstract
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function isValidReadOnly($raw) : bool private function isValidReadOnly($raw) : bool
{ {
@ -403,7 +403,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function selectRaw($expression) : self public function selectRaw($expression) : self
{ {
@ -417,7 +417,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function distinct() : self public function distinct() : self
{ {
@ -433,7 +433,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function from(...$tables) : self public function from(...$tables) : self
{ {
@ -455,7 +455,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function fromRaw($expression) : self public function fromRaw($expression) : self
{ {
@ -476,7 +476,7 @@ class Builder extends BuilderAbstract
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function where($columns, $operator = null, $values = null, $boolean = 'and') : self public function where($columns, $operator = null, $values = null, $boolean = 'and') : self
{ {
@ -516,7 +516,7 @@ class Builder extends BuilderAbstract
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getWhereByColumn($column) : ?array public function getWhereByColumn($column) : ?array
{ {
@ -532,7 +532,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function andWhere($where, $operator = null, $values = null) : self public function andWhere($where, $operator = null, $values = null) : self
{ {
@ -548,7 +548,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function orWhere($where, $operator = null, $values = null) : self public function orWhere($where, $operator = null, $values = null) : self
{ {
@ -564,7 +564,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function whereIn($column, $values = null, string $boolean = 'and') : self public function whereIn($column, $values = null, string $boolean = 'and') : self
{ {
@ -581,7 +581,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function whereNull($column, string $boolean = 'and') : self public function whereNull($column, string $boolean = 'and') : self
{ {
@ -598,7 +598,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function whereNotNull($column, string $boolean = 'and') : self public function whereNotNull($column, string $boolean = 'and') : self
{ {
@ -614,7 +614,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function groupBy(...$columns) : self public function groupBy(...$columns) : self
{ {
@ -636,7 +636,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function newest($column) : self public function newest($column) : self
{ {
@ -652,7 +652,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function oldest($column) : self public function oldest($column) : self
{ {
@ -669,7 +669,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function orderBy($columns, $order = 'DESC') : self public function orderBy($columns, $order = 'DESC') : self
{ {
@ -701,7 +701,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function offset(int $offset) : self public function offset(int $offset) : self
{ {
@ -717,7 +717,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function limit(int $limit) : self public function limit(int $limit) : self
{ {
@ -733,7 +733,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function union($query) : self public function union($query) : self
{ {
@ -751,7 +751,7 @@ class Builder extends BuilderAbstract
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function lock() : void public function lock() : void
{ {
@ -762,7 +762,7 @@ class Builder extends BuilderAbstract
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function lockUpdate() : void public function lockUpdate() : void
{ {
@ -773,7 +773,7 @@ class Builder extends BuilderAbstract
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __toString() public function __toString()
{ {
@ -785,7 +785,7 @@ class Builder extends BuilderAbstract
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function find() : void public function find() : void
{ {
@ -798,7 +798,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function count(string $table = '*') : self public function count(string $table = '*') : self
{ {
@ -811,7 +811,7 @@ class Builder extends BuilderAbstract
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function min() : void public function min() : void
{ {
@ -822,7 +822,7 @@ class Builder extends BuilderAbstract
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function max() : void public function max() : void
{ {
@ -833,7 +833,7 @@ class Builder extends BuilderAbstract
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function sum() : void public function sum() : void
{ {
@ -844,7 +844,7 @@ class Builder extends BuilderAbstract
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function avg() : void public function avg() : void
{ {
@ -859,7 +859,7 @@ class Builder extends BuilderAbstract
* *
* @throws \Exception * @throws \Exception
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function insert(...$columns) : self public function insert(...$columns) : self
{ {
@ -883,7 +883,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function into($table) : self public function into($table) : self
{ {
@ -899,7 +899,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function values(...$values) : self public function values(...$values) : self
{ {
@ -913,7 +913,7 @@ class Builder extends BuilderAbstract
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getValues() : array public function getValues() : array
{ {
@ -927,7 +927,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function value($value) : self public function value($value) : self
{ {
@ -952,7 +952,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function sets(...$sets) : self public function sets(...$sets) : self
{ {
@ -968,7 +968,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function set($set) : self public function set($set) : self
{ {
@ -986,7 +986,7 @@ class Builder extends BuilderAbstract
* *
* @throws \Exception * @throws \Exception
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function update(...$tables) : self public function update(...$tables) : self
{ {
@ -1012,7 +1012,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function delete() : self public function delete() : self
{ {
@ -1030,7 +1030,7 @@ class Builder extends BuilderAbstract
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function increment() : void public function increment() : void
{ {
@ -1041,7 +1041,7 @@ class Builder extends BuilderAbstract
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function decrement() : void public function decrement() : void
{ {
@ -1052,7 +1052,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function join($table, string $type = JoinType::JOIN) : self public function join($table, string $type = JoinType::JOIN) : self
{ {
@ -1070,7 +1070,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function leftJoin($column) : self public function leftJoin($column) : self
{ {
@ -1082,7 +1082,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function leftOuterJoin($column) : self public function leftOuterJoin($column) : self
{ {
@ -1094,7 +1094,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function leftInnerJoin($column) : self public function leftInnerJoin($column) : self
{ {
@ -1106,7 +1106,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function rightJoin($column) : self public function rightJoin($column) : self
{ {
@ -1118,7 +1118,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function rightOuterJoin($column) : self public function rightOuterJoin($column) : self
{ {
@ -1130,7 +1130,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function rightInnerJoin($column) : self public function rightInnerJoin($column) : self
{ {
@ -1142,7 +1142,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function outerJoin($column) : self public function outerJoin($column) : self
{ {
@ -1154,7 +1154,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function innerJoin($column) : self public function innerJoin($column) : self
{ {
@ -1166,7 +1166,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function crossJoin($column) : self public function crossJoin($column) : self
{ {
@ -1178,7 +1178,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function fullJoin($column) : self public function fullJoin($column) : self
{ {
@ -1190,7 +1190,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function fullOuterJoin($column) : self public function fullOuterJoin($column) : self
{ {
@ -1202,7 +1202,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function rollback() : self public function rollback() : self
{ {
@ -1214,7 +1214,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function on($columns, $operator = null, $values = null, $boolean = 'and') : self public function on($columns, $operator = null, $values = null, $boolean = 'and') : self
{ {
@ -1255,7 +1255,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function orOn($columns, $operator = null, $values = null) : self public function orOn($columns, $operator = null, $values = null) : self
{ {
@ -1267,7 +1267,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function andOn($columns, $operator = null, $values = null) : self public function andOn($columns, $operator = null, $values = null) : self
{ {
@ -1283,7 +1283,7 @@ class Builder extends BuilderAbstract
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function merge(self $query) : self public function merge(self $query) : self
{ {
@ -1295,7 +1295,7 @@ class Builder extends BuilderAbstract
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function execute() public function execute()
{ {
@ -1321,7 +1321,7 @@ class Builder extends BuilderAbstract
* *
* @throws \Exception * @throws \Exception
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getBindParamType($value) : int public static function getBindParamType($value) : int
{ {
@ -1343,7 +1343,7 @@ class Builder extends BuilderAbstract
* *
* @throws \Exception * @throws \Exception
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getPublicColumnName($column) : string public static function getPublicColumnName($column) : string
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package phpOMS\DataStorage\Database\Query * @package phpOMS\DataStorage\Database\Query
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\DataStorage\Database\Query;
/** /**
* Database query builder. * Database query builder.
* *
* @package phpOMS\DataStorage\Database\Query * @package phpOMS\DataStorage\Database\Query
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class Column class Column
{ {
@ -28,7 +28,7 @@ class Column
/** /**
* Column name. * Column name.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
private string $column = ''; private string $column = '';
@ -38,7 +38,7 @@ class Column
* *
* @param string $column Column * @param string $column Column
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function __construct(string $column) public function __construct(string $column)
{ {
@ -50,7 +50,7 @@ class Column
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getColumn() : string public function getColumn() : string
{ {

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package TBD * @package TBD
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);

Some files were not shown because too many files have changed in this diff Show More