mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-19 04:58:41 +00:00
Remove whitespace
This commit is contained in:
parent
e36f56da30
commit
37add470eb
|
|
@ -112,7 +112,7 @@ class Group implements ArrayableInterface, \JsonSerializable
|
|||
* Set group name.
|
||||
*
|
||||
* @param string $name Group name
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -138,7 +138,7 @@ class Group implements ArrayableInterface, \JsonSerializable
|
|||
* Set group description.
|
||||
*
|
||||
* @param string $description Group description
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -164,9 +164,9 @@ class Group implements ArrayableInterface, \JsonSerializable
|
|||
* Set group status.
|
||||
*
|
||||
* @param int $status Group status
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*
|
||||
* @throws InvalidEnumValue
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ namespace phpOMS;
|
|||
|
||||
/**
|
||||
* Application class.
|
||||
*
|
||||
* This class contains all necessary application members. Access to them
|
||||
* is restricted to write once in order to prevent manipulation
|
||||
*
|
||||
* This class contains all necessary application members. Access to them
|
||||
* is restricted to write once in order to prevent manipulation
|
||||
* and afterwards read only.
|
||||
*
|
||||
* @property string $appName
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace phpOMS;
|
|||
|
||||
/**
|
||||
* Autoloader exception
|
||||
*
|
||||
*
|
||||
* This exception is thrown if a file couldn't be autoloaded
|
||||
*
|
||||
* @package phpOMS
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ final class Autoloader
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add base path for autoloading
|
||||
*
|
||||
|
|
@ -57,7 +57,7 @@ final class Autoloader
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function addPath(string $path) : void
|
||||
public static function addPath(string $path) : void
|
||||
{
|
||||
self::$paths[] = $path;
|
||||
}
|
||||
|
|
@ -83,7 +83,7 @@ final class Autoloader
|
|||
foreach (self::$paths as $path) {
|
||||
if (file_exists($file = $path . $class . '.php')) {
|
||||
include_once $file;
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -110,7 +110,7 @@ final class Autoloader
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,8 +57,8 @@ final class Depreciation
|
|||
|
||||
/**
|
||||
* 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 $residual Residual value
|
||||
|
|
@ -160,7 +160,7 @@ final class Depreciation
|
|||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ use phpOMS\Math\Matrix\Exception\InvalidDimensionException;
|
|||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CamelCaseParameterName)
|
||||
* @SuppressWarnings(PHPMD.CamelCaseVariableName)
|
||||
*/
|
||||
|
|
@ -33,7 +33,7 @@ final class FinanceFormulas
|
|||
|
||||
/**
|
||||
* Annual Percentage Yield
|
||||
*
|
||||
*
|
||||
* The annual percentage yield (APY) calculates the yield taking compounding
|
||||
* into consideration.
|
||||
*
|
||||
|
|
@ -871,9 +871,9 @@ final class FinanceFormulas
|
|||
|
||||
/**
|
||||
* Future Value
|
||||
*
|
||||
*
|
||||
* 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}
|
||||
*
|
||||
* @param float $C Cash flow at period 0
|
||||
|
|
@ -907,10 +907,10 @@ final class FinanceFormulas
|
|||
|
||||
/**
|
||||
* Future Value Factor
|
||||
*
|
||||
* 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 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.
|
||||
*
|
||||
* @latex f = \left(1 + r\right)^{n}
|
||||
*
|
||||
* @param float $r Rate of return
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class ARIMA
|
|||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
*
|
||||
* @param array $data Data points
|
||||
* @param int $order Data intervals (only 12 and 4 are valid).
|
||||
*
|
||||
|
|
@ -61,7 +61,7 @@ class ARIMA
|
|||
|
||||
/**
|
||||
* Return data decomposition.
|
||||
*
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace phpOMS\Business\Finance;
|
|||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CamelCaseParameterName)
|
||||
* @SuppressWarnings(PHPMD.CamelCaseVariableName)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace phpOMS\Business\Finance;
|
|||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CamelCaseParameterName)
|
||||
* @SuppressWarnings(PHPMD.CamelCaseVariableName)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ final class Metrics
|
|||
* @return int
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CamelCaseMethodName)
|
||||
*/
|
||||
public static function CRAP(int $complexity, float $coverage) : int
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class MemCached extends ConnectionAbstract
|
|||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
*
|
||||
* @param array $data Cache data
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class RedisCache extends ConnectionAbstract
|
|||
{
|
||||
$this->status = CacheStatus::ACTIVE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ final class CookieJar
|
|||
* Constructor.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
*/
|
||||
public function __construct()
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ interface DataStorageConnectionInterface
|
|||
* @param string[] $data the basic datastorage information for establishing a connection
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*
|
||||
* @todo make private, reason was that not everyone wants to connect during initialization?!
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ abstract class BuilderAbstract
|
|||
* Escape string value
|
||||
*
|
||||
* @param string $value Value to escape
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ abstract class ConnectionAbstract implements ConnectionInterface
|
|||
* Database prefix.
|
||||
*
|
||||
* The database prefix name for unique table names
|
||||
*
|
||||
*
|
||||
* @todo: make private? could add huge overhead since function call required
|
||||
*
|
||||
* @var string
|
||||
|
|
|
|||
|
|
@ -468,7 +468,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
$query->prefix(self::$db->getPrefix())->into(static::$table);
|
||||
|
||||
foreach (static::$columns as $key => $column) {
|
||||
if (isset(static::$hasMany[$key])
|
||||
if (isset(static::$hasMany[$key])
|
||||
|| isset(static::$hasOne[$key])
|
||||
) {
|
||||
continue;
|
||||
|
|
@ -609,7 +609,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!isset($relReflectionClass)) {
|
||||
if ($relReflectionClass === null) {
|
||||
$relReflectionClass = new \ReflectionClass($value);
|
||||
}
|
||||
|
||||
|
|
@ -877,12 +877,19 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*/
|
||||
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) {
|
||||
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');
|
||||
} elseif ($type === 'Json' || $type === 'jsonSerializable' || is_array($value)) {
|
||||
} elseif ($type === 'Json' || $type === 'jsonSerializable') {
|
||||
return json_encode($value);
|
||||
} elseif ($type === 'Serializable') {
|
||||
return $value->serialize();
|
||||
|
|
@ -890,14 +897,6 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
return json_encode($value->jsonSerialize());
|
||||
} elseif (is_object($value) && method_exists($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;
|
||||
|
|
@ -950,7 +949,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!isset($relReflectionClass)) {
|
||||
if ($relReflectionClass === null) {
|
||||
$relReflectionClass = new \ReflectionClass($value);
|
||||
}
|
||||
|
||||
|
|
@ -1120,8 +1119,8 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
|
||||
foreach (static::$columns as $key => $column) {
|
||||
$propertyName = stripos($column['internal'], '/') !== false ? explode('/', $column['internal'])[0] : $column['internal'];
|
||||
if (isset(static::$hasMany[$propertyName])
|
||||
|| isset(static::$hasOne[$propertyName])
|
||||
if (isset(static::$hasMany[$propertyName])
|
||||
|| isset(static::$hasOne[$propertyName])
|
||||
|| $column['internal'] === static::$primaryField
|
||||
) {
|
||||
continue;
|
||||
|
|
@ -1148,7 +1147,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
} elseif ($column['name'] !== static::$primaryField) {
|
||||
$tValue = $property->getValue($obj);
|
||||
if (stripos($column['internal'], '/') !== false) {
|
||||
$path = explode('/', $column['internal']);
|
||||
$path = explode('/', $column['internal']);
|
||||
|
||||
array_shift($path);
|
||||
$path = implode('/', $path);
|
||||
|
|
@ -1254,7 +1253,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!isset($relReflectionClass)) {
|
||||
if ($relReflectionClass === null) {
|
||||
$relReflectionClass = new \ReflectionClass($value);
|
||||
}
|
||||
|
||||
|
|
@ -1776,19 +1775,26 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
continue;
|
||||
}
|
||||
|
||||
$hasPath = false;
|
||||
|
||||
if (stripos(static::$columns[$column]['internal'], '/') !== false) {
|
||||
$refProp = $refClass->getProperty(explode('/', static::$columns[$column]['internal'])[0]);
|
||||
$path = explode(static::$columns[$column]['internal']);
|
||||
$hasPath = true;
|
||||
$path = explode('/', static::$columns[$column]['internal']);
|
||||
$refProp = $refClass->getProperty($path[0]);
|
||||
|
||||
if (!($accessible = $refProp->isPublic())) {
|
||||
$refProp->setAccessible(true);
|
||||
}
|
||||
|
||||
array_shift($path);
|
||||
$path = implode('/', $path);
|
||||
$aValue = $refProp->getValue($obj);
|
||||
$path = implode('/', $path);
|
||||
$aValue = $refProp->getValue($obj);
|
||||
} else {
|
||||
$refProp = $refClass->getProperty(static::$columns[$column]['internal']);
|
||||
}
|
||||
|
||||
if (!($accessible = $refProp->isPublic())) {
|
||||
$refProp->setAccessible(true);
|
||||
if (!($accessible = $refProp->isPublic())) {
|
||||
$refProp->setAccessible(true);
|
||||
}
|
||||
}
|
||||
|
||||
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']);
|
||||
}
|
||||
|
||||
if (isset($path)) {
|
||||
if ($hasPath) {
|
||||
$value = ArrayUtils::setArray($path, $aValue, $value, '/', true);
|
||||
}
|
||||
|
||||
$refProp->setValue($obj, $value);
|
||||
} elseif (static::$columns[$column]['type'] === 'DateTime') {
|
||||
$value = new \DateTime($value ?? '');
|
||||
if (stripos(static::$columns[$column]['internal'], '/') !== false) {
|
||||
if ($hasPath) {
|
||||
$value = ArrayUtils::setArray($path, $aValue, $value, '/', true);
|
||||
}
|
||||
|
||||
$refProp->setValue($obj, $value);
|
||||
} elseif (static::$columns[$column]['type'] === 'Json') {
|
||||
if (stripos(static::$columns[$column]['internal'], '/') !== false) {
|
||||
if ($hasPath) {
|
||||
$value = ArrayUtils::setArray($path, $aValue, $value, '/', true);
|
||||
}
|
||||
|
||||
|
|
@ -1837,8 +1843,6 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws \UnexpectedValueException
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function populateAbstractArray(array $result) : array
|
||||
|
|
@ -1890,7 +1894,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
}
|
||||
|
||||
if (!isset(self::$parentMapper)) {
|
||||
self::setUpParentMapper();
|
||||
self::$parentMapper = static::class;
|
||||
}
|
||||
|
||||
self::extend(__CLASS__);
|
||||
|
|
@ -1972,7 +1976,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
}
|
||||
|
||||
if (!isset(self::$parentMapper)) {
|
||||
self::setUpParentMapper();
|
||||
self::$parentMapper = static::class;
|
||||
}
|
||||
|
||||
self::extend(__CLASS__);
|
||||
|
|
@ -2017,7 +2021,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
}
|
||||
|
||||
if (!isset(self::$parentMapper)) {
|
||||
self::setUpParentMapper();
|
||||
self::$parentMapper = static::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)
|
||||
{
|
||||
if (!isset(self::$parentMapper)) {
|
||||
self::setUpParentMapper();
|
||||
self::$parentMapper = static::class;
|
||||
}
|
||||
|
||||
self::extend(__CLASS__);
|
||||
|
|
@ -2104,7 +2108,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
}
|
||||
|
||||
if (!isset(self::$parentMapper)) {
|
||||
self::setUpParentMapper();
|
||||
self::$parentMapper = static::class;
|
||||
}
|
||||
|
||||
$obj = self::populateIterable(self::getAllRaw($lang));
|
||||
|
|
@ -2132,7 +2136,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
}
|
||||
|
||||
if (!isset(self::$parentMapper)) {
|
||||
self::setUpParentMapper();
|
||||
self::$parentMapper = static::class;
|
||||
}
|
||||
|
||||
$obj = self::populateIterableArray(self::getAllRaw($lang));
|
||||
|
|
@ -2506,7 +2510,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
->leftOuterJoin($value['table'])
|
||||
->on(new And('1', new And(new Or('d1', 'd2'), 'id')))
|
||||
->where($value['table'] . '.' . $value['dst'], '=', 'NULL');
|
||||
|
||||
|
||||
}*/
|
||||
|
||||
$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
|
||||
*
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ abstract class GrammarAbstract
|
|||
* Set table prefix.
|
||||
*
|
||||
* @param string $prefix Table prefix
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -777,7 +777,7 @@ final class Builder extends BuilderAbstract
|
|||
|
||||
/**
|
||||
* Lock query.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -788,7 +788,7 @@ final class Builder extends BuilderAbstract
|
|||
|
||||
/**
|
||||
* Lock for update query.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -799,7 +799,7 @@ final class Builder extends BuilderAbstract
|
|||
|
||||
/**
|
||||
* Create query string.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -811,7 +811,7 @@ final class Builder extends BuilderAbstract
|
|||
|
||||
/**
|
||||
* Find query.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -837,7 +837,7 @@ final class Builder extends BuilderAbstract
|
|||
|
||||
/**
|
||||
* Select minimum.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -848,7 +848,7 @@ final class Builder extends BuilderAbstract
|
|||
|
||||
/**
|
||||
* Select maximum.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -859,7 +859,7 @@ final class Builder extends BuilderAbstract
|
|||
|
||||
/**
|
||||
* Select sum.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -870,7 +870,7 @@ final class Builder extends BuilderAbstract
|
|||
|
||||
/**
|
||||
* Select average.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1034,7 +1034,7 @@ final class Builder extends BuilderAbstract
|
|||
|
||||
/**
|
||||
* Delete query
|
||||
*
|
||||
*
|
||||
* @return Builder
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1052,7 +1052,7 @@ final class Builder extends BuilderAbstract
|
|||
|
||||
/**
|
||||
* Increment value.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1063,7 +1063,7 @@ final class Builder extends BuilderAbstract
|
|||
|
||||
/**
|
||||
* Decrement value.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1074,7 +1074,7 @@ final class Builder extends BuilderAbstract
|
|||
|
||||
/**
|
||||
* Join.
|
||||
*
|
||||
*
|
||||
* @return Builder
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1086,7 +1086,7 @@ final class Builder extends BuilderAbstract
|
|||
|
||||
/**
|
||||
* Join where.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1097,7 +1097,7 @@ final class Builder extends BuilderAbstract
|
|||
|
||||
/**
|
||||
* Left join.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1108,7 +1108,7 @@ final class Builder extends BuilderAbstract
|
|||
|
||||
/**
|
||||
* Left join where.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1119,7 +1119,7 @@ final class Builder extends BuilderAbstract
|
|||
|
||||
/**
|
||||
* Right join.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1130,7 +1130,7 @@ final class Builder extends BuilderAbstract
|
|||
|
||||
/**
|
||||
* Right join where.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1153,7 +1153,7 @@ final class Builder extends BuilderAbstract
|
|||
|
||||
/**
|
||||
* On.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ use phpOMS\DataStorage\LockException;
|
|||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
*/
|
||||
class HttpSession implements SessionInterface
|
||||
|
|
@ -109,7 +109,7 @@ class HttpSession implements SessionInterface
|
|||
|
||||
/**
|
||||
* Set Csrf protection for forms.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Get country
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -159,7 +159,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Set country name
|
||||
*
|
||||
*
|
||||
* @param string $country Contry name
|
||||
*
|
||||
* @return void
|
||||
|
|
@ -189,9 +189,9 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Set timezone
|
||||
*
|
||||
*
|
||||
* @param string $timezone Timezone
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @todo : maybe make parameter int
|
||||
|
|
@ -209,7 +209,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Get language
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -221,7 +221,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Set language code
|
||||
*
|
||||
*
|
||||
* @param string $language Language code
|
||||
*
|
||||
* @return void
|
||||
|
|
@ -243,7 +243,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Get currency
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -255,7 +255,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Set currency code
|
||||
*
|
||||
*
|
||||
* @param string $currency Currency code
|
||||
*
|
||||
* @return void
|
||||
|
|
@ -273,7 +273,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* get datetime format
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -285,7 +285,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Set datetime format
|
||||
*
|
||||
*
|
||||
* @param string $datetime Datetime format
|
||||
*
|
||||
* @return void
|
||||
|
|
@ -299,7 +299,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Set decimal char
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -311,7 +311,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Get decimal char
|
||||
*
|
||||
*
|
||||
* @param string $decimal Decimal char
|
||||
*
|
||||
* @return void
|
||||
|
|
@ -325,7 +325,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Get thousands char
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -337,7 +337,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Set thousands char
|
||||
*
|
||||
*
|
||||
* @param string $thousands Thousands char
|
||||
*
|
||||
* @return void
|
||||
|
|
@ -351,7 +351,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Get angle type
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -363,7 +363,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Set angle type
|
||||
*
|
||||
*
|
||||
* @param string $angle Angle
|
||||
*
|
||||
* @return void
|
||||
|
|
@ -377,7 +377,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Get temperature type
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -389,7 +389,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Set temperature string
|
||||
*
|
||||
*
|
||||
* @param string $temperature Temperature
|
||||
*
|
||||
* @return void
|
||||
|
|
@ -403,7 +403,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Get speed type
|
||||
*
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -415,7 +415,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Set speed type
|
||||
*
|
||||
*
|
||||
* @param array $speed Speed
|
||||
*
|
||||
* @return void
|
||||
|
|
@ -429,7 +429,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Get weight type
|
||||
*
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -441,7 +441,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Set weight type
|
||||
*
|
||||
*
|
||||
* @param array $weight Weight type
|
||||
*
|
||||
* @return void
|
||||
|
|
@ -455,7 +455,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Get length type
|
||||
*
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -467,7 +467,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Set length type
|
||||
*
|
||||
*
|
||||
* @param array $length Length type
|
||||
*
|
||||
* @return void
|
||||
|
|
@ -481,7 +481,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Get area type
|
||||
*
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -493,7 +493,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Set area type
|
||||
*
|
||||
*
|
||||
* @param array $area Area type
|
||||
*
|
||||
* @return void
|
||||
|
|
@ -507,7 +507,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Get volume type
|
||||
*
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -519,7 +519,7 @@ final class Localization
|
|||
|
||||
/**
|
||||
* Set volume type
|
||||
*
|
||||
*
|
||||
* @param array $volume Volume type
|
||||
*
|
||||
* @return void
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ use phpOMS\System\File\Local\File;
|
|||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
*/
|
||||
final class FileLogger implements LoggerInterface
|
||||
|
|
@ -161,7 +161,7 @@ final class FileLogger implements LoggerInterface
|
|||
|
||||
/**
|
||||
* Protect instance from getting copied from outside.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -375,7 +375,7 @@ final class FileLogger implements LoggerInterface
|
|||
* Analyse logging file.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function countLogs()
|
||||
|
|
@ -411,7 +411,7 @@ final class FileLogger implements LoggerInterface
|
|||
* @param int $limit Amout of perpetrators
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getHighestPerpetrator(int $limit = 10) : array
|
||||
|
|
@ -449,7 +449,7 @@ final class FileLogger implements LoggerInterface
|
|||
* @param int $offset Offset
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getByLine(int $id = 1) : array
|
||||
|
|
@ -545,7 +545,7 @@ final class FileLogger implements LoggerInterface
|
|||
* @param string $message Log message
|
||||
* @param bool $verbose Is verbose
|
||||
* @param array $context Context
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ final class Functions
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Calculate gammar function value.
|
||||
*
|
||||
|
|
@ -236,7 +236,7 @@ final class Functions
|
|||
{
|
||||
return !((bool) ($a & 1));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Power all values in array.
|
||||
*
|
||||
|
|
@ -258,7 +258,7 @@ final class Functions
|
|||
|
||||
return $squared;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Power all values in array.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ final class Gamma
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* approximation values.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ final class MonotoneChain
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create convex hull
|
||||
*
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ final class Circle implements D2ShapeInterface
|
|||
* @return float
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CamelCaseVariableName)
|
||||
* @SuppressWarnings(PHPMD.CamelCaseParameterName)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ final class Cone implements D3ShapeInterface
|
|||
* @return float
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CamelCaseVariableName)
|
||||
* @SuppressWarnings(PHPMD.CamelCaseParameterName)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ final class Sphere implements D3ShapeInterface
|
|||
* @return float
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CamelCaseVariableName)
|
||||
* @SuppressWarnings(PHPMD.CamelCaseParameterName)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ final class CholeskyDecomposition
|
|||
* Solve Ax = b
|
||||
*
|
||||
* @param Matrix $B Matrix
|
||||
*
|
||||
*
|
||||
* @return Matrix
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ final class LUDecomposition
|
|||
* Solve Ax = b
|
||||
*
|
||||
* @param Matrix $B Matrix
|
||||
*
|
||||
*
|
||||
* @return Matrix
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ class Matrix implements \ArrayAccess, \Iterator
|
|||
* @param int $m Row
|
||||
* @param int $n Column
|
||||
* @param int $value Value
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws InvalidDimensionException
|
||||
|
|
@ -218,7 +218,7 @@ class Matrix implements \ArrayAccess, \Iterator
|
|||
|
||||
/**
|
||||
* Swap values in rows
|
||||
*
|
||||
*
|
||||
* @param array $matrix Matrix reference to modify
|
||||
* @param int $row1 Row to swap
|
||||
* @param int $row2 Row to swap
|
||||
|
|
@ -573,7 +573,7 @@ class Matrix implements \ArrayAccess, \Iterator
|
|||
|
||||
/**
|
||||
* Solve matrix
|
||||
*
|
||||
*
|
||||
* @param Matix $B Matrix/Vector b
|
||||
*
|
||||
* @return Matrix
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ final class Complex
|
|||
|
||||
/**
|
||||
* Conjugate
|
||||
*
|
||||
*
|
||||
* @latex z = a - b*i
|
||||
*
|
||||
* @return Complex
|
||||
|
|
@ -94,24 +94,24 @@ final class Complex
|
|||
|
||||
/**
|
||||
* Reciprocal
|
||||
*
|
||||
*
|
||||
* @return Complex
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function reciprocal() : Complex
|
||||
{
|
||||
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)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Square root
|
||||
*
|
||||
*
|
||||
* @return Complex
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function sqrt() : Complex
|
||||
|
|
@ -124,9 +124,9 @@ final class Complex
|
|||
|
||||
/**
|
||||
* Absolute
|
||||
*
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function abs()
|
||||
|
|
@ -136,9 +136,9 @@ final class Complex
|
|||
|
||||
/**
|
||||
* Square
|
||||
*
|
||||
*
|
||||
* @return Complex
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function square() : Complex
|
||||
|
|
@ -166,11 +166,11 @@ final class Complex
|
|||
|
||||
/**
|
||||
* Power with integer
|
||||
*
|
||||
*
|
||||
* @param int $value Power
|
||||
*
|
||||
*
|
||||
* @return Complex
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function powInteger(int $value) : Complex
|
||||
|
|
@ -191,13 +191,13 @@ final class Complex
|
|||
|
||||
/**
|
||||
* Add opperator
|
||||
*
|
||||
*
|
||||
* @param mixed $value Value to add
|
||||
*
|
||||
*
|
||||
* @return Complex
|
||||
*
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function add($value) : Complex
|
||||
|
|
@ -210,14 +210,14 @@ final class Complex
|
|||
|
||||
throw new \InvalidArgumentException();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add opperator
|
||||
*
|
||||
*
|
||||
* @param Complex $cpl Value to add
|
||||
*
|
||||
*
|
||||
* @return Complex
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function addComplex(Complex $cpl) : Complex
|
||||
|
|
@ -227,11 +227,11 @@ final class Complex
|
|||
|
||||
/**
|
||||
* Add opperator
|
||||
*
|
||||
*
|
||||
* @param mixed $val Value to add
|
||||
*
|
||||
*
|
||||
* @return Complex
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function addScalar($val) : Complex
|
||||
|
|
@ -241,13 +241,13 @@ final class Complex
|
|||
|
||||
/**
|
||||
* Sub opperator
|
||||
*
|
||||
*
|
||||
* @param mixed $value Value to sub
|
||||
*
|
||||
*
|
||||
* @return Complex
|
||||
*
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function sub($value) : Complex
|
||||
|
|
@ -263,11 +263,11 @@ final class Complex
|
|||
|
||||
/**
|
||||
* Sub opperator
|
||||
*
|
||||
*
|
||||
* @param Complex $cpl Value to sub
|
||||
*
|
||||
*
|
||||
* @return Complex
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function subComplex(Complex $cpl) : Complex
|
||||
|
|
@ -277,11 +277,11 @@ final class Complex
|
|||
|
||||
/**
|
||||
* Sub opperator
|
||||
*
|
||||
*
|
||||
* @param mixed $val Value to sub
|
||||
*
|
||||
*
|
||||
* @return Complex
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function subScalar($val) : Complex
|
||||
|
|
@ -291,13 +291,13 @@ final class Complex
|
|||
|
||||
/**
|
||||
* Mult opperator
|
||||
*
|
||||
*
|
||||
* @param mixed $value Value to mult
|
||||
*
|
||||
*
|
||||
* @return Complex
|
||||
*
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function mult($value) : Complex
|
||||
|
|
@ -313,11 +313,11 @@ final class Complex
|
|||
|
||||
/**
|
||||
* Mult opperator
|
||||
*
|
||||
*
|
||||
* @param Complex $cpl Value to mult
|
||||
*
|
||||
*
|
||||
* @return Complex
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function multComplex(Complex $cpl) : Complex
|
||||
|
|
@ -330,11 +330,11 @@ final class Complex
|
|||
|
||||
/**
|
||||
* Mult opperator
|
||||
*
|
||||
*
|
||||
* @param mixed $val Value to mult
|
||||
*
|
||||
*
|
||||
* @return Complex
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function multScalar($val) : Complex
|
||||
|
|
@ -344,13 +344,13 @@ final class Complex
|
|||
|
||||
/**
|
||||
* Div opperator
|
||||
*
|
||||
*
|
||||
* @param mixed $value Value to div
|
||||
*
|
||||
*
|
||||
* @return Complex
|
||||
*
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function div($value) : Complex
|
||||
|
|
@ -366,11 +366,11 @@ final class Complex
|
|||
|
||||
/**
|
||||
* Div opperator
|
||||
*
|
||||
*
|
||||
* @param Complex $cpl Value to div
|
||||
*
|
||||
*
|
||||
* @return Complex
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function divComplex(Complex $cpl) : Complex
|
||||
|
|
@ -383,11 +383,11 @@ final class Complex
|
|||
|
||||
/**
|
||||
* Div opperator
|
||||
*
|
||||
*
|
||||
* @param mixed $val Value to div
|
||||
*
|
||||
*
|
||||
* @return Complex
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function divScalar($val) : Complex
|
||||
|
|
@ -397,18 +397,18 @@ final class Complex
|
|||
|
||||
/**
|
||||
* Render complex number
|
||||
*
|
||||
*
|
||||
* @param int $precision Output precision
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function render(int $precision = 2) : string
|
||||
{
|
||||
return ($this->re !== 0 ? number_format($this->re, $precision) : '')
|
||||
. ($this->im > 0 && $this->re !== 0 ? ' +' : '')
|
||||
. ($this->im < 0 && $this->re !== 0 ? ' -' : '')
|
||||
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 ? ' ' : '') . number_format(
|
||||
($this->im < 0 && $this->re === 0 ? $this->im : abs($this->im)), $precision
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ final class Integer
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Is integer.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ final class Natural
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Is natural number.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ final class Numbers
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Is perfect number?
|
||||
*
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ final class Prime
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Is mersenne number?
|
||||
*
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ final class Average
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Average change.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ final class MeasureOfDispersion
|
|||
* Calculage standard deviation.
|
||||
*
|
||||
* Example: ([4, 5, 9, 1, 3])
|
||||
*
|
||||
*
|
||||
* @latex \sigma = \sqrt{\sigma^{2}} = \sqrt{Var(X)}
|
||||
*
|
||||
* @param array $values Values
|
||||
|
|
@ -111,11 +111,11 @@ final class MeasureOfDispersion
|
|||
|
||||
/**
|
||||
* Calculage sample variance.
|
||||
*
|
||||
*
|
||||
* Similar to `empiricalVariance`.
|
||||
*
|
||||
* 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}
|
||||
*
|
||||
* @param array $values Values
|
||||
|
|
@ -140,11 +140,11 @@ final class MeasureOfDispersion
|
|||
|
||||
/**
|
||||
* Calculage empirical variance.
|
||||
*
|
||||
*
|
||||
* Similar to `sampleVariance`.
|
||||
*
|
||||
* 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}
|
||||
*
|
||||
* @param array $values Values
|
||||
|
|
@ -180,7 +180,7 @@ final class MeasureOfDispersion
|
|||
* Calculage empirical covariance.
|
||||
*
|
||||
* 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}
|
||||
*
|
||||
* @param array $x Values
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class BernoulliDistribution
|
|||
} elseif ($k >= 1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
return 1 - $p;
|
||||
}
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ class BernoulliDistribution
|
|||
} elseif ($p > 0.5) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ class CauchyDistribution
|
|||
{
|
||||
return $x0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get entropy.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ use phpOMS\Router\RouteVerb;
|
|||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
*/
|
||||
final class Request extends RequestAbstract
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ abstract class HeaderAbstract
|
|||
|
||||
/**
|
||||
* Set header locked.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -164,7 +164,7 @@ abstract class HeaderAbstract
|
|||
* Generate header based on status code.
|
||||
*
|
||||
* @param int $statusCode Status code
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -198,7 +198,7 @@ abstract class HeaderAbstract
|
|||
* @param string $key Header key
|
||||
* @param string $value Header value
|
||||
* @param bool $overwrite Overwrite if key already exists
|
||||
*
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ use phpOMS\DataStorage\LockException;
|
|||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
*/
|
||||
final class Header extends HeaderAbstract
|
||||
|
|
@ -221,7 +221,7 @@ final class Header extends HeaderAbstract
|
|||
|
||||
/**
|
||||
* Push all headers.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ use phpOMS\Uri\UriInterface;
|
|||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
*/
|
||||
final class Request extends RequestAbstract
|
||||
|
|
@ -58,7 +58,7 @@ final class Request extends RequestAbstract
|
|||
* @since 1.0.0
|
||||
*/
|
||||
private $os = null;
|
||||
|
||||
|
||||
/**
|
||||
* Request information.
|
||||
*
|
||||
|
|
@ -452,8 +452,8 @@ final class Request extends RequestAbstract
|
|||
public function __toString() : string
|
||||
{
|
||||
if ($this->getMethod() === RequestMethod::GET && !empty($this->data)) {
|
||||
return $this->uri->__toString()
|
||||
. (parse_url($this->uri->__toString(), PHP_URL_QUERY) ? '&' : '?')
|
||||
return $this->uri->__toString()
|
||||
. (parse_url($this->uri->__toString(), PHP_URL_QUERY) ? '&' : '?')
|
||||
. http_build_query($this->data);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ abstract class RequestAbstract implements MessageInterface
|
|||
* Set request uri.
|
||||
*
|
||||
* @param UriInterface $uri Uri
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -142,7 +142,7 @@ abstract class RequestAbstract implements MessageInterface
|
|||
* Set request method.
|
||||
*
|
||||
* @param string $method Request method
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -29,5 +29,5 @@ abstract class RequestSource extends Enum
|
|||
public const WEB = 0; /* This is a http request */
|
||||
public const CONSOLE = 1; /* Request is a console command */
|
||||
public const SOCKET = 2; /* Request through socket connection */
|
||||
public const UNDEFINED = 3;
|
||||
public const UNDEFINED = 3;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ interface UploadedFileInterface
|
|||
|
||||
/**
|
||||
* Retrieve a stream representing the uploaded file.
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getStream();
|
||||
|
|
@ -45,7 +45,7 @@ interface UploadedFileInterface
|
|||
|
||||
/**
|
||||
* Retrieve the file size.
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -54,7 +54,7 @@ interface UploadedFileInterface
|
|||
|
||||
/**
|
||||
* Retrieve the error associated with the uploaded file.
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -63,7 +63,7 @@ interface UploadedFileInterface
|
|||
|
||||
/**
|
||||
* Retrieve the filename sent by the client.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -72,7 +72,7 @@ interface UploadedFileInterface
|
|||
|
||||
/**
|
||||
* Retrieve the media type sent by the client.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ class Head implements RenderableInterface
|
|||
|
||||
/**
|
||||
* Set page meta.
|
||||
*
|
||||
*
|
||||
* @return Meta
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ final class InfoManager
|
|||
* @param string $path Value path
|
||||
* @param mixed $data Scalar or array of data to set
|
||||
* @param string $delim Delimiter of path
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class InstallerAbstract
|
|||
|
||||
$dbPool->get()->con->commit();
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
throw new InvalidDatabaseTypeException($dbPool->get()->getType());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ final class ModuleFactory
|
|||
* Load modules this module is requesting from
|
||||
*
|
||||
* @param ModuleAbstract $obj Current module
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -114,7 +114,7 @@ final class ModuleFactory
|
|||
* Register modules this module is receiving from
|
||||
*
|
||||
* @param ModuleAbstract $obj Current module
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ final class ModuleManager
|
|||
|
||||
$this->uriLoad = $sth->fetchAll(\PDO::FETCH_GROUP);
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
throw new InvalidDatabaseTypeException($this->app->dbPool->get('select')->getType());
|
||||
}
|
||||
}
|
||||
|
|
@ -202,7 +202,7 @@ final class ModuleManager
|
|||
$sth->execute();
|
||||
$this->active = $sth->fetchAll(\PDO::FETCH_COLUMN);
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
throw new InvalidDatabaseTypeException($this->app->dbPool->get('select')->getType());
|
||||
}
|
||||
}
|
||||
|
|
@ -284,7 +284,7 @@ final class ModuleManager
|
|||
$sth->execute();
|
||||
$this->installed = $sth->fetchAll(\PDO::FETCH_GROUP);
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
throw new InvalidDatabaseTypeException($this->app->dbPool->get('select')->getType());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ class StatusAbstract
|
|||
$dbPool->get()->con->commit();
|
||||
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
throw new InvalidDatabaseTypeException($dbPool->get()->getType());
|
||||
}
|
||||
}
|
||||
|
|
@ -150,7 +150,7 @@ class StatusAbstract
|
|||
$dbPool->get()->con->commit();
|
||||
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
throw new InvalidDatabaseTypeException($dbPool->get()->getType());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ interface SocketInterface
|
|||
*
|
||||
* @param string $ip IP address
|
||||
* @param int $port Port
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ interface ContainerInterface
|
|||
*
|
||||
* This is used in order to initialize all resources.
|
||||
* Sub-sub-resources are only initialized once they are needed.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class FtpStorage extends StorageAbstract
|
|||
{
|
||||
private static $instance = null;
|
||||
|
||||
public function __construct()
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ final class Directory extends FileAbstract implements DirectoryInterface
|
|||
new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS),
|
||||
\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())))
|
||||
) {
|
||||
$list[] = str_replace('\\', '/', $iterator->getSubPathname());
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ final class OperatingSystem
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get OS.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ use phpOMS\Utils\StringUtils;
|
|||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
*/
|
||||
final class Http implements UriInterface
|
||||
|
|
@ -337,7 +337,7 @@ final class Http implements UriInterface
|
|||
*/
|
||||
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 : '');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ final class ArrayUtils
|
|||
if (!isset($current[$key])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
$current = $current[$key];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ use phpOMS\Stdlib\Base\Exception\InvalidEnumValue;
|
|||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CamelCasePropertyName)
|
||||
* @SuppressWarnings(PHPMD.CamelCaseVariableName)
|
||||
*/
|
||||
|
|
@ -145,7 +145,7 @@ abstract class C128Abstract
|
|||
*
|
||||
* @param int $width Barcode width
|
||||
* @param int $height Barcode height
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -168,7 +168,7 @@ abstract class C128Abstract
|
|||
* Set barcode margins
|
||||
*
|
||||
* @param int $margin Barcode margin
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -182,7 +182,7 @@ abstract class C128Abstract
|
|||
* Set barcode orientation
|
||||
*
|
||||
* @param int $orientation Barcode orientation
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -212,7 +212,7 @@ abstract class C128Abstract
|
|||
* Set content to encrypt
|
||||
*
|
||||
* @param string $content Barcode content
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -320,20 +320,20 @@ abstract class C128Abstract
|
|||
|
||||
if ($this->orientation === OrientationType::HORIZONTAL) {
|
||||
imagefilledrectangle(
|
||||
$image,
|
||||
$location + $this->margin,
|
||||
0 + $this->margin,
|
||||
$cur_size + $this->margin,
|
||||
$dimensions['height'] - $this->margin,
|
||||
$image,
|
||||
$location + $this->margin,
|
||||
0 + $this->margin,
|
||||
$cur_size + $this->margin,
|
||||
$dimensions['height'] - $this->margin,
|
||||
($position % 2 == 0 ? $white : $black)
|
||||
);
|
||||
} else {
|
||||
imagefilledrectangle(
|
||||
$image,
|
||||
0 + $this->margin,
|
||||
$location + $this->margin,
|
||||
$dimensions['width'] - $this->margin,
|
||||
$cur_size + $this->margin,
|
||||
$image,
|
||||
0 + $this->margin,
|
||||
$location + $this->margin,
|
||||
$dimensions['width'] - $this->margin,
|
||||
$cur_size + $this->margin,
|
||||
($position % 2 == 0 ? $white : $black)
|
||||
);
|
||||
}
|
||||
|
|
@ -357,7 +357,7 @@ abstract class C128Abstract
|
|||
{
|
||||
$codeLength = 0;
|
||||
$length = strlen($codeString);
|
||||
|
||||
|
||||
for ($i = 1; $i <= $length; ++$i) {
|
||||
$codeLength = $codeLength + (int) (substr($codeString, ($i - 1), 1));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace phpOMS\Utils\Barcode;
|
|||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CamelCasePropertyName)
|
||||
* @SuppressWarnings(PHPMD.CamelCaseVariableName)
|
||||
*/
|
||||
|
|
@ -84,7 +84,7 @@ class C128a extends C128Abstract
|
|||
* Set content to encrypt
|
||||
*
|
||||
* @param string $content Content to encrypt
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @todo : add mirror parameter
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace phpOMS\Utils\Barcode;
|
|||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CamelCasePropertyName)
|
||||
* @SuppressWarnings(PHPMD.CamelCaseVariableName)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace phpOMS\Utils\Barcode;
|
|||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CamelCasePropertyName)
|
||||
* @SuppressWarnings(PHPMD.CamelCaseVariableName)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace phpOMS\Utils\Barcode;
|
|||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CamelCasePropertyName)
|
||||
* @SuppressWarnings(PHPMD.CamelCaseVariableName)
|
||||
*/
|
||||
|
|
@ -87,7 +87,7 @@ class C25 extends C128Abstract
|
|||
* Set content to encrypt
|
||||
*
|
||||
* @param string $content Barcode content
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace phpOMS\Utils\Barcode;
|
|||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CamelCasePropertyName)
|
||||
* @SuppressWarnings(PHPMD.CamelCaseVariableName)
|
||||
*/
|
||||
|
|
@ -65,7 +65,7 @@ class C39 extends C128Abstract
|
|||
* Set content to encrypt
|
||||
*
|
||||
* @param string $content Barcode content
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace phpOMS\Utils\Barcode;
|
|||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CamelCasePropertyName)
|
||||
* @SuppressWarnings(PHPMD.CamelCaseVariableName)
|
||||
*/
|
||||
|
|
@ -66,7 +66,7 @@ class Codebar extends C128Abstract
|
|||
* Set content to encrypt
|
||||
*
|
||||
* @param string $content Barcode content
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class Currency
|
|||
* 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.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ class Ip
|
|||
|
||||
/**
|
||||
* Convert ip to float
|
||||
*
|
||||
*
|
||||
* @param string $ip IP
|
||||
*
|
||||
*
|
||||
* @return float
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ class Numeric
|
|||
* @since 1.0.0
|
||||
*/
|
||||
public const ROMANS = [
|
||||
'M' => 1000, 'CM' => 900, 'D' => 500, 'CD' => 400, 'C' => 100,
|
||||
'XC' => 90, 'L' => 50, 'XL' => 40, 'X' => 10,
|
||||
'M' => 1000, 'CM' => 900, 'D' => 500, 'CD' => 400, 'C' => 100,
|
||||
'XC' => 90, 'L' => 50, 'XL' => 40, 'X' => 10,
|
||||
'IX' => 9, 'V' => 5, 'IV' => 4, 'I' => 1
|
||||
];
|
||||
|
||||
|
|
@ -77,9 +77,9 @@ class Numeric
|
|||
|
||||
for ($i = 1; $i <= $numberLen; ++$i) {
|
||||
$newOutput = bcadd(
|
||||
(string) $newOutput,
|
||||
(string) $newOutput,
|
||||
bcmul(
|
||||
(string) array_search($number[$i - 1], $fromBase),
|
||||
(string) array_search($number[$i - 1], $fromBase),
|
||||
bcpow((string) $fromLen, (string) ($numberLen - $i))
|
||||
)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ final class Huffman
|
|||
* Set dictionary
|
||||
*
|
||||
* @param Dictionary $dictionary Huffman dictionary
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class Branch
|
|||
* Set branch name
|
||||
*
|
||||
* @param string $name Branch name
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ class Commit
|
|||
* Set commit message.
|
||||
*
|
||||
* @param string $message Commit message
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -210,7 +210,7 @@ class Commit
|
|||
* Set commit author.
|
||||
*
|
||||
* @param Author $author Commit author
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -236,7 +236,7 @@ class Commit
|
|||
* Set commit branch.
|
||||
*
|
||||
* @param Branch $branch Commit branch
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -262,7 +262,7 @@ class Commit
|
|||
* Set commit tag.
|
||||
*
|
||||
* @param Tag $tag Commit tag
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -314,7 +314,7 @@ class Commit
|
|||
* Set commit repository.
|
||||
*
|
||||
* @param Repository $repository Commit repository
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -331,7 +331,7 @@ class Commit
|
|||
* @param int $line Line number
|
||||
* @param string $old Old line
|
||||
* @param string $new New line
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \Exception
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class Git
|
|||
* Set git binary.
|
||||
*
|
||||
* @param string $path Git path
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws PathException
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class Repository
|
|||
* Set repository path.
|
||||
*
|
||||
* @param string $path Path to repository
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws PathException
|
||||
|
|
@ -171,13 +171,13 @@ class Repository
|
|||
private function run(string $cmd) : array
|
||||
{
|
||||
if (strtolower(substr(PHP_OS, 0, 3)) == 'win') {
|
||||
$cmd = 'cd ' . escapeshellarg(dirname(Git::getBin()))
|
||||
. ' && ' . basename(Git::getBin())
|
||||
. ' -C ' . escapeshellarg($this->path) . ' '
|
||||
$cmd = 'cd ' . escapeshellarg(dirname(Git::getBin()))
|
||||
. ' && ' . basename(Git::getBin())
|
||||
. ' -C ' . escapeshellarg($this->path) . ' '
|
||||
. $cmd;
|
||||
} else {
|
||||
$cmd = escapeshellarg(Git::getBin())
|
||||
. ' -C ' . escapeshellarg($this->path) . ' '
|
||||
$cmd = escapeshellarg(Git::getBin())
|
||||
. ' -C ' . escapeshellarg($this->path) . ' '
|
||||
. $cmd;
|
||||
}
|
||||
|
||||
|
|
@ -772,9 +772,9 @@ class Repository
|
|||
|
||||
$addremove = ['added' => 0, 'removed' => 0];
|
||||
$lines = $this->run(
|
||||
'log --author=' . escapeshellarg($author->getName())
|
||||
. ' --since="' . $start->format('Y-m-d')
|
||||
. '" --before="' . $end->format('Y-m-d')
|
||||
'log --author=' . escapeshellarg($author->getName())
|
||||
. ' --since="' . $start->format('Y-m-d')
|
||||
. '" --before="' . $end->format('Y-m-d')
|
||||
. '" --pretty=tformat: --numstat'
|
||||
);
|
||||
|
||||
|
|
@ -828,10 +828,10 @@ class Repository
|
|||
}
|
||||
|
||||
$lines = $this->run(
|
||||
'git log --before="' . $end->format('Y-m-d')
|
||||
. '" --after="' . $start->format('Y-m-d') . '"'
|
||||
'git log --before="' . $end->format('Y-m-d')
|
||||
. '" --after="' . $start->format('Y-m-d') . '"'
|
||||
. $author . ' --reverse --date=short');
|
||||
|
||||
|
||||
$count = count($lines);
|
||||
$commits = [];
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class Tag
|
|||
* Set tag name
|
||||
*
|
||||
* @param string $message Tag message
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class CsvDatabaseMapper implements IODatabaseMapper
|
|||
private $delimiter = ';';
|
||||
|
||||
private $enclosure = '"';
|
||||
|
||||
|
||||
private $lineBuffer = 500;
|
||||
|
||||
private $autoIdentifyCsvSettings = false;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class Tar implements ArchiveInterface
|
|||
|
||||
if (is_dir($source)) {
|
||||
$files = new \RecursiveIteratorIterator(
|
||||
new \RecursiveDirectoryIterator($source),
|
||||
new \RecursiveDirectoryIterator($source),
|
||||
\RecursiveIteratorIterator::SELF_FIRST
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ class Markdown
|
|||
|
||||
/**
|
||||
* Some definition data for elements
|
||||
*
|
||||
*
|
||||
* @todo: figure out what it is for
|
||||
*
|
||||
* @var string[]
|
||||
|
|
@ -220,7 +220,7 @@ class Markdown
|
|||
* Parse markdown
|
||||
*
|
||||
* @param string $text Markdown text
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -241,7 +241,7 @@ class Markdown
|
|||
* Parse lines
|
||||
*
|
||||
* @param array $lines Markdown lines
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -360,7 +360,7 @@ class Markdown
|
|||
*
|
||||
* @param array $lineArray Line information
|
||||
* @param array $block Block information
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -392,7 +392,7 @@ class Markdown
|
|||
*
|
||||
* @param array $lineArray Line information
|
||||
* @param array $block Block information
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -419,7 +419,7 @@ class Markdown
|
|||
* Handle completed code
|
||||
*
|
||||
* @param array $block Block information
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -433,7 +433,7 @@ class Markdown
|
|||
* Handle fenced code
|
||||
*
|
||||
* @param array $lineArray Line information
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -470,7 +470,7 @@ class Markdown
|
|||
*
|
||||
* @param array $lineArray Line information
|
||||
* @param array $block Block information
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -503,7 +503,7 @@ class Markdown
|
|||
* Handle completed fenced block code
|
||||
*
|
||||
* @param array $block Block information
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -517,7 +517,7 @@ class Markdown
|
|||
* Handle header element
|
||||
*
|
||||
* @param array $lineArray Line information
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -550,7 +550,7 @@ class Markdown
|
|||
* Handle list
|
||||
*
|
||||
* @param array $lineArray Line information
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -598,7 +598,7 @@ class Markdown
|
|||
*
|
||||
* @param array $lineArray Line information
|
||||
* @param array $block Block information
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -653,7 +653,7 @@ class Markdown
|
|||
* Handle block quote
|
||||
*
|
||||
* @param array $lineArray Line information
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -678,7 +678,7 @@ class Markdown
|
|||
*
|
||||
* @param array $lineArray Line information
|
||||
* @param array $block Block information
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -710,7 +710,7 @@ class Markdown
|
|||
* Handle HR element
|
||||
*
|
||||
* @param array $lineArray Line information
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -733,7 +733,7 @@ class Markdown
|
|||
*
|
||||
* @param array $lineArray Line information
|
||||
* @param array $block Block information
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -757,7 +757,7 @@ class Markdown
|
|||
* Handle content reference
|
||||
*
|
||||
* @param array $lineArray Line information
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -783,7 +783,7 @@ class Markdown
|
|||
*
|
||||
* @param array $lineArray Line information
|
||||
* @param array $block Block information
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -880,7 +880,7 @@ class Markdown
|
|||
*
|
||||
* @param array $lineArray Line information
|
||||
* @param array $block Block information
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -929,7 +929,7 @@ class Markdown
|
|||
* Handle paragraph
|
||||
*
|
||||
* @param array $lineArray Line information
|
||||
*
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -949,7 +949,7 @@ class Markdown
|
|||
* Handle a single line
|
||||
*
|
||||
* @param string $text Line of text
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1000,7 +1000,7 @@ class Markdown
|
|||
* Handle inline code
|
||||
*
|
||||
* @param array $excerpt Markdown excerpt
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1026,7 +1026,7 @@ class Markdown
|
|||
* Handle inline email
|
||||
*
|
||||
* @param array $excerpt Markdown excerpt
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1059,7 +1059,7 @@ class Markdown
|
|||
* Handle inline emphasis
|
||||
*
|
||||
* @param array $excerpt Markdown excerpt
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1096,7 +1096,7 @@ class Markdown
|
|||
* Handle escape of special char
|
||||
*
|
||||
* @param array $excerpt Markdown excerpt
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1117,7 +1117,7 @@ class Markdown
|
|||
* Handle inline image
|
||||
*
|
||||
* @param array $excerpt Markdown excerpt
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1157,7 +1157,7 @@ class Markdown
|
|||
* Handle inline link
|
||||
*
|
||||
* @param array $excerpt Markdown excerpt
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1223,7 +1223,7 @@ class Markdown
|
|||
* Handle special char to html
|
||||
*
|
||||
* @param array $excerpt Markdown excerpt
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1251,7 +1251,7 @@ class Markdown
|
|||
* Handle inline strike through
|
||||
*
|
||||
* @param array $excerpt Markdown excerpt
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1280,7 +1280,7 @@ class Markdown
|
|||
* Handle inline url
|
||||
*
|
||||
* @param array $excerpt Markdown excerpt
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1312,7 +1312,7 @@ class Markdown
|
|||
* Handle inline url
|
||||
*
|
||||
* @param array $excerpt Markdown excerpt
|
||||
*
|
||||
*
|
||||
* @return null|array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1339,7 +1339,7 @@ class Markdown
|
|||
* Clean up normal text
|
||||
*
|
||||
* @param string $text Normal text
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1356,7 +1356,7 @@ class Markdown
|
|||
* Handle general html element
|
||||
*
|
||||
* @param array $element Html element
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1391,7 +1391,7 @@ class Markdown
|
|||
* Handle an array of elements
|
||||
*
|
||||
* @param array $elements Elements
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1411,11 +1411,11 @@ class Markdown
|
|||
|
||||
/**
|
||||
* Remove blocks
|
||||
*
|
||||
*
|
||||
* @param array $lines Lines
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static function li(array $lines) : string
|
||||
|
|
@ -1435,9 +1435,9 @@ class Markdown
|
|||
|
||||
/**
|
||||
* Sanitize an element
|
||||
*
|
||||
*
|
||||
* @param array $element Element to sanitize
|
||||
*
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1468,10 +1468,10 @@ class Markdown
|
|||
|
||||
/**
|
||||
* Replace unsafe url
|
||||
*
|
||||
*
|
||||
* @param array $element Element to sanitize
|
||||
* @param string $attribute Element attribute
|
||||
*
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1491,10 +1491,10 @@ class Markdown
|
|||
|
||||
/**
|
||||
* Escape html elements
|
||||
*
|
||||
*
|
||||
* @param string $text Text to escape
|
||||
* @param bool $allowQuotes Are quotes allowed
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1506,10 +1506,10 @@ class Markdown
|
|||
|
||||
/**
|
||||
* Check if string starts with
|
||||
*
|
||||
*
|
||||
* @param string $string Text to check against
|
||||
* @param string $needle Needle to check
|
||||
*
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -469,13 +469,13 @@ class Name
|
|||
'female' => ['none'],
|
||||
'male' => ['none'],
|
||||
'family' => [
|
||||
'Հովհաննիսյան', 'Հարությունյան', 'Սարգսյան', 'Խաչատրյան', 'Գրիգորյան', 'আহমেদ', 'আলী', 'আক্তার',
|
||||
'বন্দ্যোপাধ্যায়', 'নিক', 'ব্যাপারী', 'বড়ুয়া', 'বিশ্বাস', 'ভৌমিক', 'বসু', '王', '李', '张', '刘', '陈', '杨',
|
||||
'黄', '赵', '吴', '周', '徐', '孙', '马', '朱', '胡', '郭', '何', '高', '林', '罗', 'כהן', 'לוי',
|
||||
'מזרחי', 'פרץ', 'ביטון', 'דהן', 'אברהם', 'פרידמן', 'מלכה', 'אזולאי', 'כץ', 'יוסף', 'דוד', 'עמר',
|
||||
'אוחיון', '김', '리', '박', '최', '정', '강', '조', '윤', '장', '림', '한', '신', '서', '권', '황',
|
||||
'안', '송', '홍', '고', '문', '손', '량', '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ı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',
|
||||
'Koç', 'Kurt', 'Özkan', 'Şimşek',
|
||||
],
|
||||
]
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class Phone
|
|||
|
||||
for ($i = ($isInt ? 2 : 1); $i < $numberParts; ++$i) {
|
||||
$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
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class StringUtils
|
|||
*
|
||||
* @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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -169,9 +169,9 @@ final class StringCompare
|
|||
* @since 1.0.0
|
||||
*/
|
||||
public static function fuzzyMatch(
|
||||
string $s1, string $s2,
|
||||
float $phraseWeight = 0.5, float $wordWeight = 1,
|
||||
float $minWeight = 10, float $maxWeight = 1,
|
||||
string $s1, string $s2,
|
||||
float $phraseWeight = 0.5, float $wordWeight = 1,
|
||||
float $minWeight = 10, float $maxWeight = 1,
|
||||
float $lengthWeight = -0.3
|
||||
) : float
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace phpOMS\Utils;
|
|||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CamelCaseMethodName)
|
||||
*/
|
||||
final class StringUtils
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ class Interval implements \Serializable
|
|||
* Unserialize.
|
||||
*
|
||||
* @param string $serialized String to unserialize
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -282,7 +282,7 @@ class Interval implements \Serializable
|
|||
* @param bool $any Any
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*
|
||||
* @throws \Exception
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -345,7 +345,7 @@ class Interval implements \Serializable
|
|||
* @param array $hour Hour
|
||||
* @param int $step Step
|
||||
* @param bool $any Any
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \Exception
|
||||
|
|
@ -385,7 +385,7 @@ class Interval implements \Serializable
|
|||
* @param bool $any Any
|
||||
* @param bool $last Last
|
||||
* @param int $nearest Nearest day
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \Exception
|
||||
|
|
@ -454,7 +454,7 @@ class Interval implements \Serializable
|
|||
* @param int $step Step
|
||||
* @param bool $any Any
|
||||
* @param bool $last Last
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \Exception
|
||||
|
|
@ -518,7 +518,7 @@ class Interval implements \Serializable
|
|||
* @param array $month Month
|
||||
* @param int $step Step
|
||||
* @param bool $any Any
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \Exception
|
||||
|
|
@ -556,7 +556,7 @@ class Interval implements \Serializable
|
|||
* @param array $year Year
|
||||
* @param int $step Step
|
||||
* @param bool $any Any
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \Exception
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ abstract class SchedulerAbstract
|
|||
* Set git binary.
|
||||
*
|
||||
* @param string $path Git path
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws PathException
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ final class TestUtils
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set private object member
|
||||
*
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ class View extends ViewAbstract
|
|||
|
||||
/**
|
||||
* Get data attached to view
|
||||
*
|
||||
*
|
||||
* @param string $id Data Id
|
||||
*
|
||||
* @return mixed
|
||||
|
|
@ -104,7 +104,7 @@ class View extends ViewAbstract
|
|||
|
||||
/**
|
||||
* Set data of view
|
||||
*
|
||||
*
|
||||
* @param string $id Data ID
|
||||
* @param mixed $data Data
|
||||
*
|
||||
|
|
@ -139,7 +139,7 @@ class View extends ViewAbstract
|
|||
|
||||
/**
|
||||
* Add data to view
|
||||
*
|
||||
*
|
||||
* @param string $id Data ID
|
||||
* @param mixed $data Data
|
||||
*
|
||||
|
|
@ -219,7 +219,7 @@ class View extends ViewAbstract
|
|||
|
||||
/**
|
||||
* Get request of view
|
||||
*
|
||||
*
|
||||
* @return RequestAbstract|null
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -231,7 +231,7 @@ class View extends ViewAbstract
|
|||
|
||||
/**
|
||||
* Get response of view
|
||||
*
|
||||
*
|
||||
* @return ResponseAbstract|null
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ use phpOMS\System\File\PathException;
|
|||
|
||||
/**
|
||||
* View Abstract.
|
||||
*
|
||||
*
|
||||
* @package phpOMS\Views
|
||||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
|
|
@ -118,7 +118,7 @@ abstract class ViewAbstract implements \Serializable
|
|||
|
||||
/**
|
||||
* Returns all views
|
||||
*
|
||||
*
|
||||
* @return View[]
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -130,7 +130,7 @@ abstract class ViewAbstract implements \Serializable
|
|||
|
||||
/**
|
||||
* Returns a specific view
|
||||
*
|
||||
*
|
||||
* @param string $id View ID
|
||||
*
|
||||
* @return false|View
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ require_once __DIR__ . '/../Autoloader.php';
|
|||
class AccountManagerTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
|
||||
public function testAttributes()
|
||||
public function testAttributes()
|
||||
{
|
||||
$manager = new AccountManager($GLOBALS['httpSession']);
|
||||
self::assertInstanceOf('\phpOMS\Account\AccountManager', $manager);
|
||||
|
|
@ -33,7 +33,7 @@ class AccountManagerTest extends \PHPUnit\Framework\TestCase
|
|||
self::assertObjectHasAttribute('accounts', $manager);
|
||||
}
|
||||
|
||||
public function testDefault()
|
||||
public function testDefault()
|
||||
{
|
||||
$manager = new AccountManager($GLOBALS['httpSession']);
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ require_once __DIR__ . '/../Autoloader.php';
|
|||
|
||||
class GroupTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
public function testAttributes()
|
||||
public function testAttributes()
|
||||
{
|
||||
$group = new Group();
|
||||
self::assertInstanceOf('\phpOMS\Account\Group', $group);
|
||||
|
|
@ -35,7 +35,7 @@ class GroupTest extends \PHPUnit\Framework\TestCase
|
|||
self::assertObjectHasAttribute('status', $group);
|
||||
}
|
||||
|
||||
public function testDefault()
|
||||
public function testDefault()
|
||||
{
|
||||
$group = new Group();
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class FileCacheTest extends \PHPUnit\Framework\TestCase
|
|||
if (file_exists(__DIR__ . '/Cache')) {
|
||||
rmdir(__DIR__ . '/Cache');
|
||||
}
|
||||
|
||||
|
||||
$cache = new FileCache(__DIR__ . '/Cache');
|
||||
|
||||
$cache->set('key1', 'testVal');
|
||||
|
|
|
|||
|
|
@ -61,19 +61,19 @@ class BaseModel
|
|||
$this->belongsToOne = new BelongsToModel();
|
||||
|
||||
$this->serializable = new class implements \Serializable {
|
||||
public function serialize()
|
||||
public function serialize()
|
||||
{
|
||||
return '123';
|
||||
}
|
||||
|
||||
public function unserialize($data)
|
||||
public function unserialize($data)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
$this->jsonSerializable = new class implements \JsonSerializable {
|
||||
public function jsonSerialize()
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return [1, 2, 3];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ class FileLoggerTest extends \PHPUnit\Framework\TestCase
|
|||
'message' => 'msg',
|
||||
'line' => 11,
|
||||
'file' => FileLoggerTest::class,
|
||||
]);
|
||||
]);
|
||||
$ob = ob_get_clean();
|
||||
self::assertEquals(2, $log->countLogs()['info'] ?? 0);
|
||||
self::assertTrue(stripos($ob, 'msg;') !== false);
|
||||
|
|
|
|||
|
|
@ -66,12 +66,12 @@ class FunctionsTest extends \PHPUnit\Framework\TestCase
|
|||
self::assertEquals(5, Functions::getRelativeDegree(12, 12, 7));
|
||||
self::assertEquals(11, Functions::getRelativeDegree(6, 12, 7));
|
||||
}
|
||||
|
||||
|
||||
public function testPower()
|
||||
{
|
||||
self::assertEquals([4, 9, 16], Functions::powerInt([2, 3, 4], 2));
|
||||
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([8, 27, 64], 1 / 3), '', 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
];
|
||||
|
||||
$spouge = [
|
||||
$spouge = [
|
||||
2.67893853, 1.35411794, 1.00000000, 0.89297951, 0.90274529, 1.00000000, 1.19063935, 1.50457549, 2.00000000, 2.77815848,
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -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(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.01);
|
||||
|
||||
|
|
|
|||
|
|
@ -20,12 +20,12 @@ class BasicTest extends \PHPUnit\Framework\TestCase
|
|||
public function testFrequency()
|
||||
{
|
||||
self::assertEquals(
|
||||
[1 / 10, 2 / 10, 3 / 10, 4 / 10],
|
||||
[1 / 10, 2 / 10, 3 / 10, 4 / 10],
|
||||
Basic::frequency([1, 2, 3, 4])
|
||||
);
|
||||
|
||||
|
||||
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])
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class ErrorTest extends \PHPUnit\Framework\TestCase
|
|||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public function testErrorPercentage()
|
||||
{
|
||||
self::assertEquals(300 / 1000, Error::getPercentageError(300, 1000), '', 0.01);
|
||||
|
|
@ -53,7 +53,7 @@ class ErrorTest extends \PHPUnit\Framework\TestCase
|
|||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public function testMeanError()
|
||||
{
|
||||
$errors = [
|
||||
|
|
@ -62,7 +62,7 @@ class ErrorTest extends \PHPUnit\Framework\TestCase
|
|||
200 - 200,
|
||||
500 - -300
|
||||
];
|
||||
|
||||
|
||||
self::assertEquals(300, Error::getMeanAbsoulteError($errors), '', 0.01);
|
||||
self::assertEquals(125000, Error::getMeanSquaredError($errors), '', 0.01);
|
||||
self::assertEquals(406.2019, Error::getRootMeanSquaredError($errors), '', 0.01);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class MeasureOfDispersionTest extends \PHPUnit\Framework\TestCase
|
|||
public function testEmpiricalCovariance()
|
||||
{
|
||||
self::assertEquals(
|
||||
4.667,
|
||||
4.667,
|
||||
MeasureOfDispersion::empiricalCovariance(
|
||||
[1, 2, 3, 4, 5, 6, 7],
|
||||
[3, 4, 5, 9, 7, 8, 9]
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user