Remove whitespace

This commit is contained in:
Dennis Eichhorn 2018-05-21 22:31:14 +02:00
parent e36f56da30
commit 37add470eb
105 changed files with 420 additions and 428 deletions

View File

@ -112,7 +112,7 @@ class Group implements ArrayableInterface, \JsonSerializable
* Set group name. * Set group name.
* *
* @param string $name Group name * @param string $name Group name
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -138,7 +138,7 @@ class Group implements ArrayableInterface, \JsonSerializable
* Set group description. * Set group description.
* *
* @param string $description Group description * @param string $description Group description
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -164,9 +164,9 @@ class Group implements ArrayableInterface, \JsonSerializable
* Set group status. * Set group status.
* *
* @param int $status Group status * @param int $status Group status
* *
* @return void * @return void
* *
* @throws InvalidEnumValue * @throws InvalidEnumValue
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -16,9 +16,9 @@ namespace phpOMS;
/** /**
* Application class. * Application class.
* *
* This class contains all necessary application members. Access to them * This class contains all necessary application members. Access to them
* is restricted to write once in order to prevent manipulation * is restricted to write once in order to prevent manipulation
* and afterwards read only. * and afterwards read only.
* *
* @property string $appName * @property string $appName

View File

@ -16,7 +16,7 @@ namespace phpOMS;
/** /**
* Autoloader exception * Autoloader exception
* *
* This exception is thrown if a file couldn't be autoloaded * This exception is thrown if a file couldn't be autoloaded
* *
* @package phpOMS * @package phpOMS

View File

@ -47,7 +47,7 @@ final class Autoloader
{ {
} }
/** /**
* Add base path for autoloading * Add base path for autoloading
* *
@ -57,7 +57,7 @@ final class Autoloader
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function addPath(string $path) : void public static function addPath(string $path) : void
{ {
self::$paths[] = $path; self::$paths[] = $path;
} }
@ -83,7 +83,7 @@ final class Autoloader
foreach (self::$paths as $path) { foreach (self::$paths as $path) {
if (file_exists($file = $path . $class . '.php')) { if (file_exists($file = $path . $class . '.php')) {
include_once $file; include_once $file;
return; return;
} }
} }
@ -110,7 +110,7 @@ final class Autoloader
return true; return true;
} }
} }
return false; return false;
} }
} }

View File

@ -57,8 +57,8 @@ final class Depreciation
/** /**
* Calculate the degression factor * Calculate the degression factor
* *
* This factor is the amount of years * This factor is the amount of years
* *
* @param float $start Value to depreciate (reduced by residual value if required) * @param float $start Value to depreciate (reduced by residual value if required)
* @param float $residual Residual value * @param float $residual Residual value
@ -160,7 +160,7 @@ final class Depreciation
*/ */
public static function getArithmeticProgressivDepreciationResidualInT(float $start, float $residual, int $duration, int $t) : float public static function getArithmeticProgressivDepreciationResidualInT(float $start, float $residual, int $duration, int $t) : float
{ {
return $start - self::getArithmeticProgressivDepreciationFactor($start, $residual, $duration) * $t * ($t + 1) / 2; return $start - self::getArithmeticProgressivDepreciationFactor($start, $residual, $duration) * $t * ($t + 1) / 2;
} }
/** /**

View File

@ -24,7 +24,7 @@ use phpOMS\Math\Matrix\Exception\InvalidDimensionException;
* @license OMS License 1.0 * @license OMS License 1.0
* @link http://website.orange-management.de * @link http://website.orange-management.de
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.CamelCaseParameterName) * @SuppressWarnings(PHPMD.CamelCaseParameterName)
* @SuppressWarnings(PHPMD.CamelCaseVariableName) * @SuppressWarnings(PHPMD.CamelCaseVariableName)
*/ */
@ -33,7 +33,7 @@ final class FinanceFormulas
/** /**
* Annual Percentage Yield * Annual Percentage Yield
* *
* The annual percentage yield (APY) calculates the yield taking compounding * The annual percentage yield (APY) calculates the yield taking compounding
* into consideration. * into consideration.
* *
@ -871,9 +871,9 @@ final class FinanceFormulas
/** /**
* Future Value * Future Value
* *
* The Future Value (FV) is used to calculate the value of a cash flow after a specific amount of periods. * The Future Value (FV) is used to calculate the value of a cash flow after a specific amount of periods.
* *
* @latex FV = C_{0} \cdot \left(1 + r\right)^{n} * @latex FV = C_{0} \cdot \left(1 + r\right)^{n}
* *
* @param float $C Cash flow at period 0 * @param float $C Cash flow at period 0
@ -907,10 +907,10 @@ final class FinanceFormulas
/** /**
* Future Value Factor * Future Value Factor
* *
* The future value factor is used to calculate a facture which can be used to calculate * The future value factor is used to calculate a facture which can be used to calculate
* the future value after a certain amount of periods at a give interest rate. * the future value after a certain amount of periods at a give interest rate.
* *
* @latex f = \left(1 + r\right)^{n} * @latex f = \left(1 + r\right)^{n}
* *
* @param float $r Rate of return * @param float $r Rate of return

View File

@ -43,7 +43,7 @@ class ARIMA
/** /**
* Constructor. * Constructor.
* *
* @param array $data Data points * @param array $data Data points
* @param int $order Data intervals (only 12 and 4 are valid). * @param int $order Data intervals (only 12 and 4 are valid).
* *
@ -61,7 +61,7 @@ class ARIMA
/** /**
* Return data decomposition. * Return data decomposition.
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -21,7 +21,7 @@ namespace phpOMS\Business\Finance;
* @license OMS License 1.0 * @license OMS License 1.0
* @link http://website.orange-management.de * @link http://website.orange-management.de
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.CamelCaseParameterName) * @SuppressWarnings(PHPMD.CamelCaseParameterName)
* @SuppressWarnings(PHPMD.CamelCaseVariableName) * @SuppressWarnings(PHPMD.CamelCaseVariableName)
*/ */

View File

@ -21,7 +21,7 @@ namespace phpOMS\Business\Finance;
* @license OMS License 1.0 * @license OMS License 1.0
* @link http://website.orange-management.de * @link http://website.orange-management.de
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.CamelCaseParameterName) * @SuppressWarnings(PHPMD.CamelCaseParameterName)
* @SuppressWarnings(PHPMD.CamelCaseVariableName) * @SuppressWarnings(PHPMD.CamelCaseVariableName)
*/ */

View File

@ -55,7 +55,7 @@ final class Metrics
* @return int * @return int
* *
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.CamelCaseMethodName) * @SuppressWarnings(PHPMD.CamelCaseMethodName)
*/ */
public static function CRAP(int $complexity, float $coverage) : int public static function CRAP(int $complexity, float $coverage) : int

View File

@ -43,7 +43,7 @@ class MemCached extends ConnectionAbstract
/** /**
* Constructor. * Constructor.
* *
* @param array $data Cache data * @param array $data Cache data
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -47,7 +47,7 @@ class RedisCache extends ConnectionAbstract
{ {
$this->status = CacheStatus::ACTIVE; $this->status = CacheStatus::ACTIVE;
} }
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */

View File

@ -45,7 +45,7 @@ final class CookieJar
* Constructor. * Constructor.
* *
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.Superglobals) * @SuppressWarnings(PHPMD.Superglobals)
*/ */
public function __construct() public function __construct()

View File

@ -33,7 +33,7 @@ interface DataStorageConnectionInterface
* @param string[] $data the basic datastorage information for establishing a connection * @param string[] $data the basic datastorage information for establishing a connection
* *
* @return void * @return void
* *
* @todo make private, reason was that not everyone wants to connect during initialization?! * @todo make private, reason was that not everyone wants to connect during initialization?!
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -87,7 +87,7 @@ abstract class BuilderAbstract
* Escape string value * Escape string value
* *
* @param string $value Value to escape * @param string $value Value to escape
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -46,7 +46,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
* Database prefix. * Database prefix.
* *
* The database prefix name for unique table names * The database prefix name for unique table names
* *
* @todo: make private? could add huge overhead since function call required * @todo: make private? could add huge overhead since function call required
* *
* @var string * @var string

View File

