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
*.php ident
# Force the following filetypes to have unix eols, so Windows does not break them
*.php text eol=lf

View File

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

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package phpOMS\Account
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package phpOMS\Account
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -22,10 +22,10 @@ use phpOMS\DataStorage\Session\SessionInterface;
*
* The account manager is used to manage accounts.
*
* @package phpOMS\Account
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package phpOMS\Account
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class AccountManager implements \Countable
{
@ -33,7 +33,7 @@ final class AccountManager implements \Countable
/**
* Accounts.
*
* @var Account[]
* @var Account[]
* @since 1.0.0
*/
private array $accounts = [];
@ -41,7 +41,7 @@ final class AccountManager implements \Countable
/**
* Session.
*
* @var SessionInterface
* @var SessionInterface
* @since 1.0.0
*/
private SessionInterface $session;
@ -51,7 +51,7 @@ final class AccountManager implements \Countable
*
* @param SessionInterface $session Session
*
* @since 1.0.0
* @since 1.0.0
*/
public function __construct(SessionInterface $session)
{
@ -65,7 +65,7 @@ final class AccountManager implements \Countable
*
* @return Account
*
* @since 1.0.0
* @since 1.0.0
*/
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
*
* @since 1.0.0
* @since 1.0.0
*/
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
*
* @since 1.0.0
* @since 1.0.0
*/
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)
*
* @since 1.0.0
* @since 1.0.0
*/
public function count() : int
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package phpOMS\Account
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package phpOMS\Account
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
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
* abstract class and can be used directly if needed.
*
* @package phpOMS\Account
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package phpOMS\Account
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class PermissionAbstract implements \JsonSerializable
{
/**
* Permission id.
*
* @var int
* @var int
* @since 1.0.0
*/
protected int $id = 0;
@ -38,7 +38,7 @@ class PermissionAbstract implements \JsonSerializable
/**
* Unit id.
*
* @var null|int
* @var null|int
* @since 1.0.0
*/
protected ?int $unit = null;
@ -46,7 +46,7 @@ class PermissionAbstract implements \JsonSerializable
/**
* App name.
*
* @var null|string
* @var null|string
* @since 1.0.0
*/
protected ?string $app = null;
@ -54,7 +54,7 @@ class PermissionAbstract implements \JsonSerializable
/**
* Module id.
*
* @var null|string
* @var null|string
* @since 1.0.0
*/
protected ?string $module = null;
@ -62,7 +62,7 @@ class PermissionAbstract implements \JsonSerializable
/**
* Providing module id.
*
* @var int
* @var int
* @since 1.0.0
*/
protected int $from = 0;
@ -70,7 +70,7 @@ class PermissionAbstract implements \JsonSerializable
/**
* Type.
*
* @var null|int
* @var null|int
* @since 1.0.0
*/
protected ?int $type = null;
@ -78,7 +78,7 @@ class PermissionAbstract implements \JsonSerializable
/**
* Element id.
*
* @var null|int
* @var null|int
* @since 1.0.0
*/
protected ?int $element = null;
@ -86,7 +86,7 @@ class PermissionAbstract implements \JsonSerializable
/**
* Component id.
*
* @var null|int
* @var null|int
* @since 1.0.0
*/
protected ?int $component = null;
@ -94,7 +94,7 @@ class PermissionAbstract implements \JsonSerializable
/**
* Permission.
*
* @var int
* @var int
* @since 1.0.0
*/
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 int $permission Permission to check
*
* @since 1.0.0
* @since 1.0.0
*/
public function __construct(
int $unit = null,
@ -137,7 +137,7 @@ class PermissionAbstract implements \JsonSerializable
*
* @return int Retunrs the id of the permission
*
* @since 1.0.0
* @since 1.0.0
*/
public function getId() : int
{
@ -149,7 +149,7 @@ class PermissionAbstract implements \JsonSerializable
*
* @return null|int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getUnit() : ?int
{
@ -163,7 +163,7 @@ class PermissionAbstract implements \JsonSerializable
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setUnit(int $unit = null) : void
{
@ -175,7 +175,7 @@ class PermissionAbstract implements \JsonSerializable
*
* @return null|string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getApp() : ?string
{
@ -189,7 +189,7 @@ class PermissionAbstract implements \JsonSerializable
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setApp(string $app = null) : void
{
@ -201,7 +201,7 @@ class PermissionAbstract implements \JsonSerializable
*
* @return null|string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getModule() : ?string
{
@ -215,7 +215,7 @@ class PermissionAbstract implements \JsonSerializable
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
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
*
* @since 1.0.0
* @since 1.0.0
*/
public function getFrom() : int
{
@ -241,7 +241,7 @@ class PermissionAbstract implements \JsonSerializable
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setFrom(int $from = 0) : void
{
@ -253,7 +253,7 @@ class PermissionAbstract implements \JsonSerializable
*
* @return null|int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getType() : ?int
{
@ -267,7 +267,7 @@ class PermissionAbstract implements \JsonSerializable
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setType(int $type = null) : void
{
@ -279,7 +279,7 @@ class PermissionAbstract implements \JsonSerializable
*
* @return null|int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getElement() : ?int
{
@ -293,7 +293,7 @@ class PermissionAbstract implements \JsonSerializable
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setElement(int $element = null) : void
{
@ -305,7 +305,7 @@ class PermissionAbstract implements \JsonSerializable
*
* @return null|int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getComponent() : ?int
{
@ -319,7 +319,7 @@ class PermissionAbstract implements \JsonSerializable
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setComponent(int $component = null) : void
{
@ -331,7 +331,7 @@ class PermissionAbstract implements \JsonSerializable
*
* @return int Returns the permission (PermissionType)
*
* @since 1.0.0
* @since 1.0.0
*/
public function getPermission() : int
{
@ -345,7 +345,7 @@ class PermissionAbstract implements \JsonSerializable
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setPermission(int $permission = 0) : void
{
@ -359,7 +359,7 @@ class PermissionAbstract implements \JsonSerializable
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
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
*
* @since 1.0.0
* @since 1.0.0
*/
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
*
* @since 1.0.0
* @since 1.0.0
*/
public function hasPermission(
int $permission,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package phpOMS
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package phpOMS
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,17 +19,17 @@ namespace phpOMS;
/**
* Autoloader class.
*
* @package phpOMS
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package phpOMS
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class Autoloader
{
/**
* Base paths for autoloading
*
* @var string[]
* @var string[]
* @since 1.0.0
*/
private static $paths = [
@ -40,7 +40,7 @@ final class Autoloader
/**
* Constructor.
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
private function __construct()
@ -55,7 +55,7 @@ final class Autoloader
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
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.
*
* @since 1.0.0
* @since 1.0.0
*/
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
*
* @since 1.0.0
* @since 1.0.0
*/
public static function exists(string $class) : bool
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package phpOMS\Business\Marketing
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package phpOMS\Business\Marketing
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ namespace phpOMS\Business\Marketing;
*
* This class provided basic marketing metric calculations
*
* @package phpOMS\Business\Marketing
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package phpOMS\Business\Marketing
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class Metrics
{
@ -37,7 +37,7 @@ final class Metrics
*
* @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
{

View File

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

View File

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

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package phpOMS\Business\Sales
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package phpOMS\Business\Sales
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
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
* the rank based on a marketshare in a Zipf distributed market.
*
* @package phpOMS\Business\Sales
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package phpOMS\Business\Sales
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class MarketShareEstimation
{
@ -38,7 +38,7 @@ final class MarketShareEstimation
*
* @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
{
@ -61,7 +61,7 @@ final class MarketShareEstimation
*
* @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
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package phpOMS\DataStorage\Cache\Connection
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package phpOMS\DataStorage\Cache\Connection
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\DataStorage\Cache\CacheType;
/**
* Cache connection factory.
*
* @package phpOMS\DataStorage\Cache\Connection
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package phpOMS\DataStorage\Cache\Connection
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class ConnectionFactory
{
@ -30,7 +30,7 @@ class ConnectionFactory
/**
* Constructor.
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
private function __construct()
@ -46,7 +46,7 @@ class ConnectionFactory
*
* @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
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package phpOMS\DataStorage
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package phpOMS\DataStorage
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -17,10 +17,10 @@ namespace phpOMS\DataStorage;
/**
* Database connection interface.
*
* @package phpOMS\DataStorage
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package phpOMS\DataStorage
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
interface DataStorageConnectionInterface
{
@ -30,7 +30,7 @@ interface DataStorageConnectionInterface
*
* @return string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getPrefix() : string;
@ -45,7 +45,7 @@ interface DataStorageConnectionInterface
*
* @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;
@ -54,7 +54,7 @@ interface DataStorageConnectionInterface
*
* @return string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getType() : string;
@ -63,7 +63,7 @@ interface DataStorageConnectionInterface
*
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getStatus() : int;
@ -72,7 +72,7 @@ interface DataStorageConnectionInterface
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function close() : void;
}

View File

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

View File

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

View File

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

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package phpOMS\DataStorage\Database\Connection
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package phpOMS\DataStorage\Database\Connection
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\DataStorage\Database\DatabaseType;
/**
* Database connection factory.
*
* @package phpOMS\DataStorage\Database\Connection
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package phpOMS\DataStorage\Database\Connection
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class ConnectionFactory
{
@ -30,7 +30,7 @@ final class ConnectionFactory
/**
* Constructor.
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
private function __construct()
@ -48,7 +48,7 @@ final class ConnectionFactory
*
* @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
{

View File

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

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package phpOMS\DataStorage\Database\Connection
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package phpOMS\DataStorage\Database\Connection
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -26,10 +26,10 @@ use phpOMS\DataStorage\Database\Schema\Grammar\MysqlGrammar as MysqlSchemaGramma
* Handles the database connection.
* Implementing wrapper functions for multiple databases is planned (far away).
*
* @package phpOMS\DataStorage\Database\Connection
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package phpOMS\DataStorage\Database\Connection
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
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
*
* @since 1.0.0
* @since 1.0.0
*/
public function __construct(array $dbdata)
{

View File

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

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package phpOMS\DataStorage\Database\Connection
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package phpOMS\DataStorage\Database\Connection
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -26,10 +26,10 @@ use phpOMS\DataStorage\Database\Schema\Grammar\PostgresGrammar as PostgresSchema
* Handles the database connection.
* Implementing wrapper functions for multiple databases is planned (far away).
*
* @package phpOMS\DataStorage\Database\Connection
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package phpOMS\DataStorage\Database\Connection
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
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
*
* @since 1.0.0
* @since 1.0.0
*/
public function __construct(array $dbdata)
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package phpOMS\DataStorage\Database\Connection
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package phpOMS\DataStorage\Database\Connection
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -26,10 +26,10 @@ use phpOMS\DataStorage\Database\Schema\Grammar\SQLiteGrammar as SQLiteSchemaGram
* Handles the database connection.
* Implementing wrapper functions for multiple databases is planned (far away).
*
* @package phpOMS\DataStorage\Database\Connection
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package phpOMS\DataStorage\Database\Connection
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
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
*
* @since 1.0.0
* @since 1.0.0
*/
public function __construct(array $dbdata)
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package phpOMS\DataStorage\Database\Connection
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package phpOMS\DataStorage\Database\Connection
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -26,10 +26,10 @@ use phpOMS\DataStorage\Database\Schema\Grammar\MysqlGrammar as MysqlSchemaGramma
* Handles the database connection.
* Implementing wrapper functions for multiple databases is planned (far away).
*
* @package phpOMS\DataStorage\Database\Connection
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package phpOMS\DataStorage\Database\Connection
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
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
*
* @since 1.0.0
* @since 1.0.0
*/
public function __construct(array $dbdata)
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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