From 13c5562ffed2ebcb5aa245ea2c74a818c3a9419b Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Mon, 10 Dec 2018 18:13:44 +0100 Subject: [PATCH] Fix null typehint order --- Account/Account.php | 14 ++++---- Account/PermissionAbstract.php | 26 +++++++------- Asset/AssetManager.php | 2 +- Business/Finance/FinanceFormulas.php | 4 +-- Business/Finance/Lorenzkurve.php | 2 +- Business/Finance/StockBonds.php | 2 +- Config/SettingsAbstract.php | 2 +- .../Connection/ConnectionAbstract.php | 2 +- DataStorage/Database/Query/Builder.php | 34 +++++++++---------- DataStorage/Session/HttpSession.php | 4 +-- DataStorage/Session/SessionInterface.php | 10 +++--- Dispatcher/Dispatcher.php | 12 +++---- Localization/Defaults/CityMapper.php | 2 +- Localization/Defaults/CountryMapper.php | 2 +- Localization/Defaults/CurrencyMapper.php | 2 +- Localization/Defaults/IbanMapper.php | 2 +- Localization/Defaults/LanguageMapper.php | 2 +- Localization/Money.php | 12 +++---- Log/FileLogger.php | 2 +- Math/Differential/FiniteDifference.php | 6 ++-- Math/Functions/Functions.php | 14 ++++---- Math/Geometry/ConvexHull/MonotoneChain.php | 14 ++++---- Math/Geometry/Shape/D2/Polygon.php | 12 +++---- Math/Matrix/Matrix.php | 4 +-- Math/Statistic/Basic.php | 4 +-- Math/Statistic/Correlation.php | 6 ++-- Math/Statistic/Forecast/Forecasts.php | 2 +- .../Regression/RegressionAbstract.php | 20 +++++------ Message/MessageInterface.php | 2 +- Module/ModuleAbstract.php | 2 +- Module/ModuleManager.php | 4 +-- Socket/CommandManager.php | 2 +- Stdlib/Graph/Graph.php | 4 +-- Stdlib/Map/MultiMap.php | 2 +- System/File/DirectoryInterface.php | 2 +- System/File/Local/Directory.php | 2 +- System/File/Storage.php | 2 +- Uri/UriFactory.php | 2 +- Utils/ArrayUtils.php | 2 +- Utils/Converter/Currency.php | 2 +- Utils/Git/Repository.php | 6 ++-- Utils/Permutation.php | 4 +-- Utils/RnG/Phone.php | 2 +- Utils/StringUtils.php | 8 ++--- Validation/Validator.php | 10 +++--- Views/View.php | 10 +++--- .../Database/TestModel/BaseModelMapper.php | 2 +- .../TestModel/BelongsToModelMapper.php | 2 +- .../TestModel/ManyToManyDirectModelMapper.php | 2 +- .../TestModel/ManyToManyRelModelMapper.php | 2 +- .../Database/TestModel/OwnsOneModelMapper.php | 2 +- 51 files changed, 149 insertions(+), 149 deletions(-) diff --git a/Account/Account.php b/Account/Account.php index 8318a6fc3..d29ede158 100644 --- a/Account/Account.php +++ b/Account/Account.php @@ -86,7 +86,7 @@ class Account implements ArrayableInterface, \JsonSerializable /** * Login. * - * @var string|null + * @var null|string * @since 1.0.0 */ protected $login = null; @@ -313,12 +313,12 @@ class Account implements ArrayableInterface, \JsonSerializable * Checks if the account has a permission defined * * @param int $permission Permission to check - * @param int|null $unit Unit Unit to check (null if all are acceptable) - * @param string|null $app App App to check (null if all are acceptable) - * @param string|null $module Module Module to check (null if all are acceptable) - * @param int|null $type Type (e.g. customer) (null if all are acceptable) - * @param int|null $element (e.g. customer id) (null if all are acceptable) - * @param int|null $component (e.g. address) (null if all are acceptable) + * @param null|int $unit Unit Unit to check (null if all are acceptable) + * @param null|string $app App App to check (null if all are acceptable) + * @param null|string $module Module Module to check (null if all are acceptable) + * @param null|int $type Type (e.g. customer) (null if all are acceptable) + * @param null|int $element (e.g. customer id) (null if all are acceptable) + * @param null|int $component (e.g. address) (null if all are acceptable) * * @return bool Returns true if the account has the permission, false otherwise * diff --git a/Account/PermissionAbstract.php b/Account/PermissionAbstract.php index 44b14cbca..b36a61141 100644 --- a/Account/PermissionAbstract.php +++ b/Account/PermissionAbstract.php @@ -38,7 +38,7 @@ class PermissionAbstract implements \JsonSerializable /** * Unit id. * - * @var int|null + * @var null|int * @since 1.0.0 */ protected $unit = null; @@ -46,7 +46,7 @@ class PermissionAbstract implements \JsonSerializable /** * App name. * - * @var string|null + * @var null|string * @since 1.0.0 */ protected $app = null; @@ -54,7 +54,7 @@ class PermissionAbstract implements \JsonSerializable /** * Module id. * - * @var string|null + * @var null|string * @since 1.0.0 */ protected $module = null; @@ -70,7 +70,7 @@ class PermissionAbstract implements \JsonSerializable /** * Type. * - * @var int|null + * @var null|int * @since 1.0.0 */ protected $type = null; @@ -78,7 +78,7 @@ class PermissionAbstract implements \JsonSerializable /** * Element id. * - * @var int|null + * @var null|int * @since 1.0.0 */ protected $element = null; @@ -86,7 +86,7 @@ class PermissionAbstract implements \JsonSerializable /** * Component id. * - * @var int|null + * @var null|int * @since 1.0.0 */ protected $component = null; @@ -114,7 +114,7 @@ class PermissionAbstract implements \JsonSerializable /** * Get unit id. * - * @return int|null + * @return null|int * * @since 1.0.0 */ @@ -126,7 +126,7 @@ class PermissionAbstract implements \JsonSerializable /** * Set unit id. * - * @param int|null $unit Unit + * @param null|int $unit Unit * * @return void * @@ -140,7 +140,7 @@ class PermissionAbstract implements \JsonSerializable /** * Get app name. * - * @return string|null + * @return null|string * * @since 1.0.0 */ @@ -166,7 +166,7 @@ class PermissionAbstract implements \JsonSerializable /** * Get module id. * - * @return string|null + * @return null|string * * @since 1.0.0 */ @@ -218,7 +218,7 @@ class PermissionAbstract implements \JsonSerializable /** * Get type. * - * @return int|null + * @return null|int * * @since 1.0.0 */ @@ -244,7 +244,7 @@ class PermissionAbstract implements \JsonSerializable /** * Get element id. * - * @return int|null + * @return null|int * * @since 1.0.0 */ @@ -270,7 +270,7 @@ class PermissionAbstract implements \JsonSerializable /** * Get component id. * - * @return int|null + * @return null|int * * @since 1.0.0 */ diff --git a/Asset/AssetManager.php b/Asset/AssetManager.php index eda483791..10ca81e06 100644 --- a/Asset/AssetManager.php +++ b/Asset/AssetManager.php @@ -89,7 +89,7 @@ final class AssetManager implements \Countable * * @param string $id Asset id * - * @return string|null + * @return null|string * * @since 1.0.0 */ diff --git a/Business/Finance/FinanceFormulas.php b/Business/Finance/FinanceFormulas.php index 5c60b8403..c325cf5b3 100644 --- a/Business/Finance/FinanceFormulas.php +++ b/Business/Finance/FinanceFormulas.php @@ -927,7 +927,7 @@ final class FinanceFormulas /** * Future Value Factor * - * @param array $r Rate of return + * @param array $r Rate of return * * @return float * @@ -1055,7 +1055,7 @@ final class FinanceFormulas /** * Net Present Value * - * @param array $C Cash flow ($C[0] = initial investment) + * @param array $C Cash flow ($C[0] = initial investment) * @param float $r Discount rate * * @return float diff --git a/Business/Finance/Lorenzkurve.php b/Business/Finance/Lorenzkurve.php index bd478634f..ffa0d2d0f 100644 --- a/Business/Finance/Lorenzkurve.php +++ b/Business/Finance/Lorenzkurve.php @@ -27,7 +27,7 @@ final class Lorenzkurve /** * Calculate Gini coefficient * - * @param array $data Datapoints (can be unsorted) + * @param array $data Datapoints (can be unsorted) * * @return float * diff --git a/Business/Finance/StockBonds.php b/Business/Finance/StockBonds.php index b5f90bb59..1d83c11f5 100644 --- a/Business/Finance/StockBonds.php +++ b/Business/Finance/StockBonds.php @@ -198,7 +198,7 @@ final class StockBonds /** * Holding Period Return * - * @param array $r Rate of return + * @param array $r Rate of return * * @return float * diff --git a/Config/SettingsAbstract.php b/Config/SettingsAbstract.php index b22155f65..3cbfc839e 100644 --- a/Config/SettingsAbstract.php +++ b/Config/SettingsAbstract.php @@ -76,7 +76,7 @@ abstract class SettingsAbstract implements OptionsInterface /** * Get option by key. * - * @param string|string[]|int|int[] $columns Column values for filtering + * @param int|int[]|string|string[] $columns Column values for filtering * * @return mixed Option value * diff --git a/DataStorage/Database/Connection/ConnectionAbstract.php b/DataStorage/Database/Connection/ConnectionAbstract.php index 15ad0e50d..eaadc0cc8 100644 --- a/DataStorage/Database/Connection/ConnectionAbstract.php +++ b/DataStorage/Database/Connection/ConnectionAbstract.php @@ -38,7 +38,7 @@ abstract class ConnectionAbstract implements ConnectionInterface * * This can be used externally to define queries and execute them. * - * @var \PDO|null + * @var null|\PDO * @since 1.0.0 */ public $con = null; diff --git a/DataStorage/Database/Query/Builder.php b/DataStorage/Database/Query/Builder.php index 7ccc2a1cb..9257606a6 100644 --- a/DataStorage/Database/Query/Builder.php +++ b/DataStorage/Database/Query/Builder.php @@ -62,7 +62,7 @@ class Builder extends BuilderAbstract /** * Into. * - * @var string|\Closure + * @var \Closure|string * @since 1.0.0 */ public $into = null; @@ -399,7 +399,7 @@ class Builder extends BuilderAbstract /** * Make raw column selection. * - * @param string|\Closure $expression Raw expression + * @param \Closure|string $expression Raw expression * * @return Builder * @@ -451,7 +451,7 @@ class Builder extends BuilderAbstract /** * Make raw from. * - * @param string|array|\Closure $expression Expression + * @param array|\Closure|string $expression Expression * * @return Builder * @@ -467,10 +467,10 @@ class Builder extends BuilderAbstract /** * Where. * - * @param Where|string|\Closure|array $columns Columns - * @param string|array $operator Operator + * @param array|\Closure|string|Where $columns Columns + * @param array|string $operator Operator * @param mixed $values Values - * @param string|array $boolean Boolean condition + * @param array|string $boolean Boolean condition * * @return Builder * @@ -514,7 +514,7 @@ class Builder extends BuilderAbstract * * @param mixed $column Column * - * @return array|null + * @return null|array * * @since 1.0.0 */ @@ -526,7 +526,7 @@ class Builder extends BuilderAbstract /** * Where and sub condition. * - * @param Where|string|\Closure|array $where Where sub condition + * @param array|\Closure|string|Where $where Where sub condition * @param mixed $operator Operator * @param mixed $values Values * @@ -542,7 +542,7 @@ class Builder extends BuilderAbstract /** * Where or sub condition. * - * @param Where|string|\Closure|array $where Where sub condition + * @param array|\Closure|string|Where $where Where sub condition * @param mixed $operator Operator * @param mixed $values Values * @@ -558,7 +558,7 @@ class Builder extends BuilderAbstract /** * Where in. * - * @param Where|string|\Closure|array $column Column + * @param array|\Closure|string|Where $column Column * @param mixed $values Values * @param string $boolean Boolean condition * @@ -576,7 +576,7 @@ class Builder extends BuilderAbstract /** * Where null. * - * @param Where|string|\Closure|array $column Column + * @param array|\Closure|string|Where $column Column * @param string $boolean Boolean condition * * @return Builder @@ -593,7 +593,7 @@ class Builder extends BuilderAbstract /** * Where not null. * - * @param Where|string|\Closure|array $column Column + * @param array|\Closure|string|Where $column Column * @param string $boolean Boolean condition * * @return Builder @@ -610,7 +610,7 @@ class Builder extends BuilderAbstract /** * Group by. * - * @param string|array|\Closure ...$columns Grouping result + * @param array|\Closure|string ...$columns Grouping result * * @return Builder * @@ -632,7 +632,7 @@ class Builder extends BuilderAbstract /** * Order by newest. * - * @param string|\Closure $column Column + * @param \Closure|string $column Column * * @return Builder * @@ -648,7 +648,7 @@ class Builder extends BuilderAbstract /** * Order by oldest. * - * @param string|\Closure $column Column + * @param \Closure|string $column Column * * @return Builder * @@ -664,7 +664,7 @@ class Builder extends BuilderAbstract /** * Order by oldest. * - * @param string|array|\Closure $columns Columns + * @param array|\Closure|string $columns Columns * @param string|string[] $order Orders * * @return Builder @@ -879,7 +879,7 @@ class Builder extends BuilderAbstract /** * Table to insert into. * - * @param string|\Closure $table Table + * @param \Closure|string $table Table * * @return Builder * diff --git a/DataStorage/Session/HttpSession.php b/DataStorage/Session/HttpSession.php index f55a63c23..bcf7a84b7 100644 --- a/DataStorage/Session/HttpSession.php +++ b/DataStorage/Session/HttpSession.php @@ -50,7 +50,7 @@ class HttpSession implements SessionInterface /** * Session ID. * - * @var string|int|null + * @var null|int|string * @since 1.0.0 */ private $sid = null; @@ -67,7 +67,7 @@ class HttpSession implements SessionInterface * Constructor. * * @param int $liftetime Session life time - * @param string|int|bool $sid Session id + * @param bool|int|string $sid Session id * @param int $inactivityInterval Interval for session activity * * @throws LockException Throws this exception if the session is alrady locked for further interaction. diff --git a/DataStorage/Session/SessionInterface.php b/DataStorage/Session/SessionInterface.php index 3bab2fd70..682fd5e2c 100644 --- a/DataStorage/Session/SessionInterface.php +++ b/DataStorage/Session/SessionInterface.php @@ -30,7 +30,7 @@ interface SessionInterface /** * Get session variable by key. * - * @param string|int $key Value key + * @param int|string $key Value key * * @return mixed * @@ -41,7 +41,7 @@ interface SessionInterface /** * Store session value by key. * - * @param string|int $key Value key + * @param int|string $key Value key * @param mixed $value Value to store * @param bool $overwrite Overwrite existing values * @@ -54,7 +54,7 @@ interface SessionInterface /** * Remove value from session by key. * - * @param string|int $key Value key + * @param int|string $key Value key * * @return bool * @@ -72,14 +72,14 @@ interface SessionInterface public function save() : void; /** - * @return int|string|null + * @return null|int|string * * @since 1.0.0 */ public function getSID(); /** - * @param int|string|null $sid Session id + * @param null|int|string $sid Session id * * @return void * diff --git a/Dispatcher/Dispatcher.php b/Dispatcher/Dispatcher.php index a7a0f97c2..c9a4dd5ae 100644 --- a/Dispatcher/Dispatcher.php +++ b/Dispatcher/Dispatcher.php @@ -32,7 +32,7 @@ final class Dispatcher /** * Application. * - * @var ApplicationAbstract|null + * @var null|ApplicationAbstract * @since 1.0.0 */ private $app = null; @@ -62,8 +62,8 @@ final class Dispatcher /** * Dispatch controller. * - * @param string|array|\Closure $controller Controller string - * @param array|null|mixed ...$data Data + * @param array|\Closure|string $controller Controller string + * @param null|array|mixed ...$data Data * * @return array * @@ -94,7 +94,7 @@ final class Dispatcher * Dispatch string. * * @param string $controller Controller string - * @param array|null $data Data + * @param null|array $data Data * * @return array * @@ -132,7 +132,7 @@ final class Dispatcher * Dispatch array. * * @param array $controller Controller string - * @param array|null $data Data + * @param null|array $data Data * * @return array * @@ -156,7 +156,7 @@ final class Dispatcher * Dispatch closure. * * @param \Closure $controller Controller string - * @param array|null $data Data + * @param null|array $data Data * * @return mixed * diff --git a/Localization/Defaults/CityMapper.php b/Localization/Defaults/CityMapper.php index a53007d61..ab4dc71dc 100644 --- a/Localization/Defaults/CityMapper.php +++ b/Localization/Defaults/CityMapper.php @@ -30,7 +30,7 @@ class CityMapper extends DataMapperAbstract /** * Columns. * - * @var array> + * @var array> * @since 1.0.0 */ protected static $columns = [ diff --git a/Localization/Defaults/CountryMapper.php b/Localization/Defaults/CountryMapper.php index dc538fdaf..2e2255e09 100644 --- a/Localization/Defaults/CountryMapper.php +++ b/Localization/Defaults/CountryMapper.php @@ -30,7 +30,7 @@ class CountryMapper extends DataMapperAbstract /** * Columns. * - * @var array> + * @var array> * @since 1.0.0 */ protected static $columns = [ diff --git a/Localization/Defaults/CurrencyMapper.php b/Localization/Defaults/CurrencyMapper.php index bad329e0b..c5984cab6 100644 --- a/Localization/Defaults/CurrencyMapper.php +++ b/Localization/Defaults/CurrencyMapper.php @@ -30,7 +30,7 @@ class CurrencyMapper extends DataMapperAbstract /** * Columns. * - * @var array> + * @var array> * @since 1.0.0 */ protected static $columns = [ diff --git a/Localization/Defaults/IbanMapper.php b/Localization/Defaults/IbanMapper.php index 71a425a96..0b05c9d7e 100644 --- a/Localization/Defaults/IbanMapper.php +++ b/Localization/Defaults/IbanMapper.php @@ -30,7 +30,7 @@ class IbanMapper extends DataMapperAbstract /** * Columns. * - * @var array> + * @var array> * @since 1.0.0 */ protected static $columns = [ diff --git a/Localization/Defaults/LanguageMapper.php b/Localization/Defaults/LanguageMapper.php index 2f28c98c6..e2544a8dd 100644 --- a/Localization/Defaults/LanguageMapper.php +++ b/Localization/Defaults/LanguageMapper.php @@ -30,7 +30,7 @@ class LanguageMapper extends DataMapperAbstract /** * Columns. * - * @var array> + * @var array> * @since 1.0.0 */ protected static $columns = [ diff --git a/Localization/Money.php b/Localization/Money.php index 2c668853e..d911c3e6a 100644 --- a/Localization/Money.php +++ b/Localization/Money.php @@ -76,7 +76,7 @@ final class Money implements \Serializable /** * Constructor. * - * @param string|int|float $value Value + * @param float|int|string $value Value * @param string $thousands Thousands separator * @param string $decimal Decimal separator * @param string $symbol Currency symbol @@ -205,7 +205,7 @@ final class Money implements \Serializable /** * Add money. * - * @param Money|string|int|float $value Value to add + * @param float|int|Money|string $value Value to add * * @return Money * @@ -239,7 +239,7 @@ final class Money implements \Serializable /** * Sub money. * - * @param Money|string|int|float $value Value to subtract + * @param float|int|Money|string $value Value to subtract * * @return Money * @@ -261,7 +261,7 @@ final class Money implements \Serializable /** * Mult. * - * @param int|float $value Value to multiply with + * @param float|int $value Value to multiply with * * @return Money * @@ -279,7 +279,7 @@ final class Money implements \Serializable /** * Div. * - * @param int|float $value Value to divide by + * @param float|int $value Value to divide by * * @return Money * @@ -311,7 +311,7 @@ final class Money implements \Serializable /** * Power. * - * @param int|float $value Value to power + * @param float|int $value Value to power * * @return Money * diff --git a/Log/FileLogger.php b/Log/FileLogger.php index 31edbdc71..2187c7490 100644 --- a/Log/FileLogger.php +++ b/Log/FileLogger.php @@ -65,7 +65,7 @@ final class FileLogger implements LoggerInterface * * Potential values are null or a valid file pointer * - * @var resource|false + * @var false|resource * @since 1.0.0 */ private $fp = false; diff --git a/Math/Differential/FiniteDifference.php b/Math/Differential/FiniteDifference.php index 2230daa57..21bfc5cff 100644 --- a/Math/Differential/FiniteDifference.php +++ b/Math/Differential/FiniteDifference.php @@ -40,7 +40,7 @@ class FiniteDifference * Example: ('2*x^3-4x', ['x' => 99]) * * @param string $formula Formula to differentiate - * @param array $variable Variable to differentiate (name value assiziation) + * @param array $variable Variable to differentiate (name value assiziation) * * @return float * @@ -57,7 +57,7 @@ class FiniteDifference * Example: ('2*x^3-4x', ['x' => 99]) * * @param string $formula Formula to differentiate - * @param array $variable Variable to differentiate (name value assiziation) + * @param array $variable Variable to differentiate (name value assiziation) * * @return float * @@ -74,7 +74,7 @@ class FiniteDifference * Example: ('2*x^3-4x', ['x' => 99], 3) * * @param string $formula Formula to differentiate - * @param array $variable Variable to differentiate (name value assiziation) + * @param array $variable Variable to differentiate (name value assiziation) * @param int $derivative Derivative (4th = highest) * * @return float diff --git a/Math/Functions/Functions.php b/Math/Functions/Functions.php index a00f0e6d4..23c60155f 100644 --- a/Math/Functions/Functions.php +++ b/Math/Functions/Functions.php @@ -127,9 +127,9 @@ final class Functions /** * Applying abs to every array value * - * @param array $values Numeric values + * @param array $values Numeric values * - * @return array + * @return array * * @since 1.0.0 */ @@ -240,7 +240,7 @@ final class Functions /** * Power all values in array. * - * @param array $values Values to square + * @param array $values Values to square * @param float $exp Exponent * * @return array @@ -261,10 +261,10 @@ final class Functions /** * Power all values in array. * - * @param array $values Values to square + * @param array $values Values to square * @param int $exp Exponent * - * @return array + * @return array * * @since 1.0.0 */ @@ -282,9 +282,9 @@ final class Functions /** * Sqrt all values in array. * - * @param array $values Values to sqrt + * @param array $values Values to sqrt * - * @return array + * @return array * * @since 1.0.0 */ diff --git a/Math/Geometry/ConvexHull/MonotoneChain.php b/Math/Geometry/ConvexHull/MonotoneChain.php index e61c57f3d..889edbf45 100644 --- a/Math/Geometry/ConvexHull/MonotoneChain.php +++ b/Math/Geometry/ConvexHull/MonotoneChain.php @@ -38,9 +38,9 @@ final class MonotoneChain /** * Create convex hull * - * @param array> $points Points (Point Cloud) + * @param array> $points Points (Point Cloud) * - * @return array> + * @return array> * * @since 1.0.0 */ @@ -81,9 +81,9 @@ final class MonotoneChain /** * Counter clock wise turn? * - * @param array $a Point a - * @param array $b Point b - * @param array $c Point c + * @param array $a Point a + * @param array $b Point b + * @param array $c Point c * * @return float * @@ -97,8 +97,8 @@ final class MonotoneChain /** * Sort by x coordinate then by z coordinate * - * @param array $a Point a - * @param array $b Point b + * @param array $a Point a + * @param array $b Point b * * @return float * diff --git a/Math/Geometry/Shape/D2/Polygon.php b/Math/Geometry/Shape/D2/Polygon.php index 5e0848d2f..7e2e60720 100644 --- a/Math/Geometry/Shape/D2/Polygon.php +++ b/Math/Geometry/Shape/D2/Polygon.php @@ -59,7 +59,7 @@ final class Polygon implements D2ShapeInterface /** * Point polygon relative position * - * @param array $point Point location + * @param array $point Point location * * @return int * @@ -76,8 +76,8 @@ final class Polygon implements D2ShapeInterface /** * Point polygon relative position * - * @param array $point Point location - * @param array> $polygon Polygon definition + * @param array $point Point location + * @param array> $polygon Polygon definition * * @return int -1 inside polygon 0 on vertice 1 outside * @@ -141,8 +141,8 @@ final class Polygon implements D2ShapeInterface /** * Is point on vertex? * - * @param array $point Point location - * @param array> $polygon Polygon definition + * @param array $point Point location + * @param array> $polygon Polygon definition * * @return bool * @@ -239,7 +239,7 @@ final class Polygon implements D2ShapeInterface /** * Get barycenter * - * @return array + * @return array * * @since 1.0.0 */ diff --git a/Math/Matrix/Matrix.php b/Math/Matrix/Matrix.php index 7246d8eb5..4ab836880 100644 --- a/Math/Matrix/Matrix.php +++ b/Math/Matrix/Matrix.php @@ -370,7 +370,7 @@ class Matrix implements \ArrayAccess, \Iterator /** * Set matrix array. * - * @param array> $matrix Matrix + * @param array> $matrix Matrix * * @return Matrix * @@ -621,7 +621,7 @@ class Matrix implements \ArrayAccess, \Iterator /** * Trianglize matrix. * - * @param array> $arr Matrix to trianglize + * @param array> $arr Matrix to trianglize * * @return int Det sign * diff --git a/Math/Statistic/Basic.php b/Math/Statistic/Basic.php index bac3ce243..1ac047cf7 100644 --- a/Math/Statistic/Basic.php +++ b/Math/Statistic/Basic.php @@ -40,9 +40,9 @@ final class Basic * * Example: ([4, 5, 9, 1, 3]) * - * @param array $values Values + * @param array $values Values * - * @return array + * @return array * * @since 1.0.0 */ diff --git a/Math/Statistic/Correlation.php b/Math/Statistic/Correlation.php index 2a68a5cff..94490ad2c 100644 --- a/Math/Statistic/Correlation.php +++ b/Math/Statistic/Correlation.php @@ -40,8 +40,8 @@ final class Correlation * * Example: ([4, 5, 9, 1, 3], [4, 5, 9, 1, 3]) * - * @param array $x Values - * @param array $y Values + * @param array $x Values + * @param array $y Values * * @return float * @@ -55,7 +55,7 @@ final class Correlation /** * Get the autocorrelation coefficient (ACF). * - * @param array $x Dataset + * @param array $x Dataset * @param int $k k-th coefficient * * @return float diff --git a/Math/Statistic/Forecast/Forecasts.php b/Math/Statistic/Forecast/Forecasts.php index b6da74006..a80d1effb 100644 --- a/Math/Statistic/Forecast/Forecasts.php +++ b/Math/Statistic/Forecast/Forecasts.php @@ -31,7 +31,7 @@ class Forecasts * @param float $standardDeviation Standard Deviation of forecast * @param float $interval Forecast multiplier for prediction intervals * - * @return array + * @return array * * @since 1.0.0 */ diff --git a/Math/Statistic/Forecast/Regression/RegressionAbstract.php b/Math/Statistic/Forecast/Regression/RegressionAbstract.php index 8f763c615..f8bd7bdbb 100644 --- a/Math/Statistic/Forecast/Regression/RegressionAbstract.php +++ b/Math/Statistic/Forecast/Regression/RegressionAbstract.php @@ -33,8 +33,8 @@ abstract class RegressionAbstract * * @latex y = b_{0} + b_{1} \cdot x * - * @param array $x Obersved x values - * @param array $y Observed y values + * @param array $x Obersved x values + * @param array $y Observed y values * * @return array [b0 => ?, b1 => ?] * @@ -60,7 +60,7 @@ abstract class RegressionAbstract * * @latex s_{e} = \sqrt{\frac{1}{N - 2}\sum_{i = 1}^{N} e_{i}^{2}} * - * @param array $errors Errors (e = y - y_forecasted) + * @param array $errors Errors (e = y - y_forecasted) * * @return float * @@ -83,11 +83,11 @@ abstract class RegressionAbstract * Get predictional interval for linear regression. * * @param float $forecasted Forecasted y value - * @param array $x observex x values - * @param array $errors Errors for y values (y - y_forecasted) + * @param array $x observex x values + * @param array $errors Errors for y values (y - y_forecasted) * @param float $multiplier Multiplier for interval * - * @return array + * @return array * * @since 1.0.0 */ @@ -111,8 +111,8 @@ abstract class RegressionAbstract * * @latex \beta_{1} = \frac{\sum_{i=1}^{N} \left(y_{i} - \bar{y}\right)\left(x_{i} - \bar{x}\right)}{\sum_{i=1}^{N} \left(x_{i} - \bar{x}\right)^{2}} * - * @param array $x Obersved x values - * @param array $y Observed y values + * @param array $x Obersved x values + * @param array $y Observed y values * * @return float * @@ -140,8 +140,8 @@ abstract class RegressionAbstract * * @latex \beta_{0} = \bar{x} - b_{1} \cdot \bar{x} * - * @param array $x Obersved x values - * @param array $y Observed y values + * @param array $x Obersved x values + * @param array $y Observed y values * @param float $b1 Beta 1 * * @return float diff --git a/Message/MessageInterface.php b/Message/MessageInterface.php index c0bca0250..895deea7f 100644 --- a/Message/MessageInterface.php +++ b/Message/MessageInterface.php @@ -27,7 +27,7 @@ interface MessageInterface /** * Retrieves all message header values. * - * @return HeaderAbstract|null + * @return null|HeaderAbstract * * @since 1.0.0 */ diff --git a/Module/ModuleAbstract.php b/Module/ModuleAbstract.php index d80ecab2b..5fcc9596e 100644 --- a/Module/ModuleAbstract.php +++ b/Module/ModuleAbstract.php @@ -264,7 +264,7 @@ abstract class ModuleAbstract * @param RequestAbstract $request Request * @param mixed $old Response object old * @param mixed $new Response object new - * @param string|\Closure $mapper Object mapper + * @param \Closure|string $mapper Object mapper * @param string $trigger Trigger for the event manager * * @return void diff --git a/Module/ModuleManager.php b/Module/ModuleManager.php index 17d570b7b..aad10e10e 100644 --- a/Module/ModuleManager.php +++ b/Module/ModuleManager.php @@ -133,7 +133,7 @@ final class ModuleManager * * @param RequestAbstract $request Request * - * @return array + * @return array * * @since 1.0.0 */ @@ -611,7 +611,7 @@ final class ModuleManager /** * Initialize module. * - * @param string|array $modules Module name + * @param array|string $modules Module name * * @return void * diff --git a/Socket/CommandManager.php b/Socket/CommandManager.php index b6b25e1ea..5e73ac1de 100644 --- a/Socket/CommandManager.php +++ b/Socket/CommandManager.php @@ -92,7 +92,7 @@ class CommandManager implements \Countable * @param mixed $conn Client ID * @param mixed $para Parameters to pass * - * @return mixed|bool + * @return bool|mixed * * @since 1.0.0 */ diff --git a/Stdlib/Graph/Graph.php b/Stdlib/Graph/Graph.php index 271919f5c..a5dee4aba 100644 --- a/Stdlib/Graph/Graph.php +++ b/Stdlib/Graph/Graph.php @@ -128,7 +128,7 @@ class Graph * * @param mixed $key Node key * - * @return Node|null + * @return null|Node * * @since 1.0.0 */ @@ -154,7 +154,7 @@ class Graph * * @param mixed $key Edge key * - * @return Edge|null + * @return null|Edge * * @since 1.0.0 */ diff --git a/Stdlib/Map/MultiMap.php b/Stdlib/Map/MultiMap.php index f7560464e..05dfa9084 100644 --- a/Stdlib/Map/MultiMap.php +++ b/Stdlib/Map/MultiMap.php @@ -76,7 +76,7 @@ class MultiMap implements \Countable /** * Add data. * - * @param array $keys Keys for value + * @param array $keys Keys for value * @param mixed $value Value to store * @param bool $overwrite Add value if key exists * diff --git a/System/File/DirectoryInterface.php b/System/File/DirectoryInterface.php index 55d388f81..2b68a7c7b 100644 --- a/System/File/DirectoryInterface.php +++ b/System/File/DirectoryInterface.php @@ -46,7 +46,7 @@ interface DirectoryInterface extends ContainerInterface, \Iterator, \ArrayAccess * * @param string $name File/direcotry name * - * @return ContainerInterface|null + * @return null|ContainerInterface * * @since 1.0.0 */ diff --git a/System/File/Local/Directory.php b/System/File/Local/Directory.php index 3884037c4..d2be8091f 100644 --- a/System/File/Local/Directory.php +++ b/System/File/Local/Directory.php @@ -105,7 +105,7 @@ final class Directory extends FileAbstract implements DirectoryInterface * @param string $extension Extension * @param string $exclude Pattern to exclude * - * @return array + * @return array * * @since 1.0.0 */ diff --git a/System/File/Storage.php b/System/File/Storage.php index 1a5dd73f7..b779a30af 100644 --- a/System/File/Storage.php +++ b/System/File/Storage.php @@ -88,7 +88,7 @@ final class Storage * Register storage environment. * * @param string $name Name of the environment - * @param string|StorageAbstract|mixed $class Class to register. This can be either a namespace path, a anonymous class or storage implementation. + * @param mixed|StorageAbstract|string $class Class to register. This can be either a namespace path, a anonymous class or storage implementation. * * @return bool * diff --git a/Uri/UriFactory.php b/Uri/UriFactory.php index 688b2e4c0..8797b2266 100644 --- a/Uri/UriFactory.php +++ b/Uri/UriFactory.php @@ -224,7 +224,7 @@ final class UriFactory * $ = Other data * * @param string $uri Path data - * @param array $toMatch Optional special replacements + * @param array $toMatch Optional special replacements * * @return string * diff --git a/Utils/ArrayUtils.php b/Utils/ArrayUtils.php index ca66a4796..e5c956eb1 100644 --- a/Utils/ArrayUtils.php +++ b/Utils/ArrayUtils.php @@ -370,7 +370,7 @@ final class ArrayUtils * @param int $start Start index * @param int $count Amount of elements to sum * - * @return int|float + * @return float|int * * @since 1.0.0 */ diff --git a/Utils/Converter/Currency.php b/Utils/Converter/Currency.php index b239be3b3..99d8e9905 100644 --- a/Utils/Converter/Currency.php +++ b/Utils/Converter/Currency.php @@ -34,7 +34,7 @@ class Currency /** * ECB currency rates. * - * @var array|null + * @var null|array * @since 1.0.0 */ private static $ecbCurrencies = null; diff --git a/Utils/Git/Repository.php b/Utils/Git/Repository.php index 757ce3169..545533aeb 100644 --- a/Utils/Git/Repository.php +++ b/Utils/Git/Repository.php @@ -277,7 +277,7 @@ class Repository /** * Files to add to commit. * - * @param string|array $files Files to commit + * @param array|string $files Files to commit * * @return string * @@ -295,7 +295,7 @@ class Repository /** * Remove file(s) from repository * - * @param string|array $files Files to remove + * @param array|string $files Files to remove * @param bool $cached ? * * @return string @@ -312,7 +312,7 @@ class Repository /** * Remove file(s) from repository * - * @param string|array $files Files to remove + * @param array|string $files Files to remove * * @return string * diff --git a/Utils/Permutation.php b/Utils/Permutation.php index 151931b62..084219b26 100644 --- a/Utils/Permutation.php +++ b/Utils/Permutation.php @@ -41,7 +41,7 @@ final class Permutation * @param array $toPermute data to permutate * @param array $result existing permutations * - * @return array + * @return array * * @since 1.0.0 */ @@ -101,7 +101,7 @@ final class Permutation /** * Permutate based on transposition key. * - * @param string|array $toPermute To permutate + * @param array|string $toPermute To permutate * @param array $key Permutation keys * * @return mixed diff --git a/Utils/RnG/Phone.php b/Utils/RnG/Phone.php index b73e893a6..04dd0739c 100644 --- a/Utils/RnG/Phone.php +++ b/Utils/RnG/Phone.php @@ -31,7 +31,7 @@ class Phone * @param bool $isInt This number uses a country code * @param string $struct Number layout * @param array $size Digits per placeholder [min, max] - * @param array|null $countries Country codes + * @param null|array $countries Country codes * * @return string * diff --git a/Utils/StringUtils.php b/Utils/StringUtils.php index df32fb91b..66f4851b4 100644 --- a/Utils/StringUtils.php +++ b/Utils/StringUtils.php @@ -98,7 +98,7 @@ final class StringUtils * In case of an array the function will test if any of the needles is at the end of the haystack string. * * @param string $haystack Haystack - * @param string|array $needles Needles to check if they are at the end of the haystack. + * @param array|string $needles Needles to check if they are at the end of the haystack. * * @example StringUtils::endsWith('Test string', ['test1', 'string']); // true * @@ -128,7 +128,7 @@ final class StringUtils * In case of an array the function will test if any of the needles is at the beginning of the haystack string. * * @param string $haystack Haystack - * @param string|array $needles Needles to check if they are at the beginning of the haystack. + * @param array|string $needles Needles to check if they are at the beginning of the haystack. * * @example StringUtils::startsWith('Test string', ['Test', 'something']); // true * @example StringUtils::startsWith('Test string', 'string'); // false @@ -160,7 +160,7 @@ final class StringUtils * In case of an array the function will test if any of the needles is at the beginning of the haystack string. * * @param string $haystack Haystack - * @param string|array $needles Needles to check if they are at the beginning of the haystack. + * @param array|string $needles Needles to check if they are at the beginning of the haystack. * * @return bool The function returns true if any of the needles is at the beginning of the haystack, false otherwise. * @@ -188,7 +188,7 @@ final class StringUtils * In case of an array the function will test if any of the needles is at the end of the haystack string. * * @param string $haystack Haystack - * @param string|array $needles Needles to check if they are at the end of the haystack. + * @param array|string $needles Needles to check if they are at the end of the haystack. * * @example StringUtils::endsWith('Test string', ['test1', 'string']); // true * @example StringUtils::endsWith('Test string', 'string'); // true diff --git a/Validation/Validator.php b/Validation/Validator.php index 058144f9f..f3970b181 100644 --- a/Validation/Validator.php +++ b/Validation/Validator.php @@ -67,7 +67,7 @@ final class Validator extends ValidatorAbstract * Validate variable by type. * * @param mixed $var Variable to validate - * @param string[]|string $constraint Array of allowed types + * @param string|string[] $constraint Array of allowed types * * @return bool * @@ -114,7 +114,7 @@ final class Validator extends ValidatorAbstract * Validate variable by substring. * * @param string $var Variable to validate - * @param string|array $substr Substring + * @param array|string $substr Substring * * @return bool * @@ -143,9 +143,9 @@ final class Validator extends ValidatorAbstract /** * Validate variable by interval. * - * @param int|float $var Variable to validate - * @param int|float $min Min. value - * @param int|float $max Max. value + * @param float|int $var Variable to validate + * @param float|int $min Min. value + * @param float|int $max Max. value * * @return bool * diff --git a/Views/View.php b/Views/View.php index f935874e4..c0391664c 100644 --- a/Views/View.php +++ b/Views/View.php @@ -50,7 +50,7 @@ class View extends ViewAbstract /** * Application. * - * @var ApplicationAbstract|null + * @var null|ApplicationAbstract * @since 1.0.0 */ protected $app = null; @@ -58,7 +58,7 @@ class View extends ViewAbstract /** * Request. * - * @var RequestAbstract|null + * @var null|RequestAbstract * @since 1.0.0 */ protected $request = null; @@ -66,7 +66,7 @@ class View extends ViewAbstract /** * Request. * - * @var ResponseAbstract|null + * @var null|ResponseAbstract * @since 1.0.0 */ protected $response = null; @@ -228,7 +228,7 @@ class View extends ViewAbstract /** * Get request of view * - * @return RequestAbstract|null + * @return null|RequestAbstract * * @since 1.0.0 */ @@ -240,7 +240,7 @@ class View extends ViewAbstract /** * Get response of view * - * @return ResponseAbstract|null + * @return null|ResponseAbstract * * @since 1.0.0 */ diff --git a/tests/DataStorage/Database/TestModel/BaseModelMapper.php b/tests/DataStorage/Database/TestModel/BaseModelMapper.php index cb002e411..ec3bcb062 100644 --- a/tests/DataStorage/Database/TestModel/BaseModelMapper.php +++ b/tests/DataStorage/Database/TestModel/BaseModelMapper.php @@ -21,7 +21,7 @@ class BaseModelMapper extends DataMapperAbstract /** * Columns. * - * @var array> + * @var array> * @since 1.0.0 */ protected static $columns = [ diff --git a/tests/DataStorage/Database/TestModel/BelongsToModelMapper.php b/tests/DataStorage/Database/TestModel/BelongsToModelMapper.php index 041516545..b80b8f3d6 100644 --- a/tests/DataStorage/Database/TestModel/BelongsToModelMapper.php +++ b/tests/DataStorage/Database/TestModel/BelongsToModelMapper.php @@ -21,7 +21,7 @@ class BelongsToModelMapper extends DataMapperAbstract /** * Columns. * - * @var array> + * @var array> * @since 1.0.0 */ protected static $columns = [ diff --git a/tests/DataStorage/Database/TestModel/ManyToManyDirectModelMapper.php b/tests/DataStorage/Database/TestModel/ManyToManyDirectModelMapper.php index c406d25eb..d5b18ef56 100644 --- a/tests/DataStorage/Database/TestModel/ManyToManyDirectModelMapper.php +++ b/tests/DataStorage/Database/TestModel/ManyToManyDirectModelMapper.php @@ -21,7 +21,7 @@ class ManyToManyDirectModelMapper extends DataMapperAbstract /** * Columns. * - * @var array> + * @var array> * @since 1.0.0 */ protected static $columns = [ diff --git a/tests/DataStorage/Database/TestModel/ManyToManyRelModelMapper.php b/tests/DataStorage/Database/TestModel/ManyToManyRelModelMapper.php index a8fa1863f..f70f71f5e 100644 --- a/tests/DataStorage/Database/TestModel/ManyToManyRelModelMapper.php +++ b/tests/DataStorage/Database/TestModel/ManyToManyRelModelMapper.php @@ -21,7 +21,7 @@ class ManyToManyRelModelMapper extends DataMapperAbstract /** * Columns. * - * @var array> + * @var array> * @since 1.0.0 */ protected static $columns = [ diff --git a/tests/DataStorage/Database/TestModel/OwnsOneModelMapper.php b/tests/DataStorage/Database/TestModel/OwnsOneModelMapper.php index d19662972..d61e8091c 100644 --- a/tests/DataStorage/Database/TestModel/OwnsOneModelMapper.php +++ b/tests/DataStorage/Database/TestModel/OwnsOneModelMapper.php @@ -21,7 +21,7 @@ class OwnsOneModelMapper extends DataMapperAbstract /** * Columns. * - * @var array> + * @var array> * @since 1.0.0 */ protected static $columns = [