@ -468,7 +468,7 @@ class DataMapperAbstract implements DataMapperInterface
$query->prefix(self::$db->getPrefix())->into(static::$table); $query->prefix(self::$db->getPrefix())->into(static::$table);
foreach (static::$columns as $key => $column) { foreach (static::$columns as $key => $column) {
if (isset(static::$hasMany[$key]) if (isset(static::$hasMany[$key])
|| isset(static::$hasOne[$key]) || isset(static::$hasOne[$key])
) { ) {
continue; continue;
@ -609,7 +609,7 @@ class DataMapperAbstract implements DataMapperInterface
continue; continue;
} }
if (!isset($relReflectionClass)) { if ($relReflectionClass === null) {
$relReflectionClass = new \ReflectionClass($value); $relReflectionClass = new \ReflectionClass($value);
} }
@ -877,12 +877,19 @@ class DataMapperAbstract implements DataMapperInterface
*/ */
private static function parseValue(string $type, $value = null) private static function parseValue(string $type, $value = null)
{ {
// todo: checking for string === string and is_* is slow. maybe only check type or only string
if ($value === null) { if ($value === null) {
return null; return null;
} elseif ($type === 'DateTime' || $value instanceof \DateTime) { } elseif ($type === 'int') {
return (int) $value;
} elseif ($type === 'string') {
return (string) $value;
} elseif ($type === 'float') {
return (float) $value;
} elseif ($type === 'bool') {
return (bool) $value;
} elseif ($type === 'DateTime') {
return $value->format('Y-m-d H:i:s'); return $value->format('Y-m-d H:i:s');
} elseif ($type === 'Json' || $type === 'jsonSerializable' || is_array($value)) { } elseif ($type === 'Json' || $type === 'jsonSerializable') {
return json_encode($value); return json_encode($value);
} elseif ($type === 'Serializable') { } elseif ($type === 'Serializable') {
return $value->serialize(); return $value->serialize();
@ -890,14 +897,6 @@ class DataMapperAbstract implements DataMapperInterface
return json_encode($value->jsonSerialize()); return json_encode($value->jsonSerialize());
} elseif (is_object($value) && method_exists($value, 'getId')) { } elseif (is_object($value) && method_exists($value, 'getId')) {
return $value->getId(); return $value->getId();
} elseif ($type === 'int' || is_int($value)) {
return (int) $value;
} elseif ($type === 'string' || is_string($value)) {
return (string) $value;
} elseif ($type === 'float' || is_float($value)) {
return (float) $value;
} elseif ($type === 'bool' || is_bool($value)) {
return (bool) $value;
} }
return $value; return $value;
@ -950,7 +949,7 @@ class DataMapperAbstract implements DataMapperInterface
continue; continue;
} }
if (!isset($relReflectionClass)) { if ($relReflectionClass === null) {
$relReflectionClass = new \ReflectionClass($value); $relReflectionClass = new \ReflectionClass($value);
} }
@ -1120,8 +1119,8 @@ class DataMapperAbstract implements DataMapperInterface
foreach (static::$columns as $key => $column) { foreach (static::$columns as $key => $column) {
$propertyName = stripos($column['internal'], '/') !== false ? explode('/', $column['internal'])[0] : $column['internal']; $propertyName = stripos($column['internal'], '/') !== false ? explode('/', $column['internal'])[0] : $column['internal'];
if (isset(static::$hasMany[$propertyName]) if (isset(static::$hasMany[$propertyName])
|| isset(static::$hasOne[$propertyName]) || isset(static::$hasOne[$propertyName])
|| $column['internal'] === static::$primaryField || $column['internal'] === static::$primaryField
) { ) {
continue; continue;
@ -1148,7 +1147,7 @@ class DataMapperAbstract implements DataMapperInterface
} elseif ($column['name'] !== static::$primaryField) { } elseif ($column['name'] !== static::$primaryField) {
$tValue = $property->getValue($obj); $tValue = $property->getValue($obj);
if (stripos($column['internal'], '/') !== false) { if (stripos($column['internal'], '/') !== false) {
$path = explode('/', $column['internal']); $path = explode('/', $column['internal']);
array_shift($path); array_shift($path);
$path = implode('/', $path); $path = implode('/', $path);
@ -1254,7 +1253,7 @@ class DataMapperAbstract implements DataMapperInterface
continue; continue;
} }
if (!isset($relReflectionClass)) { if ($relReflectionClass === null) {
$relReflectionClass = new \ReflectionClass($value); $relReflectionClass = new \ReflectionClass($value);
} }
@ -1776,19 +1775,26 @@ class DataMapperAbstract implements DataMapperInterface
continue; continue;
} }
$hasPath = false;
if (stripos(static::$columns[$column]['internal'], '/') !== false) { if (stripos(static::$columns[$column]['internal'], '/') !== false) {
$refProp = $refClass->getProperty(explode('/', static::$columns[$column]['internal'])[0]); $hasPath = true;
$path = explode(static::$columns[$column]['internal']); $path = explode('/', static::$columns[$column]['internal']);
$refProp = $refClass->getProperty($path[0]);
if (!($accessible = $refProp->isPublic())) {
$refProp->setAccessible(true);
}
array_shift($path); array_shift($path);
$path = implode('/', $path); $path = implode('/', $path);
$aValue = $refProp->getValue($obj); $aValue = $refProp->getValue($obj);
} else { } else {
$refProp = $refClass->getProperty(static::$columns[$column]['internal']); $refProp = $refClass->getProperty(static::$columns[$column]['internal']);
}
if (!($accessible = $refProp->isPublic())) { if (!($accessible = $refProp->isPublic())) {
$refProp->setAccessible(true); $refProp->setAccessible(true);
}
} }
if (in_array(static::$columns[$column]['type'], ['string', 'int', 'float', 'bool'])) { if (in_array(static::$columns[$column]['type'], ['string', 'int', 'float', 'bool'])) {
@ -1797,20 +1803,20 @@ class DataMapperAbstract implements DataMapperInterface
settype($value, static::$columns[$column]['type']); settype($value, static::$columns[$column]['type']);
} }
if (isset($path)) { if ($hasPath) {
$value = ArrayUtils::setArray($path, $aValue, $value, '/', true); $value = ArrayUtils::setArray($path, $aValue, $value, '/', true);
} }
$refProp->setValue($obj, $value); $refProp->setValue($obj, $value);
} elseif (static::$columns[$column]['type'] === 'DateTime') { } elseif (static::$columns[$column]['type'] === 'DateTime') {
$value = new \DateTime($value ?? ''); $value = new \DateTime($value ?? '');
if (stripos(static::$columns[$column]['internal'], '/') !== false) { if ($hasPath) {
$value = ArrayUtils::setArray($path, $aValue, $value, '/', true); $value = ArrayUtils::setArray($path, $aValue, $value, '/', true);
} }
$refProp->setValue($obj, $value); $refProp->setValue($obj, $value);
} elseif (static::$columns[$column]['type'] === 'Json') { } elseif (static::$columns[$column]['type'] === 'Json') {
if (stripos(static::$columns[$column]['internal'], '/') !== false) { if ($hasPath) {
$value = ArrayUtils::setArray($path, $aValue, $value, '/', true); $value = ArrayUtils::setArray($path, $aValue, $value, '/', true);
} }
@ -1837,8 +1843,6 @@ class DataMapperAbstract implements DataMapperInterface
* *
* @return array * @return array
* *
* @throws \UnexpectedValueException
*
* @since 1.0.0 * @since 1.0.0
*/ */
public static function populateAbstractArray(array $result) : array public static function populateAbstractArray(array $result) : array
@ -1890,7 +1894,7 @@ class DataMapperAbstract implements DataMapperInterface
} }
if (!isset(self::$parentMapper)) { if (!isset(self::$parentMapper)) {
self::setUpParentMapper(); self::$parentMapper = static::class;
} }
self::extend(__CLASS__); self::extend(__CLASS__);
@ -1972,7 +1976,7 @@ class DataMapperAbstract implements DataMapperInterface
} }
if (!isset(self::$parentMapper)) { if (!isset(self::$parentMapper)) {
self::setUpParentMapper(); self::$parentMapper = static::class;
} }
self::extend(__CLASS__); self::extend(__CLASS__);
@ -2017,7 +2021,7 @@ class DataMapperAbstract implements DataMapperInterface
} }
if (!isset(self::$parentMapper)) { if (!isset(self::$parentMapper)) {
self::setUpParentMapper(); self::$parentMapper = static::class;
} }
self::extend(__CLASS__); self::extend(__CLASS__);
@ -2063,7 +2067,7 @@ class DataMapperAbstract implements DataMapperInterface
public static function getForArray($refKey, string $ref, int $relations = RelationType::ALL, $fill = null) public static function getForArray($refKey, string $ref, int $relations = RelationType::ALL, $fill = null)
{ {
if (!isset(self::$parentMapper)) { if (!isset(self::$parentMapper)) {
self::setUpParentMapper(); self::$parentMapper = static::class;
} }
self::extend(__CLASS__); self::extend(__CLASS__);
@ -2104,7 +2108,7 @@ class DataMapperAbstract implements DataMapperInterface
} }
if (!isset(self::$parentMapper)) { if (!isset(self::$parentMapper)) {
self::setUpParentMapper(); self::$parentMapper = static::class;
} }
$obj = self::populateIterable(self::getAllRaw($lang)); $obj = self::populateIterable(self::getAllRaw($lang));
@ -2132,7 +2136,7 @@ class DataMapperAbstract implements DataMapperInterface
} }
if (!isset(self::$parentMapper)) { if (!isset(self::$parentMapper)) {
self::setUpParentMapper(); self::$parentMapper = static::class;
} }
$obj = self::populateIterableArray(self::getAllRaw($lang)); $obj = self::populateIterableArray(self::getAllRaw($lang));
@ -2506,7 +2510,7 @@ class DataMapperAbstract implements DataMapperInterface
->leftOuterJoin($value['table']) ->leftOuterJoin($value['table'])
->on(new And('1', new And(new Or('d1', 'd2'), 'id'))) ->on(new And('1', new And(new Or('d1', 'd2'), 'id')))
->where($value['table'] . '.' . $value['dst'], '=', 'NULL'); ->where($value['table'] . '.' . $value['dst'], '=', 'NULL');
}*/ }*/
$sth = self::$db->con->prepare($query->toSql()); $sth = self::$db->con->prepare($query->toSql());
@ -2660,18 +2664,6 @@ class DataMapperAbstract implements DataMapperInterface
} }
} }
/**
* Define the highest mapper of this request
*
* @return void
*
* @since 1.0.0
*/
private static function setUpParentMapper() : void
{
self::$parentMapper = static::class;
}
/** /**
* Check if model exists in database * Check if model exists in database
* *

View File

@ -144,7 +144,7 @@ abstract class GrammarAbstract
* Set table prefix. * Set table prefix.
* *
* @param string $prefix Table prefix * @param string $prefix Table prefix
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -777,7 +777,7 @@ final class Builder extends BuilderAbstract
/** /**
* Lock query. * Lock query.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -788,7 +788,7 @@ final class Builder extends BuilderAbstract
/** /**
* Lock for update query. * Lock for update query.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -799,7 +799,7 @@ final class Builder extends BuilderAbstract
/** /**
* Create query string. * Create query string.
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
@ -811,7 +811,7 @@ final class Builder extends BuilderAbstract
/** /**
* Find query. * Find query.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -837,7 +837,7 @@ final class Builder extends BuilderAbstract
/** /**
* Select minimum. * Select minimum.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -848,7 +848,7 @@ final class Builder extends BuilderAbstract
/** /**
* Select maximum. * Select maximum.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -859,7 +859,7 @@ final class Builder extends BuilderAbstract
/** /**
* Select sum. * Select sum.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -870,7 +870,7 @@ final class Builder extends BuilderAbstract
/** /**
* Select average. * Select average.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -1034,7 +1034,7 @@ final class Builder extends BuilderAbstract
/** /**
* Delete query * Delete query
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
@ -1052,7 +1052,7 @@ final class Builder extends BuilderAbstract
/** /**
* Increment value. * Increment value.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -1063,7 +1063,7 @@ final class Builder extends BuilderAbstract
/** /**
* Decrement value. * Decrement value.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -1074,7 +1074,7 @@ final class Builder extends BuilderAbstract
/** /**
* Join. * Join.
* *
* @return Builder * @return Builder
* *
* @since 1.0.0 * @since 1.0.0
@ -1086,7 +1086,7 @@ final class Builder extends BuilderAbstract
/** /**
* Join where. * Join where.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -1097,7 +1097,7 @@ final class Builder extends BuilderAbstract
/** /**
* Left join. * Left join.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -1108,7 +1108,7 @@ final class Builder extends BuilderAbstract
/** /**
* Left join where. * Left join where.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -1119,7 +1119,7 @@ final class Builder extends BuilderAbstract
/** /**
* Right join. * Right join.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -1130,7 +1130,7 @@ final class Builder extends BuilderAbstract
/** /**
* Right join where. * Right join where.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -1153,7 +1153,7 @@ final class Builder extends BuilderAbstract
/** /**
* On. * On.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -25,7 +25,7 @@ use phpOMS\DataStorage\LockException;
* @license OMS License 1.0 * @license OMS License 1.0
* @link http://website.orange-management.de * @link http://website.orange-management.de
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.Superglobals) * @SuppressWarnings(PHPMD.Superglobals)
*/ */
class HttpSession implements SessionInterface class HttpSession implements SessionInterface
@ -109,7 +109,7 @@ class HttpSession implements SessionInterface
/** /**
* Set Csrf protection for forms. * Set Csrf protection for forms.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -147,7 +147,7 @@ final class Localization
/** /**
* Get country * Get country
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
@ -159,7 +159,7 @@ final class Localization
/** /**
* Set country name * Set country name
* *
* @param string $country Contry name * @param string $country Contry name
* *
* @return void * @return void
@ -189,9 +189,9 @@ final class Localization
/** /**
* Set timezone * Set timezone
* *
* @param string $timezone Timezone * @param string $timezone Timezone
* *
* @return void * @return void
* *
* @todo : maybe make parameter int * @todo : maybe make parameter int
@ -209,7 +209,7 @@ final class Localization
/** /**
* Get language * Get language
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
@ -221,7 +221,7 @@ final class Localization
/** /**
* Set language code * Set language code
* *
* @param string $language Language code * @param string $language Language code
* *
* @return void * @return void
@ -243,7 +243,7 @@ final class Localization
/** /**
* Get currency * Get currency
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
@ -255,7 +255,7 @@ final class Localization
/** /**
* Set currency code * Set currency code
* *
* @param string $currency Currency code * @param string $currency Currency code
* *
* @return void * @return void
@ -273,7 +273,7 @@ final class Localization
/** /**
* get datetime format * get datetime format
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
@ -285,7 +285,7 @@ final class Localization
/** /**
* Set datetime format * Set datetime format
* *
* @param string $datetime Datetime format * @param string $datetime Datetime format
* *
* @return void * @return void
@ -299,7 +299,7 @@ final class Localization
/** /**
* Set decimal char * Set decimal char
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
@ -311,7 +311,7 @@ final class Localization
/** /**
* Get decimal char * Get decimal char
* *
* @param string $decimal Decimal char * @param string $decimal Decimal char
* *
* @return void * @return void
@ -325,7 +325,7 @@ final class Localization
/** /**
* Get thousands char * Get thousands char
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
@ -337,7 +337,7 @@ final class Localization
/** /**
* Set thousands char * Set thousands char
* *
* @param string $thousands Thousands char * @param string $thousands Thousands char
* *
* @return void * @return void
@ -351,7 +351,7 @@ final class Localization
/** /**
* Get angle type * Get angle type
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
@ -363,7 +363,7 @@ final class Localization
/** /**
* Set angle type * Set angle type
* *
* @param string $angle Angle * @param string $angle Angle
* *
* @return void * @return void
@ -377,7 +377,7 @@ final class Localization
/** /**
* Get temperature type * Get temperature type
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
@ -389,7 +389,7 @@ final class Localization
/** /**
* Set temperature string * Set temperature string
* *
* @param string $temperature Temperature * @param string $temperature Temperature
* *
* @return void * @return void
@ -403,7 +403,7 @@ final class Localization
/** /**
* Get speed type * Get speed type
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
@ -415,7 +415,7 @@ final class Localization
/** /**
* Set speed type * Set speed type
* *
* @param array $speed Speed * @param array $speed Speed
* *
* @return void * @return void
@ -429,7 +429,7 @@ final class Localization
/** /**
* Get weight type * Get weight type
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
@ -441,7 +441,7 @@ final class Localization
/** /**
* Set weight type * Set weight type
* *
* @param array $weight Weight type * @param array $weight Weight type
* *
* @return void * @return void
@ -455,7 +455,7 @@ final class Localization
/** /**
* Get length type * Get length type
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
@ -467,7 +467,7 @@ final class Localization
/** /**
* Set length type * Set length type
* *
* @param array $length Length type * @param array $length Length type
* *
* @return void * @return void
@ -481,7 +481,7 @@ final class Localization
/** /**
* Get area type * Get area type
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
@ -493,7 +493,7 @@ final class Localization
/** /**
* Set area type * Set area type
* *
* @param array $area Area type * @param array $area Area type
* *
* @return void * @return void
@ -507,7 +507,7 @@ final class Localization
/** /**
* Get volume type * Get volume type
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
@ -519,7 +519,7 @@ final class Localization
/** /**
* Set volume type * Set volume type
* *
* @param array $volume Volume type * @param array $volume Volume type
* *
* @return void * @return void

View File

@ -24,7 +24,7 @@ use phpOMS\System\File\Local\File;
* @license OMS License 1.0 * @license OMS License 1.0
* @link http://website.orange-management.de * @link http://website.orange-management.de
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.Superglobals) * @SuppressWarnings(PHPMD.Superglobals)
*/ */
final class FileLogger implements LoggerInterface final class FileLogger implements LoggerInterface
@ -161,7 +161,7 @@ final class FileLogger implements LoggerInterface
/** /**
* Protect instance from getting copied from outside. * Protect instance from getting copied from outside.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -375,7 +375,7 @@ final class FileLogger implements LoggerInterface
* Analyse logging file. * Analyse logging file.
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function countLogs() public function countLogs()
@ -411,7 +411,7 @@ final class FileLogger implements LoggerInterface
* @param int $limit Amout of perpetrators * @param int $limit Amout of perpetrators
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getHighestPerpetrator(int $limit = 10) : array public function getHighestPerpetrator(int $limit = 10) : array
@ -449,7 +449,7 @@ final class FileLogger implements LoggerInterface
* @param int $offset Offset * @param int $offset Offset
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function get(int $limit = 25, int $offset = 0) : array public function get(int $limit = 25, int $offset = 0) : array
@ -498,7 +498,7 @@ final class FileLogger implements LoggerInterface
* @param int $id Id/Line number of the logging message * @param int $id Id/Line number of the logging message
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getByLine(int $id = 1) : array public function getByLine(int $id = 1) : array
@ -545,7 +545,7 @@ final class FileLogger implements LoggerInterface
* @param string $message Log message * @param string $message Log message
* @param bool $verbose Is verbose * @param bool $verbose Is verbose
* @param array $context Context * @param array $context Context
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -34,7 +34,7 @@ final class Functions
{ {
} }
/** /**
* Calculate gammar function value. * Calculate gammar function value.
* *
@ -236,7 +236,7 @@ final class Functions
{ {
return !((bool) ($a & 1)); return !((bool) ($a & 1));
} }
/** /**
* Power all values in array. * Power all values in array.
* *
@ -258,7 +258,7 @@ final class Functions
return $squared; return $squared;
} }
/** /**
* Power all values in array. * Power all values in array.
* *

View File

@ -34,7 +34,7 @@ final class Gamma
{ {
} }
/** /**
* approximation values. * approximation values.
* *

View File

@ -36,7 +36,7 @@ final class MonotoneChain
{ {
} }
/** /**
* Create convex hull * Create convex hull
* *

View File

@ -75,7 +75,7 @@ final class Circle implements D2ShapeInterface
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.CamelCaseVariableName) * @SuppressWarnings(PHPMD.CamelCaseVariableName)
* @SuppressWarnings(PHPMD.CamelCaseParameterName) * @SuppressWarnings(PHPMD.CamelCaseParameterName)
*/ */

