diff --git a/Algorithm/Clustering/Point.php b/Algorithm/Clustering/Point.php index b3d868f7b..40d0ff830 100644 --- a/Algorithm/Clustering/Point.php +++ b/Algorithm/Clustering/Point.php @@ -51,8 +51,8 @@ class Point implements PointInterface /** * Constructor. * - * @param array $coordinates Coordinates of the point - * @param string $name Name of the point + * @param array $coordinates Coordinates of the point + * @param string $name Name of the point * * @since 1.0.0 */ diff --git a/Algorithm/Maze/MazeGenerator.php b/Algorithm/Maze/MazeGenerator.php index 2d3a6bd89..53cb59871 100644 --- a/Algorithm/Maze/MazeGenerator.php +++ b/Algorithm/Maze/MazeGenerator.php @@ -141,7 +141,7 @@ class MazeGenerator /** * Render a maze * - * @param array $maze Maze to render + * @param array $maze Maze to render * * @return string * diff --git a/Algorithm/PathFinding/Grid.php b/Algorithm/PathFinding/Grid.php index ff49c7a2d..99901f8d9 100644 --- a/Algorithm/PathFinding/Grid.php +++ b/Algorithm/PathFinding/Grid.php @@ -35,7 +35,30 @@ class Grid /** * Create a grid from an array * - * @param array $gridArray Grid defined in an array (0 = empty, 1 = start, 2 = end, 9 = not walkable) + * [ + * [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,], + * [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0,], + * [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,], + * [0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0,], + * [0, 0, 0, 0, 9, 9, 9, 9, 9, 0, 9, 0, 0, 0, 0,], + * [0, 0, 1, 0, 9, 0, 0, 0, 0, 0, 9, 0, 9, 9, 9,], + * [0, 0, 0, 0, 9, 0, 0, 9, 9, 9, 9, 0, 0, 0, 0,], + * [0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,], + * [0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 9, 9, 9, 9, 0,], + * [0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,], + * [0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 9, 9, 0, 0, 0,], + * [0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 9, 2, 0, 0, 0,], + * [0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 9, 9, 0, 0, 0,], + * [0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,], + * [0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,], + * ] + * + * @param array $gridArray Grid defined in an array (0 = empty, 1 = start, 2 = end, 9 = not walkable) + * @param string $node Node type name + * + * @return Grid + * + * @since 1.0.0 */ public static function createGridFromArray(array $gridArray, string $node) : self { @@ -111,7 +134,7 @@ class Grid * @param Node $node Node to get neighbors from * @param int $movement Allowed movements * - * @return array + * @return Node[] * * @since 1.0.0 */ diff --git a/Algorithm/PathFinding/Heuristic.php b/Algorithm/PathFinding/Heuristic.php index 9cfaccc7d..bf0612d29 100644 --- a/Algorithm/PathFinding/Heuristic.php +++ b/Algorithm/PathFinding/Heuristic.php @@ -29,9 +29,9 @@ final class Heuristic /** * Calculate metric/distance between two nodes. * - * @param array $node1 Array with 'x' and 'y' coordinate - * @param array $node2 Array with 'x' and 'y' coordinate - * @param int $heuristic Heuristic to use for calculation + * @param array $node1 Array with 'x' and 'y' coordinate + * @param array $node2 Array with 'x' and 'y' coordinate + * @param int $heuristic Heuristic to use for calculation * * @return float * diff --git a/Algorithm/PathFinding/JumpPointSearch.php b/Algorithm/PathFinding/JumpPointSearch.php index c87f0b535..7e7eba3be 100644 --- a/Algorithm/PathFinding/JumpPointSearch.php +++ b/Algorithm/PathFinding/JumpPointSearch.php @@ -136,7 +136,7 @@ final class JumpPointSearch implements PathFinderInterface * @param int $movement Movement type * @param Grid $grid Grid of the nodes * - * @return array Neighbors of node + * @return Node[] Neighbors of node * * @since 1.0.0 */ @@ -159,7 +159,7 @@ final class JumpPointSearch implements PathFinderInterface * @param JumpPointNode $node Node to find successor for * @param Grid $grid Grid of the nodes * - * @return array Neighbors of node + * @return Node[] Neighbors of node * * @since 1.0.0 */ @@ -216,7 +216,7 @@ final class JumpPointSearch implements PathFinderInterface * @param JumpPointNode $node Node to find successor for * @param Grid $grid Grid of the nodes * - * @return array Neighbors of node + * @return Node[] Neighbors of node * * @since 1.0.0 */ @@ -293,7 +293,7 @@ final class JumpPointSearch implements PathFinderInterface * @param JumpPointNode $node Node to find successor for * @param Grid $grid Grid of the nodes * - * @return array Neighbors of node + * @return Node[] Neighbors of node * * @since 1.0.0 */ @@ -366,7 +366,7 @@ final class JumpPointSearch implements PathFinderInterface * @param JumpPointNode $node Node to find successor for * @param Grid $grid Grid of the nodes * - * @return array Neighbors of node + * @return Node[] Neighbors of node * * @since 1.0.0 */ diff --git a/Algorithm/PathFinding/Node.php b/Algorithm/PathFinding/Node.php index a579d8bc8..67eb1cb41 100644 --- a/Algorithm/PathFinding/Node.php +++ b/Algorithm/PathFinding/Node.php @@ -173,7 +173,7 @@ class Node /** * Get the coordinates of this node. * - * @return array ['x' => ?, 'y' => ?] + * @return array ['x' => ?, 'y' => ?] * * @since 1.0.0 */ diff --git a/Localization/L11nManager.php b/Localization/L11nManager.php index 9ac5644aa..487ffecc7 100644 --- a/Localization/L11nManager.php +++ b/Localization/L11nManager.php @@ -128,7 +128,7 @@ final class L11nManager * @param string $language Language iso code * @param string $module Module name * - * @return array + * @return array|array> * * @since 1.0.0 */ diff --git a/Localization/Localization.php b/Localization/Localization.php index 50053479e..5e5072d9c 100644 --- a/Localization/Localization.php +++ b/Localization/Localization.php @@ -353,7 +353,7 @@ class Localization /** * get datetime format * - * @return array + * @return array * * @since 1.0.0 */ @@ -365,7 +365,7 @@ class Localization /** * Set datetime format * - * @param array $datetime Datetime format + * @param array $datetime Datetime format * * @return void * diff --git a/Math/Matrix/Matrix.php b/Math/Matrix/Matrix.php index caeed3501..b2ef1acb6 100644 --- a/Math/Matrix/Matrix.php +++ b/Math/Matrix/Matrix.php @@ -104,7 +104,7 @@ class Matrix implements \ArrayAccess, \Iterator * @param int $m Row * @param int $n Column * - * @return mixed + * @return int|float * * @throws InvalidDimensionException * @@ -176,8 +176,8 @@ class Matrix implements \ArrayAccess, \Iterator /** * Get sub matrix array. * - * @param array $rows Row indices - * @param array $cols Row indices + * @param int[] $rows Row indices + * @param int[] $cols Row indices * * @return Matrix * @@ -204,9 +204,9 @@ class Matrix implements \ArrayAccess, \Iterator /** * Get sub matrix array. * - * @param int $iRow Start row - * @param int $lRow End row - * @param array $cols Row indices + * @param int $iRow Start row + * @param int $lRow End row + * @param int[] $cols Row indices * * @return Matrix * @@ -232,9 +232,9 @@ class Matrix implements \ArrayAccess, \Iterator /** * Get sub matrix array. * - * @param array $rows Row indices - * @param int $iCol Start col - * @param int $lCol End col + * @param int[] $rows Row indices + * @param int $iCol Start col + * @param int $lCol End col * * @return Matrix * diff --git a/Math/Matrix/Vector.php b/Math/Matrix/Vector.php index b0e5d29d2..bc6b125a9 100644 --- a/Math/Matrix/Vector.php +++ b/Math/Matrix/Vector.php @@ -44,7 +44,7 @@ final class Vector extends Matrix * * @param int $m Position to get * - * @return mixed + * @return int|float * * @since 1.0.0 */ @@ -56,7 +56,7 @@ final class Vector extends Matrix /** * Set matrix * - * @param array $vector 1-Dimensional array + * @param array $vector 1-Dimensional array * * @return Vector * diff --git a/Math/Number/Integer.php b/Math/Number/Integer.php index 753177970..b129a0fd0 100644 --- a/Math/Number/Integer.php +++ b/Math/Number/Integer.php @@ -146,7 +146,7 @@ final class Integer * @param int $value Integer to factorize * @param int $limit Max amount of iterations * - * @return array + * @return int[] * * @throws \Exception This exception is thrown if the value is not odd * diff --git a/Math/Numerics/Interpolation/LagrangeInterpolation.php b/Math/Numerics/Interpolation/LagrangeInterpolation.php index e6f81d768..9e1245200 100644 --- a/Math/Numerics/Interpolation/LagrangeInterpolation.php +++ b/Math/Numerics/Interpolation/LagrangeInterpolation.php @@ -35,7 +35,7 @@ final class LagrangeInterpolation implements InterpolationInterface /** * Constructor. * - * @param array $points Points to create the interpolation with + * @param array> $points Points to create the interpolation with * * @since 1.0.0 */ diff --git a/Math/Parser/Evaluator.php b/Math/Parser/Evaluator.php index 29ee5b3cf..df3c06b6d 100644 --- a/Math/Parser/Evaluator.php +++ b/Math/Parser/Evaluator.php @@ -89,7 +89,7 @@ final class Evaluator * * @param string $equation Equation to convert * - * @return array + * @return string[] * * @since 1.0.0 */ @@ -147,7 +147,7 @@ final class Evaluator $output[] = \array_pop($stack); } - /** @var array $output */ + /** @var string[] $output */ return $output; } } diff --git a/Math/Statistic/Average.php b/Math/Statistic/Average.php index 3f14caaa1..f4653500b 100644 --- a/Math/Statistic/Average.php +++ b/Math/Statistic/Average.php @@ -74,7 +74,7 @@ final class Average * @param array $weight Weight for moving average * @param bool $symmetric Cyclic moving average * - * @return array Moving average of data + * @return float[] Moving average of data * * @throws \Exception * diff --git a/Math/Statistic/Correlation.php b/Math/Statistic/Correlation.php index 2985a8516..effd5e7fe 100644 --- a/Math/Statistic/Correlation.php +++ b/Math/Statistic/Correlation.php @@ -78,9 +78,9 @@ final class Correlation /** * Box Pierce test (portmanteau test). * - * @param array $autocorrelations Autocorrelations - * @param int $h Maximum leg considered - * @param int $n Amount of observations + * @param float[] $autocorrelations Autocorrelations + * @param int $h Maximum leg considered + * @param int $n Amount of observations * * @return float * @@ -99,9 +99,9 @@ final class Correlation /** * Ljung Box test (portmanteau test). * - * @param array $autocorrelations Autocorrelations - * @param int $h Maximum leg considered - * @param int $n Amount of observations + * @param float[] $autocorrelations Autocorrelations + * @param int $h Maximum leg considered + * @param int $n Amount of observations * * @return float * diff --git a/Math/Statistic/Forecast/Error.php b/Math/Statistic/Forecast/Error.php index 6140a88de..f5d605b52 100644 --- a/Math/Statistic/Forecast/Error.php +++ b/Math/Statistic/Forecast/Error.php @@ -57,10 +57,10 @@ final class Error /** * Get array of errors of a forecast. * - * @param array $observed Dataset - * @param array $forecasted Forecasted + * @param float[] $observed Dataset + * @param float[] $forecasted Forecasted * - * @return array + * @return float[] * * @since 1.0.0 */ @@ -93,10 +93,10 @@ final class Error /** * Get error percentages. * - * @param array $errors Errors - * @param array $observed Dataset + * @param float[] $errors Errors + * @param float[] $observed Dataset * - * @return array + * @return float[] * * @since 1.0.0 */ @@ -114,7 +114,7 @@ final class Error /** * Get mean absolute error (MAE). * - * @param array $errors Errors + * @param array $errors Errors * * @return float * @@ -128,8 +128,8 @@ final class Error /** * Get mean squared error (MSE). * - * @param array $errors Errors - * @param int $offset Population/Size offset + * @param array $errors Errors + * @param int $offset Population/Size offset * * @return float * @@ -143,7 +143,7 @@ final class Error /** * Get root mean squared error (RMSE). * - * @param array $errors Errors + * @param array $errors Errors * * @return float * @@ -161,8 +161,8 @@ final class Error * * @latex R^{2} = \frac{\sum \left(\hat{y}_{i} - \bar{y}\right)^2}{\sum \left(y_{i} - \bar{y}\right)^2} * - * @param array $observed Obersved y values - * @param array $forecasted Forecasted y values + * @param float[] $observed Obersved y values + * @param float[] $forecasted Forecasted y values * * @return float * @@ -176,7 +176,7 @@ final class Error /** * Get sum squared error (SSE). * - * @param array $errors Errors + * @param array $errors Errors * * @return float * @@ -268,8 +268,8 @@ final class Error /** * Get mean absolute percentage error (MAPE). * - * @param array $observed Dataset - * @param array $forecasted Forecasted + * @param float[] $observed Dataset + * @param float[] $forecasted Forecasted * * @return float * @@ -286,8 +286,8 @@ final class Error /** * Get mean absolute percentage error (sMAPE). * - * @param array $observed Dataset - * @param array $forecasted Forecasted + * @param float[] $observed Dataset + * @param float[] $forecasted Forecasted * * @return float * @@ -310,10 +310,10 @@ final class Error /** * Get cross sectional scaled errors (CSSE) * - * @param array $errors Errors - * @param array $observed Dataset + * @param array $errors Errors + * @param float[] $observed Dataset * - * @return array + * @return float[] * * @todo Orange-Management/phpOMS#172 * Create unit test. @@ -335,8 +335,8 @@ final class Error /** * Get cross sectional scaled errors (CSSE) * - * @param float $error Errors - * @param array $observed Dataset + * @param float $error Errors + * @param float[] $observed Dataset * * @return float * @@ -360,7 +360,7 @@ final class Error /** * Get mean absolute scaled error (MASE) * - * @param array $scaledErrors Scaled errors + * @param array $scaledErrors Scaled errors * * @return float * @@ -374,7 +374,7 @@ final class Error /** * Get mean absolute scaled error (MSSE) * - * @param array $scaledErrors Scaled errors + * @param array $scaledErrors Scaled errors * * @return float * @@ -391,9 +391,9 @@ final class Error /** * Get scaled error (SE) * - * @param array $errors Errors - * @param array $observed Dataset - * @param int $m Shift + * @param array $errors Errors + * @param float[] $observed Dataset + * @param int $m Shift * * @return array * @@ -414,9 +414,9 @@ final class Error /** * Get scaled error (SE) * - * @param float $error Errors - * @param array $observed Dataset - * @param int $m Shift + * @param float $error Errors + * @param float[] $observed Dataset + * @param int $m Shift * * @return float * @@ -430,8 +430,8 @@ final class Error /** * Get naive forecast * - * @param array $observed Dataset - * @param int $m Shift + * @param float[] $observed Dataset + * @param int $m Shift * * @return float * diff --git a/Math/Topology/Metrics2D.php b/Math/Topology/Metrics2D.php index d047f3653..5622d6b5a 100644 --- a/Math/Topology/Metrics2D.php +++ b/Math/Topology/Metrics2D.php @@ -42,8 +42,8 @@ final class Metrics2D * * @latex d(p, q) = \sum_{n=1}^N{|p_i - q_i|} * - * @param array $a 2-D array with x and y coordinate - * @param array $b 2-D array with x and y coordinate + * @param array $a 2-D array with x and y coordinate + * @param array $b 2-D array with x and y coordinate * * @return float * @@ -59,8 +59,8 @@ final class Metrics2D * * @latex d(p, q) = \sqrt{\sum_{n=1}^N{(p_i - q_i)^2}} * - * @param array $a 2-D array with x and y coordinate - * @param array $b 2-D array with x and y coordinate + * @param array $a 2-D array with x and y coordinate + * @param array $b 2-D array with x and y coordinate * * @return float * @@ -79,8 +79,8 @@ final class Metrics2D * * @latex d(p, q) = \begin{cases}(\sqrt{2} - 1) \times |p_i - q_i| + |p_{i+1} - q_{i+1}|,& \text{if } |p_i - q_i| < |p_{i+1} - q_{i+1}|\\(\sqrt{2} - 1) \times |p_{i+1} - q_{i+1}| + |p_i - q_i|,&\text{if } |p_i - q_i| \geq |p_{i+1} - q_{i+1}|\end{cases} * - * @param array $a 2-D array with x and y coordinate - * @param array $b 2-D array with x and y coordinate + * @param array $a 2-D array with x and y coordinate + * @param array $b 2-D array with x and y coordinate * * @return float * @@ -99,8 +99,8 @@ final class Metrics2D * * @latex d(p, q) = \max_i{(|p_i - q_i|)} * - * @param array $a 2-D array with x and y coordinate - * @param array $b 2-D array with x and y coordinate + * @param array $a 2-D array with x and y coordinate + * @param array $b 2-D array with x and y coordinate * * @return float * @@ -119,8 +119,8 @@ final class Metrics2D * * @latex d(p, q) = \sqrt[\lambda]{\sum_{n=1}^N{|p_i - q_i|^\lambda}} * - * @param array $a 2-D array with x and y coordinate - * @param array $b 2-D array with x and y coordinate + * @param array $a 2-D array with x and y coordinate + * @param array $b 2-D array with x and y coordinate * @param int $lambda Lambda * * @return float @@ -141,8 +141,8 @@ final class Metrics2D * * @latex d(p, q) = \sum_{n=1}^N{\frac{|p_i - q_i|}{|p_i| + |q_i|} * - * @param array $a 2-D array with x and y coordinate - * @param array $b 2-D array with x and y coordinate + * @param array $a 2-D array with x and y coordinate + * @param array $b 2-D array with x and y coordinate * * @return float * @@ -159,8 +159,8 @@ final class Metrics2D * * @latex d(p, q) = \frac{\sum_{n=1}^N{|p_i - q_i|}}{\sum_{n=1}^N{(p_i + q_i)}} * - * @param array $a 2-D array with x and y coordinate - * @param array $b 2-D array with x and y coordinate + * @param array $a 2-D array with x and y coordinate + * @param array $b 2-D array with x and y coordinate * * @return float * @@ -179,8 +179,8 @@ final class Metrics2D * * @latex d(p, q) = \frac{\sum_{n=1}^N{p_i * q_i}}{\left(\sum_{n=1}^N{p_i^2} * \sum_{n=1}^N{q_i^2}\right)^\frac{1}{2}} * - * @param array $a 2-D array with x and y coordinate - * @param array $b 2-D array with x and y coordinate + * @param array $a 2-D array with x and y coordinate + * @param array $b 2-D array with x and y coordinate * * @return float * @@ -196,8 +196,8 @@ final class Metrics2D * * @latex d(p, q) = \sum_{n=1}^N{|p_i - q_i|} * - * @param array $a 2-D array with x and y coordinate - * @param array $b 2-D array with x and y coordinate + * @param array $a 2-D array with x and y coordinate + * @param array $b 2-D array with x and y coordinate * * @return int * @@ -226,8 +226,8 @@ final class Metrics2D * * In order to use this with objects the objects would have to implement some kind of value representation for comparison. * - * @param array $a Array with elements - * @param array $b Array with same elements but different order + * @param array $a Array with elements + * @param array $b Array with same elements but different order * * @return int * diff --git a/Math/Topology/MetricsND.php b/Math/Topology/MetricsND.php index 7f03af3f4..d5b32e962 100644 --- a/Math/Topology/MetricsND.php +++ b/Math/Topology/MetricsND.php @@ -42,8 +42,8 @@ final class MetricsND * * @latex d(p, q) = \sum_{n=1}^N{|p_i - q_i|} * - * @param array $a n-D array - * @param array $b n-D array + * @param array $a n-D array + * @param array $b n-D array * * @return float * @@ -68,8 +68,8 @@ final class MetricsND * * @latex d(p, q) = \sqrt{\sum_{n=1}^N{(p_i - q_i)^2}} * - * @param array $a n-D array - * @param array $b n-D array + * @param array $a n-D array + * @param array $b n-D array * * @return float * @@ -94,8 +94,8 @@ final class MetricsND * * @latex d(p, q) = \max_i{(|p_i - q_i|)} * - * @param array $a n-D array - * @param array $b n-D array + * @param array $a n-D array + * @param array $b n-D array * * @return float * @@ -120,8 +120,8 @@ final class MetricsND * * @latex d(p, q) = \sqrt[\lambda]{\sum_{n=1}^N{|p_i - q_i|^\lambda}} * - * @param array $a n-D array - * @param array $b n-D array + * @param array $a n-D array + * @param array $b n-D array * @param int $lambda Lambda * * @return float @@ -147,8 +147,8 @@ final class MetricsND * * @latex d(p, q) = \sum_{n=1}^N{\frac{|p_i - q_i|}{|p_i| + |q_i|} * - * @param array $a n-D array - * @param array $b n-D array + * @param array $a n-D array + * @param array $b n-D array * * @return float * @@ -173,8 +173,8 @@ final class MetricsND * * @latex d(p, q) = \frac{\sum_{n=1}^N{|p_i - q_i|}}{\sum_{n=1}^N{(p_i + q_i)}} * - * @param array $a n-D array - * @param array $b n-D array + * @param array $a n-D array + * @param array $b n-D array * * @return float * @@ -201,8 +201,8 @@ final class MetricsND * * @latex d(p, q) = \frac{\sum_{n=1}^N{p_i * q_i}}{\left(\sum_{n=1}^N{p_i^2} * \sum_{n=1}^N{q_i^2}\right)^\frac{1}{2}} * - * @param array $a n-D array - * @param array $b n-D array + * @param array $a n-D array + * @param array $b n-D array * * @return float * @@ -231,8 +231,8 @@ final class MetricsND * * @latex d(p, q) = \sum_{n=1}^N{|p_i - q_i|} * - * @param array $a n-D array - * @param array $b n-D array + * @param array $a n-D array + * @param array $b n-D array * * @return int * diff --git a/Module/ModuleAbstract.php b/Module/ModuleAbstract.php index d8808de64..3bd27784d 100644 --- a/Module/ModuleAbstract.php +++ b/Module/ModuleAbstract.php @@ -146,7 +146,7 @@ abstract class ModuleAbstract /** * Get modules this module is receiving from * - * @return array + * @return string[] * * @since 1.0.0 */ @@ -159,7 +159,7 @@ abstract class ModuleAbstract /** * Get modules this module is providing for * - * @return array + * @return string[] * * @since 1.0.0 */ diff --git a/Module/ModuleManager.php b/Module/ModuleManager.php index 2a20a49e3..8074c6e4e 100644 --- a/Module/ModuleManager.php +++ b/Module/ModuleManager.php @@ -50,7 +50,7 @@ final class ModuleManager * * This is important to inform other modules what kind of information they can receive from other modules. * - * @var array> + * @var array * @since 1.0.0 */ private array $providing = []; @@ -122,7 +122,7 @@ final class ModuleManager * * @param RequestAbstract $request Request * - * @return array + * @return string[] * * @since 1.0.0 */ @@ -818,7 +818,7 @@ final class ModuleManager * * @param Request $request Request * - * @return array + * @return string[] * * @since 1.0.0 */ diff --git a/Security/PhpCode.php b/Security/PhpCode.php index 494fe937e..52ded13c2 100644 --- a/Security/PhpCode.php +++ b/Security/PhpCode.php @@ -98,7 +98,7 @@ final class PhpCode /** * Check if function is disabled * - * @param array $functions Functions to check + * @param string[] $functions Functions to check * * @return bool Returns true if code has disabled function calls otherwise false is returned * diff --git a/Stdlib/Map/MultiMap.php b/Stdlib/Map/MultiMap.php index ffb10327a..a9265cda0 100644 --- a/Stdlib/Map/MultiMap.php +++ b/Stdlib/Map/MultiMap.php @@ -94,7 +94,7 @@ final class MultiMap implements \Countable // prevent adding elements if keys are just ordered differently if ($this->orderType === OrderType::LOOSE) { - /** @var array> $keysToTest */ + /** @var array $keysToTest */ $keysToTest = Permutation::permut($keys, [], false); foreach ($keysToTest as $test) { @@ -218,7 +218,7 @@ final class MultiMap implements \Countable { if (\is_array($key)) { if ($this->orderType === OrderType::LOOSE) { - /** @var array> $keys */ + /** @var array $keys */ $keys = Permutation::permut($key, [], false); foreach ($keys as $key => $value) { @@ -268,7 +268,7 @@ final class MultiMap implements \Countable private function setMultiple($key, $value) : bool { if ($this->orderType !== OrderType::STRICT) { - /** @var array> $permutation */ + /** @var array $permutation */ $permutation = Permutation::permut($key, [], false); foreach ($permutation as $permut) { diff --git a/System/File/Ftp/Directory.php b/System/File/Ftp/Directory.php index 86ea2b3ec..d8231ca52 100644 --- a/System/File/Ftp/Directory.php +++ b/System/File/Ftp/Directory.php @@ -74,7 +74,7 @@ class Directory extends FileAbstract implements FtpContainerInterface, Directory * @param string $path Path * @param string $filter Filter * - * @return array + * @return string[] * * @since 1.0.0 */ @@ -96,7 +96,7 @@ class Directory extends FileAbstract implements FtpContainerInterface, Directory } } - /** @var array $list */ + /** @var string[] $list */ return $list; } diff --git a/System/File/Ftp/FtpContainerInterface.php b/System/File/Ftp/FtpContainerInterface.php index 7631ba45d..a7b0b03c6 100644 --- a/System/File/Ftp/FtpContainerInterface.php +++ b/System/File/Ftp/FtpContainerInterface.php @@ -199,10 +199,10 @@ interface FtpContainerInterface /** * Count subresources. * - * @param resource $con FTP connection - * @param string $path Path of the resource - * @param bool $recursive Consider subdirectories - * @param array $ignore Files/paths to ignore (no regex) + * @param resource $con FTP connection + * @param string $path Path of the resource + * @param bool $recursive Consider subdirectories + * @param string[] $ignore Files/paths to ignore (no regex) * * @return int * diff --git a/System/File/Local/Directory.php b/System/File/Local/Directory.php index 1053b6f75..c62e933ce 100644 --- a/System/File/Local/Directory.php +++ b/System/File/Local/Directory.php @@ -71,7 +71,7 @@ final class Directory extends FileAbstract implements LocalContainerInterface, D * @param string $path Path * @param string $filter Filter * - * @return array + * @return string[] * * @since 1.0.0 */ @@ -95,7 +95,7 @@ final class Directory extends FileAbstract implements LocalContainerInterface, D $list[] = \str_replace('\\', '/', $iterator->getSubPathname()); } - /** @var array $list */ + /** @var string[] $list */ return $list; } @@ -198,9 +198,9 @@ final class Directory extends FileAbstract implements LocalContainerInterface, D * * A file will always return 1 as it doesn't have any sub-resources. * - * @param string $path Path of the resource - * @param bool $recursive Should count also sub-sub-resources - * @param array $ignore Ignore files + * @param string $path Path of the resource + * @param bool $recursive Should count also sub-sub-resources + * @param string[] $ignore Ignore files * * @return int * diff --git a/System/File/Local/LocalContainerInterface.php b/System/File/Local/LocalContainerInterface.php index 38b1505b7..3689e39c1 100644 --- a/System/File/Local/LocalContainerInterface.php +++ b/System/File/Local/LocalContainerInterface.php @@ -190,9 +190,9 @@ interface LocalContainerInterface /** * Count subresources. * - * @param string $path Path of the resource - * @param bool $recursive Consider subdirectories - * @param array $ignore Files/paths to ignore (no regex) + * @param string $path Path of the resource + * @param bool $recursive Consider subdirectories + * @param string[] $ignore Files/paths to ignore (no regex) * * @return int * diff --git a/System/File/StorageAbstract.php b/System/File/StorageAbstract.php index f14b1473a..cc96e31d3 100644 --- a/System/File/StorageAbstract.php +++ b/System/File/StorageAbstract.php @@ -243,9 +243,9 @@ abstract class StorageAbstract /** * Count subresources. * - * @param string $path Path of the resource - * @param bool $recursive Consider subdirectories - * @param array $ignore Files/paths to ignore (no regex) + * @param string $path Path of the resource + * @param bool $recursive Consider subdirectories + * @param string[] $ignore Files/paths to ignore (no regex) * * @return int * diff --git a/Uri/Http.php b/Uri/Http.php index 76e0e26dd..40e97d0e4 100644 --- a/Uri/Http.php +++ b/Uri/Http.php @@ -49,7 +49,7 @@ final class Http implements UriInterface /** * Path elements. * - * @var array + * @var string[] * @since 1.0.0 */ private array $pathElements; @@ -113,7 +113,7 @@ final class Http implements UriInterface /** * Uri query. * - * @var array + * @var array * @since 1.0.0 */ private array $query = []; diff --git a/Uri/UriInterface.php b/Uri/UriInterface.php index 98f9c1d3d..c5ca30ec4 100644 --- a/Uri/UriInterface.php +++ b/Uri/UriInterface.php @@ -155,7 +155,7 @@ interface UriInterface /** * Get path elements. * - * @return array + * @return string[] * * @since 1.0.0 */ @@ -175,7 +175,7 @@ interface UriInterface /** * Get query array. * - * @return array + * @return array * * @since 1.0.0 */ diff --git a/Utils/ArrayUtils.php b/Utils/ArrayUtils.php index 395ee9cae..314b0d476 100644 --- a/Utils/ArrayUtils.php +++ b/Utils/ArrayUtils.php @@ -260,8 +260,8 @@ final class ArrayUtils * * Useful for parsing command line parsing * - * @param string $id Id to find - * @param array $args CLI command list + * @param string $id Id to find + * @param string[] $args CLI command list * * @return string * @@ -279,8 +279,8 @@ final class ArrayUtils /** * Check if flag is set * - * @param string $id Id to find - * @param array $args CLI command list + * @param string $id Id to find + * @param string[] $args CLI command list * * @return int * @@ -389,7 +389,7 @@ final class ArrayUtils * @param array $values Values to square * @param float $exp Exponent * - * @return array + * @return float[] * * @todo Orange-Management/phpOMS#223 * In the ArrayUtils class the power* functions should be combined once union types become available. diff --git a/Utils/Git/Repository.php b/Utils/Git/Repository.php index 26255d2b4..620362aa8 100644 --- a/Utils/Git/Repository.php +++ b/Utils/Git/Repository.php @@ -137,7 +137,7 @@ class Repository /** * Get all branches. * - * @return array + * @return string[] * * @since 1.0.0 */ @@ -162,7 +162,7 @@ class Repository * * @param string $cmd Command to run * - * @return array + * @return string[] * * @throws \Exception * @@ -214,7 +214,7 @@ class Repository * * @param string $lines Result of git command * - * @return array + * @return string[] * * @since 1.0.0 */ @@ -466,7 +466,7 @@ class Repository /** * Get all remote branches. * - * @return array + * @return string[] * * @since 1.0.0 */ @@ -644,7 +644,7 @@ class Repository /** * Get LOC. * - * @param array $extensions Extensions whitelist + * @param string[] $extensions Extensions whitelist * * @return int * diff --git a/Utils/RnG/File.php b/Utils/RnG/File.php index 2fdac0425..2ca7955ed 100644 --- a/Utils/RnG/File.php +++ b/Utils/RnG/File.php @@ -47,7 +47,7 @@ class File /** * Get a random file extension. * - * @param array> $source Source array for possible extensions + * @param array $source Source array for possible extensions * * @return string * diff --git a/Utils/StringUtils.php b/Utils/StringUtils.php index e261687b6..1f816598c 100644 --- a/Utils/StringUtils.php +++ b/Utils/StringUtils.php @@ -51,8 +51,8 @@ final class StringUtils * * The validation is done case sensitive. * - * @param string $haystack Haystack - * @param array $needles Needles to check if any of them are part of the haystack + * @param string $haystack Haystack + * @param string[] $needles Needles to check if any of them are part of the haystack * * @example StringUtils::contains('This string', ['This', 'test']); // true * @@ -76,8 +76,8 @@ final class StringUtils * * The validation is done case sensitive. * - * @param string $haystack Haystack - * @param array $needles Needles to check if any of them are part of the haystack + * @param string $haystack Haystack + * @param string[] $needles Needles to check if any of them are part of the haystack * * @example StringUtils::mb_contains('This string', ['This', 'test']); // true * @@ -515,8 +515,8 @@ final class StringUtils /** * Create LCS diff masks * - * @param array $from From/old strings - * @param array $to To/new strings + * @param string[] $from From/old strings + * @param string[] $to To/new strings * * @return array *