View File

@ -79,7 +79,7 @@ final class Cone implements D3ShapeInterface
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.CamelCaseVariableName) * @SuppressWarnings(PHPMD.CamelCaseVariableName)
* @SuppressWarnings(PHPMD.CamelCaseParameterName) * @SuppressWarnings(PHPMD.CamelCaseParameterName)
*/ */

View File

@ -141,7 +141,7 @@ final class Sphere implements D3ShapeInterface
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.CamelCaseVariableName) * @SuppressWarnings(PHPMD.CamelCaseVariableName)
* @SuppressWarnings(PHPMD.CamelCaseParameterName) * @SuppressWarnings(PHPMD.CamelCaseParameterName)
*/ */

View File

@ -118,7 +118,7 @@ final class CholeskyDecomposition
* Solve Ax = b * Solve Ax = b
* *
* @param Matrix $B Matrix * @param Matrix $B Matrix
* *
* @return Matrix * @return Matrix
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -237,7 +237,7 @@ final class LUDecomposition
* Solve Ax = b * Solve Ax = b
* *
* @param Matrix $B Matrix * @param Matrix $B Matrix
* *
* @return Matrix * @return Matrix
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -82,7 +82,7 @@ class Matrix implements \ArrayAccess, \Iterator
* @param int $m Row * @param int $m Row
* @param int $n Column * @param int $n Column
* @param int $value Value * @param int $value Value
* *
* @return void * @return void
* *
* @throws InvalidDimensionException * @throws InvalidDimensionException
@ -218,7 +218,7 @@ class Matrix implements \ArrayAccess, \Iterator
/** /**
* Swap values in rows * Swap values in rows
* *
* @param array $matrix Matrix reference to modify * @param array $matrix Matrix reference to modify
* @param int $row1 Row to swap * @param int $row1 Row to swap
* @param int $row2 Row to swap * @param int $row2 Row to swap
@ -573,7 +573,7 @@ class Matrix implements \ArrayAccess, \Iterator
/** /**
* Solve matrix * Solve matrix
* *
* @param Matix $B Matrix/Vector b * @param Matix $B Matrix/Vector b
* *
* @return Matrix * @return Matrix

View File

@ -80,7 +80,7 @@ final class Complex
/** /**
* Conjugate * Conjugate
* *
* @latex z = a - b*i * @latex z = a - b*i
* *
* @return Complex * @return Complex
@ -94,24 +94,24 @@ final class Complex
/** /**
* Reciprocal * Reciprocal
* *
* @return Complex * @return Complex
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function reciprocal() : Complex public function reciprocal() : Complex
{ {
return new self( return new self(
$this->re / ($this->re ** 2 + $this->im ** 2), $this->re / ($this->re ** 2 + $this->im ** 2),
-$this->im / ($this->re ** 2 + $this->im ** 2) -$this->im / ($this->re ** 2 + $this->im ** 2)
); );
} }
/** /**
* Square root * Square root
* *
* @return Complex * @return Complex
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function sqrt() : Complex public function sqrt() : Complex
@ -124,9 +124,9 @@ final class Complex
/** /**
* Absolute * Absolute
* *
* @return mixed * @return mixed
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function abs() public function abs()
@ -136,9 +136,9 @@ final class Complex
/** /**
* Square * Square
* *
* @return Complex * @return Complex
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function square() : Complex public function square() : Complex
@ -166,11 +166,11 @@ final class Complex
/** /**
* Power with integer * Power with integer
* *
* @param int $value Power * @param int $value Power
* *
* @return Complex * @return Complex
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function powInteger(int $value) : Complex public function powInteger(int $value) : Complex
@ -191,13 +191,13 @@ final class Complex
/** /**
* Add opperator * Add opperator
* *
* @param mixed $value Value to add * @param mixed $value Value to add
* *
* @return Complex * @return Complex
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function add($value) : Complex public function add($value) : Complex
@ -210,14 +210,14 @@ final class Complex
throw new \InvalidArgumentException(); throw new \InvalidArgumentException();
} }
/** /**
* Add opperator * Add opperator
* *
* @param Complex $cpl Value to add * @param Complex $cpl Value to add
* *
* @return Complex * @return Complex
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function addComplex(Complex $cpl) : Complex private function addComplex(Complex $cpl) : Complex
@ -227,11 +227,11 @@ final class Complex
/** /**
* Add opperator * Add opperator
* *
* @param mixed $val Value to add * @param mixed $val Value to add
* *
* @return Complex * @return Complex
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function addScalar($val) : Complex private function addScalar($val) : Complex
@ -241,13 +241,13 @@ final class Complex
/** /**
* Sub opperator * Sub opperator
* *
* @param mixed $value Value to sub * @param mixed $value Value to sub
* *
* @return Complex * @return Complex
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function sub($value) : Complex public function sub($value) : Complex
@ -263,11 +263,11 @@ final class Complex
/** /**
* Sub opperator * Sub opperator
* *
* @param Complex $cpl Value to sub * @param Complex $cpl Value to sub
* *
* @return Complex * @return Complex
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function subComplex(Complex $cpl) : Complex private function subComplex(Complex $cpl) : Complex
@ -277,11 +277,11 @@ final class Complex
/** /**
* Sub opperator * Sub opperator
* *
* @param mixed $val Value to sub * @param mixed $val Value to sub
* *
* @return Complex * @return Complex
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function subScalar($val) : Complex private function subScalar($val) : Complex
@ -291,13 +291,13 @@ final class Complex
/** /**
* Mult opperator * Mult opperator
* *
* @param mixed $value Value to mult * @param mixed $value Value to mult
* *
* @return Complex * @return Complex
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function mult($value) : Complex public function mult($value) : Complex
@ -313,11 +313,11 @@ final class Complex
/** /**
* Mult opperator * Mult opperator
* *
* @param Complex $cpl Value to mult * @param Complex $cpl Value to mult
* *
* @return Complex * @return Complex
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function multComplex(Complex $cpl) : Complex private function multComplex(Complex $cpl) : Complex
@ -330,11 +330,11 @@ final class Complex
/** /**
* Mult opperator * Mult opperator
* *
* @param mixed $val Value to mult * @param mixed $val Value to mult
* *
* @return Complex * @return Complex
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function multScalar($val) : Complex private function multScalar($val) : Complex
@ -344,13 +344,13 @@ final class Complex
/** /**
* Div opperator * Div opperator
* *
* @param mixed $value Value to div * @param mixed $value Value to div
* *
* @return Complex * @return Complex
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function div($value) : Complex public function div($value) : Complex
@ -366,11 +366,11 @@ final class Complex
/** /**
* Div opperator * Div opperator
* *
* @param Complex $cpl Value to div * @param Complex $cpl Value to div
* *
* @return Complex * @return Complex
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function divComplex(Complex $cpl) : Complex private function divComplex(Complex $cpl) : Complex
@ -383,11 +383,11 @@ final class Complex
/** /**
* Div opperator * Div opperator
* *
* @param mixed $val Value to div * @param mixed $val Value to div
* *
* @return Complex * @return Complex
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function divScalar($val) : Complex private function divScalar($val) : Complex
@ -397,18 +397,18 @@ final class Complex
/** /**
* Render complex number * Render complex number
* *
* @param int $precision Output precision * @param int $precision Output precision
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function render(int $precision = 2) : string public function render(int $precision = 2) : string
{ {
return ($this->re !== 0 ? number_format($this->re, $precision) : '') return ($this->re !== 0 ? number_format($this->re, $precision) : '')
. ($this->im > 0 && $this->re !== 0 ? ' +' : '') . ($this->im > 0 && $this->re !== 0 ? ' +' : '')
. ($this->im < 0 && $this->re !== 0 ? ' -' : '') . ($this->im < 0 && $this->re !== 0 ? ' -' : '')
. ($this->im !== 0 ? ( . ($this->im !== 0 ? (
($this->re !== 0 ? ' ' : '') . number_format( ($this->re !== 0 ? ' ' : '') . number_format(
($this->im < 0 && $this->re === 0 ? $this->im : abs($this->im)), $precision ($this->im < 0 && $this->re === 0 ? $this->im : abs($this->im)), $precision

View File

@ -34,7 +34,7 @@ final class Integer
{ {
} }
/** /**
* Is integer. * Is integer.
* *

View File

@ -34,7 +34,7 @@ final class Natural
{ {
} }
/** /**
* Is natural number. * Is natural number.
* *

View File

@ -34,7 +34,7 @@ final class Numbers
{ {
} }
/** /**
* Is perfect number? * Is perfect number?
* *

View File

@ -34,7 +34,7 @@ final class Prime
{ {
} }
/** /**
* Is mersenne number? * Is mersenne number?
* *

View File

@ -50,7 +50,7 @@ final class Average
{ {
} }
/** /**
* Average change. * Average change.
* *

View File

@ -87,7 +87,7 @@ final class MeasureOfDispersion
* Calculage standard deviation. * Calculage standard deviation.
* *
* Example: ([4, 5, 9, 1, 3]) * Example: ([4, 5, 9, 1, 3])
* *
* @latex \sigma = \sqrt{\sigma^{2}} = \sqrt{Var(X)} * @latex \sigma = \sqrt{\sigma^{2}} = \sqrt{Var(X)}
* *
* @param array $values Values * @param array $values Values
@ -111,11 +111,11 @@ final class MeasureOfDispersion
/** /**
* Calculage sample variance. * Calculage sample variance.
* *
* Similar to `empiricalVariance`. * Similar to `empiricalVariance`.
* *
* Example: ([4, 5, 9, 1, 3]) * Example: ([4, 5, 9, 1, 3])
* *
* @latex \sigma^{2} = Var(X) = \frac{1}{N - 1} \sum_{i = 1}^{N}\left(x_{i} - \bar{X}\right)^{2} * @latex \sigma^{2} = Var(X) = \frac{1}{N - 1} \sum_{i = 1}^{N}\left(x_{i} - \bar{X}\right)^{2}
* *
* @param array $values Values * @param array $values Values
@ -140,11 +140,11 @@ final class MeasureOfDispersion
/** /**
* Calculage empirical variance. * Calculage empirical variance.
* *
* Similar to `sampleVariance`. * Similar to `sampleVariance`.
* *
* Example: ([4, 5, 9, 1, 3]) * Example: ([4, 5, 9, 1, 3])
* *
* @latex \sigma^{2} = Var(X) = \frac{1}{N} \sum_{i = 1}^{N}\left(x_{i} - \bar{X}\right)^{2} * @latex \sigma^{2} = Var(X) = \frac{1}{N} \sum_{i = 1}^{N}\left(x_{i} - \bar{X}\right)^{2}
* *
* @param array $values Values * @param array $values Values
@ -180,7 +180,7 @@ final class MeasureOfDispersion
* Calculage empirical covariance. * Calculage empirical covariance.
* *
* Example: ([4, 5, 9, 1, 3], [4, 5, 9, 1, 3]) * Example: ([4, 5, 9, 1, 3], [4, 5, 9, 1, 3])
* *
* @latex \sigma_{XY} = cov(X, Y) = \sum_{i = 1}^{N}\frac{\left(x_{i} - \bar{X}\right) \left(y_{i} - \bar{Y}\right)}{N - 1} * @latex \sigma_{XY} = cov(X, Y) = \sum_{i = 1}^{N}\frac{\left(x_{i} - \bar{X}\right) \left(y_{i} - \bar{Y}\right)}{N - 1}
* *
* @param array $x Values * @param array $x Values

View File

@ -64,7 +64,7 @@ class BernoulliDistribution
} elseif ($k >= 1) { } elseif ($k >= 1) {
return 1; return 1;
} }
return 1 - $p; return 1 - $p;
} }
@ -84,7 +84,7 @@ class BernoulliDistribution
} elseif ($p > 0.5) { } elseif ($p > 0.5) {
return 1; return 1;
} }
return 0; return 0;
} }

View File

@ -83,7 +83,7 @@ class CauchyDistribution
{ {
return $x0; return $x0;
} }
/** /**
* Get entropy. * Get entropy.
* *

View File

@ -26,7 +26,7 @@ use phpOMS\Router\RouteVerb;
* @license OMS License 1.0 * @license OMS License 1.0
* @link http://website.orange-management.de * @link http://website.orange-management.de
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.Superglobals) * @SuppressWarnings(PHPMD.Superglobals)
*/ */
final class Request extends RequestAbstract final class Request extends RequestAbstract

View File

@ -70,7 +70,7 @@ abstract class HeaderAbstract
/** /**
* Set header locked. * Set header locked.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -164,7 +164,7 @@ abstract class HeaderAbstract
* Generate header based on status code. * Generate header based on status code.
* *
* @param int $statusCode Status code * @param int $statusCode Status code
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -198,7 +198,7 @@ abstract class HeaderAbstract
* @param string $key Header key * @param string $key Header key
* @param string $value Header value * @param string $value Header value
* @param bool $overwrite Overwrite if key already exists * @param bool $overwrite Overwrite if key already exists
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -24,7 +24,7 @@ use phpOMS\DataStorage\LockException;
* @license OMS License 1.0 * @license OMS License 1.0
* @link http://website.orange-management.de * @link http://website.orange-management.de
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.Superglobals) * @SuppressWarnings(PHPMD.Superglobals)
*/ */
final class Header extends HeaderAbstract final class Header extends HeaderAbstract
@ -221,7 +221,7 @@ final class Header extends HeaderAbstract
/** /**
* Push all headers. * Push all headers.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -29,7 +29,7 @@ use phpOMS\Uri\UriInterface;
* @license OMS License 1.0 * @license OMS License 1.0
* @link http://website.orange-management.de * @link http://website.orange-management.de
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.Superglobals) * @SuppressWarnings(PHPMD.Superglobals)
*/ */
final class Request extends RequestAbstract final class Request extends RequestAbstract
@ -58,7 +58,7 @@ final class Request extends RequestAbstract
* @since 1.0.0 * @since 1.0.0
*/ */
private $os = null; private $os = null;
/** /**
* Request information. * Request information.
* *
@ -452,8 +452,8 @@ final class Request extends RequestAbstract
public function __toString() : string public function __toString() : string
{ {
if ($this->getMethod() === RequestMethod::GET && !empty($this->data)) { if ($this->getMethod() === RequestMethod::GET && !empty($this->data)) {
return $this->uri->__toString() return $this->uri->__toString()
. (parse_url($this->uri->__toString(), PHP_URL_QUERY) ? '&' : '?') . (parse_url($this->uri->__toString(), PHP_URL_QUERY) ? '&' : '?')
. http_build_query($this->data); . http_build_query($this->data);
} }

View File

@ -107,7 +107,7 @@ abstract class RequestAbstract implements MessageInterface
* Set request uri. * Set request uri.
* *
* @param UriInterface $uri Uri * @param UriInterface $uri Uri
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -142,7 +142,7 @@ abstract class RequestAbstract implements MessageInterface
* Set request method. * Set request method.
* *
* @param string $method Request method * @param string $method Request method
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -29,5 +29,5 @@ abstract class RequestSource extends Enum
public const WEB = 0; /* This is a http request */ public const WEB = 0; /* This is a http request */
public const CONSOLE = 1; /* Request is a console command */ public const CONSOLE = 1; /* Request is a console command */
public const SOCKET = 2; /* Request through socket connection */ public const SOCKET = 2; /* Request through socket connection */
public const UNDEFINED = 3; public const UNDEFINED = 3;
} }

View File

@ -27,7 +27,7 @@ interface UploadedFileInterface
/** /**
* Retrieve a stream representing the uploaded file. * Retrieve a stream representing the uploaded file.
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getStream(); public function getStream();
@ -45,7 +45,7 @@ interface UploadedFileInterface
/** /**
* Retrieve the file size. * Retrieve the file size.
* *
* @return int * @return int
* *
* @since 1.0.0 * @since 1.0.0
@ -54,7 +54,7 @@ interface UploadedFileInterface
/** /**
* Retrieve the error associated with the uploaded file. * Retrieve the error associated with the uploaded file.
* *
* @return int * @return int
* *
* @since 1.0.0 * @since 1.0.0
@ -63,7 +63,7 @@ interface UploadedFileInterface
/** /**
* Retrieve the filename sent by the client. * Retrieve the filename sent by the client.
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
@ -72,7 +72,7 @@ interface UploadedFileInterface
/** /**
* Retrieve the media type sent by the client. * Retrieve the media type sent by the client.
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -101,7 +101,7 @@ class Head implements RenderableInterface
/** /**
* Set page meta. * Set page meta.
* *
* @return Meta * @return Meta
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -110,7 +110,7 @@ final class InfoManager
* @param string $path Value path * @param string $path Value path
* @param mixed $data Scalar or array of data to set * @param mixed $data Scalar or array of data to set
* @param string $delim Delimiter of path * @param string $delim Delimiter of path
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -80,7 +80,7 @@ class InstallerAbstract
$dbPool->get()->con->commit(); $dbPool->get()->con->commit();
break; break;
default: default:
throw new InvalidDatabaseTypeException($dbPool->get()->getType()); throw new InvalidDatabaseTypeException($dbPool->get()->getType());
} }
} }

View File

@ -94,7 +94,7 @@ final class ModuleFactory
* Load modules this module is requesting from * Load modules this module is requesting from
* *
* @param ModuleAbstract $obj Current module * @param ModuleAbstract $obj Current module
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -114,7 +114,7 @@ final class ModuleFactory
* Register modules this module is receiving from * Register modules this module is receiving from
* *
* @param ModuleAbstract $obj Current module * @param ModuleAbstract $obj Current module
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -176,7 +176,7 @@ final class ModuleManager
$this->uriLoad = $sth->fetchAll(\PDO::FETCH_GROUP); $this->uriLoad = $sth->fetchAll(\PDO::FETCH_GROUP);
break; break;
default: default:
throw new InvalidDatabaseTypeException($this->app->dbPool->get('select')->getType()); throw new InvalidDatabaseTypeException($this->app->dbPool->get('select')->getType());
} }
} }
@ -202,7 +202,7 @@ final class ModuleManager
$sth->execute(); $sth->execute();
$this->active = $sth->fetchAll(\PDO::FETCH_COLUMN); $this->active = $sth->fetchAll(\PDO::FETCH_COLUMN);
break; break;
default: default:
throw new InvalidDatabaseTypeException($this->app->dbPool->get('select')->getType()); throw new InvalidDatabaseTypeException($this->app->dbPool->get('select')->getType());
} }
} }
@ -284,7 +284,7 @@ final class ModuleManager
$sth->execute(); $sth->execute();
$this->installed = $sth->fetchAll(\PDO::FETCH_GROUP); $this->installed = $sth->fetchAll(\PDO::FETCH_GROUP);
break; break;
default: default:
throw new InvalidDatabaseTypeException($this->app->dbPool->get('select')->getType()); throw new InvalidDatabaseTypeException($this->app->dbPool->get('select')->getType());
} }
} }

View File

@ -87,7 +87,7 @@ class StatusAbstract
$dbPool->get()->con->commit(); $dbPool->get()->con->commit();
break; break;
default: default:
throw new InvalidDatabaseTypeException($dbPool->get()->getType()); throw new InvalidDatabaseTypeException($dbPool->get()->getType());
} }
} }
@ -150,7 +150,7 @@ class StatusAbstract
$dbPool->get()->con->commit(); $dbPool->get()->con->commit();
break; break;
default: default:
throw new InvalidDatabaseTypeException($dbPool->get()->getType()); throw new InvalidDatabaseTypeException($dbPool->get()->getType());
} }
} }

View File

@ -30,7 +30,7 @@ interface SocketInterface
* *
* @param string $ip IP address * @param string $ip IP address
* @param int $port Port * @param int $port Port
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -324,7 +324,7 @@ interface ContainerInterface
* *
* This is used in order to initialize all resources. * This is used in order to initialize all resources.
* Sub-sub-resources are only initialized once they are needed. * Sub-sub-resources are only initialized once they are needed.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -32,7 +32,7 @@ class FtpStorage extends StorageAbstract
{ {
private static $instance = null; private static $instance = null;
public function __construct() public function __construct()
{ {
} }

View File

@ -118,7 +118,7 @@ final class Directory extends FileAbstract implements DirectoryInterface
new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS), new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS),
\RecursiveIteratorIterator::SELF_FIRST) as $item \RecursiveIteratorIterator::SELF_FIRST) as $item
) { ) {
if ((empty($extension) || $item->getExtension() === $extension) if ((empty($extension) || $item->getExtension() === $extension)
&& (empty($exclude) || (!(bool) preg_match('/' . $exclude . '/', $iterator->getSubPathname()))) && (empty($exclude) || (!(bool) preg_match('/' . $exclude . '/', $iterator->getSubPathname())))
) { ) {
$list[] = str_replace('\\', '/', $iterator->getSubPathname()); $list[] = str_replace('\\', '/', $iterator->getSubPathname());

View File

@ -34,7 +34,7 @@ final class OperatingSystem
{ {
} }
/** /**
* Get OS. * Get OS.
* *

View File

@ -25,7 +25,7 @@ use phpOMS\Utils\StringUtils;
* @license OMS License 1.0 * @license OMS License 1.0
* @link http://website.orange-management.de * @link http://website.orange-management.de
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.Superglobals) * @SuppressWarnings(PHPMD.Superglobals)
*/ */
final class Http implements UriInterface final class Http implements UriInterface
@ -337,7 +337,7 @@ final class Http implements UriInterface
*/ */
public function getAuthority() : string public function getAuthority() : string
{ {
return ($this->getUser() !== '' ? $this->getUser() . '@' : '') . $this->host return ($this->getUser() !== '' ? $this->getUser() . '@' : '') . $this->host
. ($this->port !== null && $this->port !== 0 ? ':' . $this->port : ''); . ($this->port !== null && $this->port !== 0 ? ':' . $this->port : '');
} }

View File

@ -128,7 +128,7 @@ final class ArrayUtils
if (!isset($current[$key])) { if (!isset($current[$key])) {
return null; return null;
} }
$current = $current[$key]; $current = $current[$key];
} }

View File

@ -23,7 +23,7 @@ use phpOMS\Stdlib\Base\Exception\InvalidEnumValue;
* @license OMS License 1.0 * @license OMS License 1.0
* @link http://website.orange-management.de * @link http://website.orange-management.de
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.CamelCasePropertyName) * @SuppressWarnings(PHPMD.CamelCasePropertyName)
* @SuppressWarnings(PHPMD.CamelCaseVariableName) * @SuppressWarnings(PHPMD.CamelCaseVariableName)
*/ */
@ -145,7 +145,7 @@ abstract class C128Abstract
* *
* @param int $width Barcode width * @param int $width Barcode width
* @param int $height Barcode height * @param int $height Barcode height
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -168,7 +168,7 @@ abstract class C128Abstract
* Set barcode margins * Set barcode margins
* *
* @param int $margin Barcode margin * @param int $margin Barcode margin
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -182,7 +182,7 @@ abstract class C128Abstract
* Set barcode orientation * Set barcode orientation
* *
* @param int $orientation Barcode orientation * @param int $orientation Barcode orientation
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -212,7 +212,7 @@ abstract class C128Abstract
* Set content to encrypt * Set content to encrypt
* *
* @param string $content Barcode content * @param string $content Barcode content
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -320,20 +320,20 @@ abstract class C128Abstract
if ($this->orientation === OrientationType::HORIZONTAL) { if ($this->orientation === OrientationType::HORIZONTAL) {
imagefilledrectangle( imagefilledrectangle(
$image, $image,
$location + $this->margin, $location + $this->margin,
0 + $this->margin, 0 + $this->margin,
$cur_size + $this->margin, $cur_size + $this->margin,
$dimensions['height'] - $this->margin, $dimensions['height'] - $this->margin,
($position % 2 == 0 ? $white : $black) ($position % 2 == 0 ? $white : $black)
); );
} else { } else {
imagefilledrectangle( imagefilledrectangle(
$image, $image,
0 + $this->margin, 0 + $this->margin,
$location + $this->margin, $location + $this->margin,
$dimensions['width'] - $this->margin, $dimensions['width'] - $this->margin,
$cur_size + $this->margin, $cur_size + $this->margin,
($position % 2 == 0 ? $white : $black) ($position % 2 == 0 ? $white : $black)
); );
} }
@ -357,7 +357,7 @@ abstract class C128Abstract
{ {
$codeLength = 0; $codeLength = 0;
$length = strlen($codeString); $length = strlen($codeString);
for ($i = 1; $i <= $length; ++$i) { for ($i = 1; $i <= $length; ++$i) {
$codeLength = $codeLength + (int) (substr($codeString, ($i - 1), 1)); $codeLength = $codeLength + (int) (substr($codeString, ($i - 1), 1));
} }

View File

@ -21,7 +21,7 @@ namespace phpOMS\Utils\Barcode;
* @license OMS License 1.0 * @license OMS License 1.0
* @link http://website.orange-management.de * @link http://website.orange-management.de
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.CamelCasePropertyName) * @SuppressWarnings(PHPMD.CamelCasePropertyName)
* @SuppressWarnings(PHPMD.CamelCaseVariableName) * @SuppressWarnings(PHPMD.CamelCaseVariableName)
*/ */
@ -84,7 +84,7 @@ class C128a extends C128Abstract
* Set content to encrypt * Set content to encrypt
* *
* @param string $content Content to encrypt * @param string $content Content to encrypt
* *
* @return void * @return void
* *
* @todo : add mirror parameter * @todo : add mirror parameter

View File

@ -21,7 +21,7 @@ namespace phpOMS\Utils\Barcode;
* @license OMS License 1.0 * @license OMS License 1.0
* @link http://website.orange-management.de * @link http://website.orange-management.de
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.CamelCasePropertyName) * @SuppressWarnings(PHPMD.CamelCasePropertyName)
* @SuppressWarnings(PHPMD.CamelCaseVariableName) * @SuppressWarnings(PHPMD.CamelCaseVariableName)
*/ */

View File

@ -21,7 +21,7 @@ namespace phpOMS\Utils\Barcode;
* @license OMS License 1.0 * @license OMS License 1.0
* @link http://website.orange-management.de * @link http://website.orange-management.de
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.CamelCasePropertyName) * @SuppressWarnings(PHPMD.CamelCasePropertyName)
* @SuppressWarnings(PHPMD.CamelCaseVariableName) * @SuppressWarnings(PHPMD.CamelCaseVariableName)
*/ */

View File

@ -21,7 +21,7 @@ namespace phpOMS\Utils\Barcode;
* @license OMS License 1.0 * @license OMS License 1.0
* @link http://website.orange-management.de * @link http://website.orange-management.de
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.CamelCasePropertyName) * @SuppressWarnings(PHPMD.CamelCasePropertyName)
* @SuppressWarnings(PHPMD.CamelCaseVariableName) * @SuppressWarnings(PHPMD.CamelCaseVariableName)
*/ */
@ -87,7 +87,7 @@ class C25 extends C128Abstract
* Set content to encrypt * Set content to encrypt
* *
* @param string $content Barcode content * @param string $content Barcode content
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -21,7 +21,7 @@ namespace phpOMS\Utils\Barcode;
* @license OMS License 1.0 * @license OMS License 1.0
* @link http://website.orange-management.de * @link http://website.orange-management.de
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.CamelCasePropertyName) * @SuppressWarnings(PHPMD.CamelCasePropertyName)
* @SuppressWarnings(PHPMD.CamelCaseVariableName) * @SuppressWarnings(PHPMD.CamelCaseVariableName)
*/ */
@ -65,7 +65,7 @@ class C39 extends C128Abstract
* Set content to encrypt * Set content to encrypt
* *
* @param string $content Barcode content * @param string $content Barcode content
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -21,7 +21,7 @@ namespace phpOMS\Utils\Barcode;
* @license OMS License 1.0 * @license OMS License 1.0
* @link http://website.orange-management.de * @link http://website.orange-management.de
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.CamelCasePropertyName) * @SuppressWarnings(PHPMD.CamelCasePropertyName)
* @SuppressWarnings(PHPMD.CamelCaseVariableName) * @SuppressWarnings(PHPMD.CamelCaseVariableName)
*/ */
@ -66,7 +66,7 @@ class Codebar extends C128Abstract
* Set content to encrypt * Set content to encrypt
* *
* @param string $content Barcode content * @param string $content Barcode content
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -53,7 +53,7 @@ class Currency
* Reset currency rates. * Reset currency rates.
* *
* Can be used in order to refresh them. Be careful currency rates only get updated once a day from the ECB website. * Can be used in order to refresh them. Be careful currency rates only get updated once a day from the ECB website.
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -38,9 +38,9 @@ class Ip
/** /**
* Convert ip to float * Convert ip to float
* *
* @param string $ip IP * @param string $ip IP
* *
* @return float * @return float
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -32,8 +32,8 @@ class Numeric
* @since 1.0.0 * @since 1.0.0
*/ */
public const ROMANS = [ public const ROMANS = [
'M' => 1000, 'CM' => 900, 'D' => 500, 'CD' => 400, 'C' => 100, 'M' => 1000, 'CM' => 900, 'D' => 500, 'CD' => 400, 'C' => 100,
'XC' => 90, 'L' => 50, 'XL' => 40, 'X' => 10, 'XC' => 90, 'L' => 50, 'XL' => 40, 'X' => 10,
'IX' => 9, 'V' => 5, 'IV' => 4, 'I' => 1 'IX' => 9, 'V' => 5, 'IV' => 4, 'I' => 1
]; ];
@ -77,9 +77,9 @@ class Numeric
for ($i = 1; $i <= $numberLen; ++$i) { for ($i = 1; $i <= $numberLen; ++$i) {
$newOutput = bcadd( $newOutput = bcadd(
(string) $newOutput, (string) $newOutput,
bcmul( bcmul(
(string) array_search($number[$i - 1], $fromBase), (string) array_search($number[$i - 1], $fromBase),
bcpow((string) $fromLen, (string) ($numberLen - $i)) bcpow((string) $fromLen, (string) ($numberLen - $i))
) )
); );

View File

@ -48,7 +48,7 @@ final class Huffman
* Set dictionary * Set dictionary
* *
* @param Dictionary $dictionary Huffman dictionary * @param Dictionary $dictionary Huffman dictionary
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -60,7 +60,7 @@ class Branch
* Set branch name * Set branch name
* *
* @param string $name Branch name * @param string $name Branch name
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -152,7 +152,7 @@ class Commit
* Set commit message. * Set commit message.
* *
* @param string $message Commit message * @param string $message Commit message
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -210,7 +210,7 @@ class Commit
* Set commit author. * Set commit author.
* *
* @param Author $author Commit author * @param Author $author Commit author
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -236,7 +236,7 @@ class Commit
* Set commit branch. * Set commit branch.
* *
* @param Branch $branch Commit branch * @param Branch $branch Commit branch
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -262,7 +262,7 @@ class Commit
* Set commit tag. * Set commit tag.
* *
* @param Tag $tag Commit tag * @param Tag $tag Commit tag
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -314,7 +314,7 @@ class Commit
* Set commit repository. * Set commit repository.
* *
* @param Repository $repository Commit repository * @param Repository $repository Commit repository
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -331,7 +331,7 @@ class Commit
* @param int $line Line number * @param int $line Line number
* @param string $old Old line * @param string $old Old line
* @param string $new New line * @param string $new New line
* *
* @return void * @return void
* *
* @throws \Exception * @throws \Exception

View File

@ -73,7 +73,7 @@ class Git
* Set git binary. * Set git binary.
* *
* @param string $path Git path * @param string $path Git path
* *
* @return void * @return void
* *
* @throws PathException * @throws PathException

View File

@ -76,7 +76,7 @@ class Repository
* Set repository path. * Set repository path.
* *
* @param string $path Path to repository * @param string $path Path to repository
* *
* @return void * @return void
* *
* @throws PathException * @throws PathException
@ -171,13 +171,13 @@ class Repository
private function run(string $cmd) : array private function run(string $cmd) : array
{ {
if (strtolower(substr(PHP_OS, 0, 3)) == 'win') { if (strtolower(substr(PHP_OS, 0, 3)) == 'win') {
$cmd = 'cd ' . escapeshellarg(dirname(Git::getBin())) $cmd = 'cd ' . escapeshellarg(dirname(Git::getBin()))
. ' && ' . basename(Git::getBin()) . ' && ' . basename(Git::getBin())
. ' -C ' . escapeshellarg($this->path) . ' ' . ' -C ' . escapeshellarg($this->path) . ' '
. $cmd; . $cmd;
} else { } else {
$cmd = escapeshellarg(Git::getBin()) $cmd = escapeshellarg(Git::getBin())
. ' -C ' . escapeshellarg($this->path) . ' ' . ' -C ' . escapeshellarg($this->path) . ' '
. $cmd; . $cmd;
} }
@ -772,9 +772,9 @@ class Repository
$addremove = ['added' => 0, 'removed' => 0]; $addremove = ['added' => 0, 'removed' => 0];
$lines = $this->run( $lines = $this->run(
'log --author=' . escapeshellarg($author->getName()) 'log --author=' . escapeshellarg($author->getName())
. ' --since="' . $start->format('Y-m-d') . ' --since="' . $start->format('Y-m-d')
. '" --before="' . $end->format('Y-m-d') . '" --before="' . $end->format('Y-m-d')
. '" --pretty=tformat: --numstat' . '" --pretty=tformat: --numstat'
); );
@ -828,10 +828,10 @@ class Repository
} }
$lines = $this->run( $lines = $this->run(
'git log --before="' . $end->format('Y-m-d') 'git log --before="' . $end->format('Y-m-d')
. '" --after="' . $start->format('Y-m-d') . '"' . '" --after="' . $start->format('Y-m-d') . '"'
. $author . ' --reverse --date=short'); . $author . ' --reverse --date=short');
$count = count($lines); $count = count($lines);
$commits = []; $commits = [];

View File

@ -68,7 +68,7 @@ class Tag
* Set tag name * Set tag name
* *
* @param string $message Tag message * @param string $message Tag message
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -27,7 +27,7 @@ class CsvDatabaseMapper implements IODatabaseMapper
private $delimiter = ';'; private $delimiter = ';';
private $enclosure = '"'; private $enclosure = '"';
private $lineBuffer = 500; private $lineBuffer = 500;
private $autoIdentifyCsvSettings = false; private $autoIdentifyCsvSettings = false;

View File

@ -47,7 +47,7 @@ class Tar implements ArchiveInterface
if (is_dir($source)) { if (is_dir($source)) {
$files = new \RecursiveIteratorIterator( $files = new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator($source), new \RecursiveDirectoryIterator($source),
\RecursiveIteratorIterator::SELF_FIRST \RecursiveIteratorIterator::SELF_FIRST
); );

View File

@ -208,7 +208,7 @@ class Markdown
/** /**
* Some definition data for elements * Some definition data for elements
* *
* @todo: figure out what it is for * @todo: figure out what it is for
* *
* @var string[] * @var string[]
@ -220,7 +220,7 @@ class Markdown
* Parse markdown * Parse markdown
* *
* @param string $text Markdown text * @param string $text Markdown text
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
@ -241,7 +241,7 @@ class Markdown
* Parse lines * Parse lines
* *
* @param array $lines Markdown lines * @param array $lines Markdown lines
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
@ -360,7 +360,7 @@ class Markdown
* *
* @param array $lineArray Line information * @param array $lineArray Line information
* @param array $block Block information * @param array $block Block information
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -392,7 +392,7 @@ class Markdown
* *
* @param array $lineArray Line information * @param array $lineArray Line information
* @param array $block Block information * @param array $block Block information
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -419,7 +419,7 @@ class Markdown
* Handle completed code * Handle completed code
* *
* @param array $block Block information * @param array $block Block information
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -433,7 +433,7 @@ class Markdown
* Handle fenced code * Handle fenced code
* *
* @param array $lineArray Line information * @param array $lineArray Line information
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -470,7 +470,7 @@ class Markdown
* *
* @param array $lineArray Line information * @param array $lineArray Line information
* @param array $block Block information * @param array $block Block information
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -503,7 +503,7 @@ class Markdown
* Handle completed fenced block code * Handle completed fenced block code
* *
* @param array $block Block information * @param array $block Block information
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -517,7 +517,7 @@ class Markdown
* Handle header element * Handle header element
* *
* @param array $lineArray Line information * @param array $lineArray Line information
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -550,7 +550,7 @@ class Markdown
* Handle list * Handle list
* *
* @param array $lineArray Line information * @param array $lineArray Line information
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -598,7 +598,7 @@ class Markdown
* *
* @param array $lineArray Line information * @param array $lineArray Line information
* @param array $block Block information * @param array $block Block information
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -653,7 +653,7 @@ class Markdown
* Handle block quote * Handle block quote
* *
* @param array $lineArray Line information * @param array $lineArray Line information
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -678,7 +678,7 @@ class Markdown
* *
* @param array $lineArray Line information * @param array $lineArray Line information
* @param array $block Block information * @param array $block Block information
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -710,7 +710,7 @@ class Markdown
* Handle HR element * Handle HR element
* *
* @param array $lineArray Line information * @param array $lineArray Line information
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -733,7 +733,7 @@ class Markdown
* *
* @param array $lineArray Line information * @param array $lineArray Line information
* @param array $block Block information * @param array $block Block information
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -757,7 +757,7 @@ class Markdown
* Handle content reference * Handle content reference
* *
* @param array $lineArray Line information * @param array $lineArray Line information
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -783,7 +783,7 @@ class Markdown
* *
* @param array $lineArray Line information * @param array $lineArray Line information
* @param array $block Block information * @param array $block Block information
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -880,7 +880,7 @@ class Markdown
* *
* @param array $lineArray Line information * @param array $lineArray Line information
* @param array $block Block information * @param array $block Block information
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -929,7 +929,7 @@ class Markdown
* Handle paragraph * Handle paragraph
* *
* @param array $lineArray Line information * @param array $lineArray Line information
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
@ -949,7 +949,7 @@ class Markdown
* Handle a single line * Handle a single line
* *
* @param string $text Line of text * @param string $text Line of text
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
@ -1000,7 +1000,7 @@ class Markdown
* Handle inline code * Handle inline code
* *
* @param array $excerpt Markdown excerpt * @param array $excerpt Markdown excerpt
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -1026,7 +1026,7 @@ class Markdown
* Handle inline email * Handle inline email
* *
* @param array $excerpt Markdown excerpt * @param array $excerpt Markdown excerpt
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -1059,7 +1059,7 @@ class Markdown
* Handle inline emphasis * Handle inline emphasis
* *
* @param array $excerpt Markdown excerpt * @param array $excerpt Markdown excerpt
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -1096,7 +1096,7 @@ class Markdown
* Handle escape of special char * Handle escape of special char
* *
* @param array $excerpt Markdown excerpt * @param array $excerpt Markdown excerpt
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -1117,7 +1117,7 @@ class Markdown
* Handle inline image * Handle inline image
* *
* @param array $excerpt Markdown excerpt * @param array $excerpt Markdown excerpt
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -1157,7 +1157,7 @@ class Markdown
* Handle inline link * Handle inline link
* *
* @param array $excerpt Markdown excerpt * @param array $excerpt Markdown excerpt
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -1223,7 +1223,7 @@ class Markdown
* Handle special char to html * Handle special char to html
* *
* @param array $excerpt Markdown excerpt * @param array $excerpt Markdown excerpt
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -1251,7 +1251,7 @@ class Markdown
* Handle inline strike through * Handle inline strike through
* *
* @param array $excerpt Markdown excerpt * @param array $excerpt Markdown excerpt
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -1280,7 +1280,7 @@ class Markdown
* Handle inline url * Handle inline url
* *
* @param array $excerpt Markdown excerpt * @param array $excerpt Markdown excerpt
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -1312,7 +1312,7 @@ class Markdown
* Handle inline url * Handle inline url
* *
* @param array $excerpt Markdown excerpt * @param array $excerpt Markdown excerpt
* *
* @return null|array * @return null|array
* *
* @since 1.0.0 * @since 1.0.0
@ -1339,7 +1339,7 @@ class Markdown
* Clean up normal text * Clean up normal text
* *
* @param string $text Normal text * @param string $text Normal text
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
@ -1356,7 +1356,7 @@ class Markdown
* Handle general html element * Handle general html element
* *
* @param array $element Html element * @param array $element Html element
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
@ -1391,7 +1391,7 @@ class Markdown
* Handle an array of elements * Handle an array of elements
* *
* @param array $elements Elements * @param array $elements Elements
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
@ -1411,11 +1411,11 @@ class Markdown
/** /**
* Remove blocks * Remove blocks
* *
* @param array $lines Lines * @param array $lines Lines
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
*/ */
protected static function li(array $lines) : string protected static function li(array $lines) : string
@ -1435,9 +1435,9 @@ class Markdown
/** /**
* Sanitize an element * Sanitize an element
* *
* @param array $element Element to sanitize * @param array $element Element to sanitize
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
@ -1468,10 +1468,10 @@ class Markdown
/** /**
* Replace unsafe url * Replace unsafe url
* *
* @param array $element Element to sanitize * @param array $element Element to sanitize
* @param string $attribute Element attribute * @param string $attribute Element attribute
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
@ -1491,10 +1491,10 @@ class Markdown
/** /**
* Escape html elements * Escape html elements
* *
* @param string $text Text to escape * @param string $text Text to escape
* @param bool $allowQuotes Are quotes allowed * @param bool $allowQuotes Are quotes allowed
* *
* @return string * @return string
* *
* @since 1.0.0 * @since 1.0.0
@ -1506,10 +1506,10 @@ class Markdown
/** /**
* Check if string starts with * Check if string starts with
* *
* @param string $string Text to check against * @param string $string Text to check against
* @param string $needle Needle to check * @param string $needle Needle to check
* *
* @return bool * @return bool
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -469,13 +469,13 @@ class Name
'female' => ['none'], 'female' => ['none'],
'male' => ['none'], 'male' => ['none'],
'family' => [ 'family' => [
'Հովհաննիսյան', 'Հարությունյան', 'Սարգսյան', 'Խաչատրյան', 'Գրիգորյան', 'আহমেদ', 'আলী', 'আক্তার', 'Հովհաննիսյան', 'Հարությունյան', 'Սարգսյան', 'Խաչատրյան', 'Գրիգորյան', 'আহমেদ', 'আলী', 'আক্তার',
'বন্দ্যোপাধ্যায়', 'নিক', 'ব্যাপারী', 'বড়ুয়া', 'বিশ্বাস', 'ভৌমিক', 'বসু', '王', '李', '张', '刘', '陈', '杨', 'বন্দ্যোপাধ্যায়', 'নিক', 'ব্যাপারী', 'বড়ুয়া', 'বিশ্বাস', 'ভৌমিক', 'বসু', '王', '李', '张', '刘', '陈', '杨',
'黄', '赵', '吴', '周', '徐', '孙', '马', '朱', '胡', '郭', '何', '高', '林', '罗', 'כהן', 'לוי', '黄', '赵', '吴', '周', '徐', '孙', '马', '朱', '胡', '郭', '何', '高', '林', '罗', 'כהן', 'לוי',
'מזרחי', 'פרץ', 'ביטון', 'דהן', 'אברהם', 'פרידמן', 'מלכה', 'אזולאי', 'כץ', 'יוסף', 'דוד', 'עמר', 'מזרחי', 'פרץ', 'ביטון', 'דהן', 'אברהם', 'פרידמן', 'מלכה', 'אזולאי', 'כץ', 'יוסף', 'דוד', 'עמר',
'אוחיון', '김', '리', '박', '최', '정', '강', '조', '윤', '장', '림', '한', '신', '서', '권', '황', 'אוחיון', '김', '리', '박', '최', '정', '강', '조', '윤', '장', '림', '한', '신', '서', '권', '황',
'안', '송', '홍', '고', '문', '손', '량', 'Yılmaz', 'Kaya', 'Demir', 'Şahin', 'Çelik', 'Yıldız', '안', '송', '홍', '고', '문', '손', '량', 'Yılmaz', 'Kaya', 'Demir', 'Şahin', 'Çelik', 'Yıldız',
'Yıldırım', 'Öztürk', 'Aydın', 'Özdemir', 'Arslan', 'Doğan', 'Kılıç', 'Aslan', 'Çetin', 'Kara', 'Yıldırım', 'Öztürk', 'Aydın', 'Özdemir', 'Arslan', 'Doğan', 'Kılıç', 'Aslan', 'Çetin', 'Kara',
'Koç', 'Kurt', 'Özkan', 'Şimşek', 'Koç', 'Kurt', 'Özkan', 'Şimşek',
], ],
] ]

View File

@ -56,7 +56,7 @@ class Phone
for ($i = ($isInt ? 2 : 1); $i < $numberParts; ++$i) { for ($i = ($isInt ? 2 : 1); $i < $numberParts; ++$i) {
$numberString = str_replace( $numberString = str_replace(
'$' . $i, StringUtils::generateString($layout['size'][$i - 1][0], $layout['size'][$i - 1][1], '0123456789'), '$' . $i, StringUtils::generateString($layout['size'][$i - 1][0], $layout['size'][$i - 1][1], '0123456789'),
$numberString $numberString
); );
} }

View File

@ -36,7 +36,7 @@ class StringUtils
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function generateString(int $min = 10, int $max = 10, public static function generateString(int $min = 10, int $max = 10,
string $charset = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' string $charset = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
) : string ) : string
{ {

View File

@ -169,9 +169,9 @@ final class StringCompare
* @since 1.0.0 * @since 1.0.0
*/ */
public static function fuzzyMatch( public static function fuzzyMatch(
string $s1, string $s2, string $s1, string $s2,
float $phraseWeight = 0.5, float $wordWeight = 1, float $phraseWeight = 0.5, float $wordWeight = 1,
float $minWeight = 10, float $maxWeight = 1, float $minWeight = 10, float $maxWeight = 1,
float $lengthWeight = -0.3 float $lengthWeight = -0.3
) : float ) : float
{ {

View File

@ -23,7 +23,7 @@ namespace phpOMS\Utils;
* @license OMS License 1.0 * @license OMS License 1.0
* @link http://website.orange-management.de * @link http://website.orange-management.de
* @since 1.0.0 * @since 1.0.0
* *
* @SuppressWarnings(PHPMD.CamelCaseMethodName) * @SuppressWarnings(PHPMD.CamelCaseMethodName)
*/ */
final class StringUtils final class StringUtils

View File

@ -109,7 +109,7 @@ class Interval implements \Serializable
* Unserialize. * Unserialize.
* *
* @param string $serialized String to unserialize * @param string $serialized String to unserialize
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
@ -282,7 +282,7 @@ class Interval implements \Serializable
* @param bool $any Any * @param bool $any Any
* *
* @return void * @return void
* *
* @throws \Exception * @throws \Exception
* *
* @since 1.0.0 * @since 1.0.0
@ -345,7 +345,7 @@ class Interval implements \Serializable
* @param array $hour Hour * @param array $hour Hour
* @param int $step Step * @param int $step Step
* @param bool $any Any * @param bool $any Any
* *
* @return void * @return void
* *
* @throws \Exception * @throws \Exception
@ -385,7 +385,7 @@ class Interval implements \Serializable
* @param bool $any Any * @param bool $any Any
* @param bool $last Last * @param bool $last Last
* @param int $nearest Nearest day * @param int $nearest Nearest day
* *
* @return void * @return void
* *
* @throws \Exception * @throws \Exception
@ -454,7 +454,7 @@ class Interval implements \Serializable
* @param int $step Step * @param int $step Step
* @param bool $any Any * @param bool $any Any
* @param bool $last Last * @param bool $last Last
* *
* @return void * @return void
* *
* @throws \Exception * @throws \Exception
@ -518,7 +518,7 @@ class Interval implements \Serializable
* @param array $month Month * @param array $month Month
* @param int $step Step * @param int $step Step
* @param bool $any Any * @param bool $any Any
* *
* @return void * @return void
* *
* @throws \Exception * @throws \Exception
@ -556,7 +556,7 @@ class Interval implements \Serializable
* @param array $year Year * @param array $year Year
* @param int $step Step * @param int $step Step
* @param bool $any Any * @param bool $any Any
* *
* @return void * @return void
* *
* @throws \Exception * @throws \Exception

View File

@ -52,7 +52,7 @@ abstract class SchedulerAbstract
* Set git binary. * Set git binary.
* *
* @param string $path Git path * @param string $path Git path
* *
* @return void * @return void
* *
* @throws PathException * @throws PathException

View File

@ -36,7 +36,7 @@ final class TestUtils
{ {
} }
/** /**
* Set private object member * Set private object member
* *

View File

@ -90,7 +90,7 @@ class View extends ViewAbstract
/** /**
* Get data attached to view * Get data attached to view
* *
* @param string $id Data Id * @param string $id Data Id
* *
* @return mixed * @return mixed
@ -104,7 +104,7 @@ class View extends ViewAbstract
/** /**
* Set data of view * Set data of view
* *
* @param string $id Data ID * @param string $id Data ID
* @param mixed $data Data * @param mixed $data Data
* *
@ -139,7 +139,7 @@ class View extends ViewAbstract
/** /**
* Add data to view * Add data to view
* *
* @param string $id Data ID * @param string $id Data ID
* @param mixed $data Data * @param mixed $data Data
* *
@ -219,7 +219,7 @@ class View extends ViewAbstract
/** /**
* Get request of view * Get request of view
* *
* @return RequestAbstract|null * @return RequestAbstract|null
* *
* @since 1.0.0 * @since 1.0.0
@ -231,7 +231,7 @@ class View extends ViewAbstract
/** /**
* Get response of view * Get response of view
* *
* @return ResponseAbstract|null * @return ResponseAbstract|null
* *
* @since 1.0.0 * @since 1.0.0

View File

@ -18,7 +18,7 @@ use phpOMS\System\File\PathException;
/** /**
* View Abstract. * View Abstract.
* *
* @package phpOMS\Views * @package phpOMS\Views
* @license OMS License 1.0 * @license OMS License 1.0
* @link http://website.orange-management.de * @link http://website.orange-management.de
@ -118,7 +118,7 @@ abstract class ViewAbstract implements \Serializable
/** /**
* Returns all views * Returns all views
* *
* @return View[] * @return View[]
* *
* @since 1.0.0 * @since 1.0.0
@ -130,7 +130,7 @@ abstract class ViewAbstract implements \Serializable
/** /**
* Returns a specific view * Returns a specific view
* *
* @param string $id View ID * @param string $id View ID
* *
* @return false|View * @return false|View

View File

@ -24,7 +24,7 @@ require_once __DIR__ . '/../Autoloader.php';
class AccountManagerTest extends \PHPUnit\Framework\TestCase class AccountManagerTest extends \PHPUnit\Framework\TestCase
{ {
public function testAttributes() public function testAttributes()
{ {
$manager = new AccountManager($GLOBALS['httpSession']); $manager = new AccountManager($GLOBALS['httpSession']);
self::assertInstanceOf('\phpOMS\Account\AccountManager', $manager); self::assertInstanceOf('\phpOMS\Account\AccountManager', $manager);
@ -33,7 +33,7 @@ class AccountManagerTest extends \PHPUnit\Framework\TestCase
self::assertObjectHasAttribute('accounts', $manager); self::assertObjectHasAttribute('accounts', $manager);
} }
public function testDefault() public function testDefault()
{ {
$manager = new AccountManager($GLOBALS['httpSession']); $manager = new AccountManager($GLOBALS['httpSession']);

View File

@ -20,7 +20,7 @@ require_once __DIR__ . '/../Autoloader.php';
class GroupTest extends \PHPUnit\Framework\TestCase class GroupTest extends \PHPUnit\Framework\TestCase
{ {
public function testAttributes() public function testAttributes()
{ {
$group = new Group(); $group = new Group();
self::assertInstanceOf('\phpOMS\Account\Group', $group); self::assertInstanceOf('\phpOMS\Account\Group', $group);
@ -35,7 +35,7 @@ class GroupTest extends \PHPUnit\Framework\TestCase
self::assertObjectHasAttribute('status', $group); self::assertObjectHasAttribute('status', $group);
} }
public function testDefault() public function testDefault()
{ {
$group = new Group(); $group = new Group();

View File

@ -40,7 +40,7 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase
if (file_exists(__DIR__ . '/Cache')) { if (file_exists(__DIR__ . '/Cache')) {
rmdir(__DIR__ . '/Cache'); rmdir(__DIR__ . '/Cache');
} }
$cache = new FileCache(__DIR__ . '/Cache'); $cache = new FileCache(__DIR__ . '/Cache');
$cache->set('key1', 'testVal'); $cache->set('key1', 'testVal');

View File

@ -61,19 +61,19 @@ class BaseModel
$this->belongsToOne = new BelongsToModel(); $this->belongsToOne = new BelongsToModel();
$this->serializable = new class implements \Serializable { $this->serializable = new class implements \Serializable {
public function serialize() public function serialize()
{ {
return '123'; return '123';
} }
public function unserialize($data) public function unserialize($data)
{ {
} }
}; };
$this->jsonSerializable = new class implements \JsonSerializable { $this->jsonSerializable = new class implements \JsonSerializable {
public function jsonSerialize() public function jsonSerialize()
{ {
return [1, 2, 3]; return [1, 2, 3];
} }

View File

@ -129,7 +129,7 @@ class FileLoggerTest extends \PHPUnit\Framework\TestCase
'message' => 'msg', 'message' => 'msg',
'line' => 11, 'line' => 11,
'file' => FileLoggerTest::class, 'file' => FileLoggerTest::class,
]); ]);
$ob = ob_get_clean(); $ob = ob_get_clean();
self::assertEquals(2, $log->countLogs()['info'] ?? 0); self::assertEquals(2, $log->countLogs()['info'] ?? 0);
self::assertTrue(stripos($ob, 'msg;') !== false); self::assertTrue(stripos($ob, 'msg;') !== false);

View File

@ -66,12 +66,12 @@ class FunctionsTest extends \PHPUnit\Framework\TestCase
self::assertEquals(5, Functions::getRelativeDegree(12, 12, 7)); self::assertEquals(5, Functions::getRelativeDegree(12, 12, 7));
self::assertEquals(11, Functions::getRelativeDegree(6, 12, 7)); self::assertEquals(11, Functions::getRelativeDegree(6, 12, 7));
} }
public function testPower() public function testPower()
{ {
self::assertEquals([4, 9, 16], Functions::powerInt([2, 3, 4], 2)); self::assertEquals([4, 9, 16], Functions::powerInt([2, 3, 4], 2));
self::assertEquals([8, 27, 64], Functions::powerInt([2, 3, 4], 3)); self::assertEquals([8, 27, 64], Functions::powerInt([2, 3, 4], 3));
self::assertEquals([2.0, 3.0, 4.0], Functions::powerFloat([4, 9, 16], 1 / 2), '', 0.0); self::assertEquals([2.0, 3.0, 4.0], Functions::powerFloat([4, 9, 16], 1 / 2), '', 0.0);
self::assertEquals([2.0, 3.0, 4.0], Functions::powerFloat([8, 27, 64], 1 / 3), '', 0.0); self::assertEquals([2.0, 3.0, 4.0], Functions::powerFloat([8, 27, 64], 1 / 3), '', 0.0);
} }

View File

@ -29,7 +29,7 @@ class GammaTest extends \PHPUnit\Framework\TestCase
2.15697602, 1.20285073, 0.92213701, 0.83974270, 0.85919025, 0.95950218, 1.14910642, 1.45849038, 1.94540320, 2.70976382, 2.15697602, 1.20285073, 0.92213701, 0.83974270, 0.85919025, 0.95950218, 1.14910642, 1.45849038, 1.94540320, 2.70976382,
]; ];
$spouge = [ $spouge = [
2.67893853, 1.35411794, 1.00000000, 0.89297951, 0.90274529, 1.00000000, 1.19063935, 1.50457549, 2.00000000, 2.77815848, 2.67893853, 1.35411794, 1.00000000, 0.89297951, 0.90274529, 1.00000000, 1.19063935, 1.50457549, 2.00000000, 2.77815848,
]; ];

View File

@ -27,7 +27,7 @@ class AverageTest extends \PHPUnit\Framework\TestCase
self::assertEquals(4, Average::arithmeticMean([1, 2, 3, 4, 5, 6, 7]), '', 0.01); self::assertEquals(4, Average::arithmeticMean([1, 2, 3, 4, 5, 6, 7]), '', 0.01);
self::assertEquals(69 / 20, Average::weightedAverage( self::assertEquals(69 / 20, Average::weightedAverage(
[1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 7],
[0.1, 0.2, 0.3, 0.1, 0.2, 0.05, 0.05] [0.1, 0.2, 0.3, 0.1, 0.2, 0.05, 0.05]
), '', 0.01); ), '', 0.01);

View File

@ -20,12 +20,12 @@ class BasicTest extends \PHPUnit\Framework\TestCase
public function testFrequency() public function testFrequency()
{ {
self::assertEquals( self::assertEquals(
[1 / 10, 2 / 10, 3 / 10, 4 / 10], [1 / 10, 2 / 10, 3 / 10, 4 / 10],
Basic::frequency([1, 2, 3, 4]) Basic::frequency([1, 2, 3, 4])
); );
self::assertEquals( self::assertEquals(
[1 / 10, 2 / 10, 3 / 10, [1 / 6, 2 / 6, 3 / 6], 4 / 10], [1 / 10, 2 / 10, 3 / 10, [1 / 6, 2 / 6, 3 / 6], 4 / 10],
Basic::frequency([1, 2, 3, [1, 2, 3], 4]) Basic::frequency([1, 2, 3, [1, 2, 3], 4])
); );
} }

View File

@ -33,7 +33,7 @@ class ErrorTest extends \PHPUnit\Framework\TestCase
) )
); );
} }
public function testErrorPercentage() public function testErrorPercentage()
{ {
self::assertEquals(300 / 1000, Error::getPercentageError(300, 1000), '', 0.01); self::assertEquals(300 / 1000, Error::getPercentageError(300, 1000), '', 0.01);
@ -53,7 +53,7 @@ class ErrorTest extends \PHPUnit\Framework\TestCase
) )
); );
} }
public function testMeanError() public function testMeanError()
{ {
$errors = [ $errors = [
@ -62,7 +62,7 @@ class ErrorTest extends \PHPUnit\Framework\TestCase
200 - 200, 200 - 200,
500 - -300 500 - -300
]; ];
self::assertEquals(300, Error::getMeanAbsoulteError($errors), '', 0.01); self::assertEquals(300, Error::getMeanAbsoulteError($errors), '', 0.01);
self::assertEquals(125000, Error::getMeanSquaredError($errors), '', 0.01); self::assertEquals(125000, Error::getMeanSquaredError($errors), '', 0.01);
self::assertEquals(406.2019, Error::getRootMeanSquaredError($errors), '', 0.01); self::assertEquals(406.2019, Error::getRootMeanSquaredError($errors), '', 0.01);

View File

@ -30,7 +30,7 @@ class MeasureOfDispersionTest extends \PHPUnit\Framework\TestCase
public function testEmpiricalCovariance() public function testEmpiricalCovariance()
{ {
self::assertEquals( self::assertEquals(
4.667, 4.667,
MeasureOfDispersion::empiricalCovariance( MeasureOfDispersion::empiricalCovariance(
[1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 7],
[3, 4, 5, 9, 7, 8, 9] [3, 4, 5, 9, 7, 8, 9]

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