diff --git a/DataStorage/Cache/FileCache.php b/DataStorage/Cache/FileCache.php index 22c49d8e9..a2f20d6ae 100644 --- a/DataStorage/Cache/FileCache.php +++ b/DataStorage/Cache/FileCache.php @@ -300,6 +300,17 @@ class FileCache implements CacheInterface return $this->parseValue($type, $raw, $expireEnd); } + /** + * Parse cached value + * + * @param int $type Cached value type + * @param string $raw Cached value + * @param int $expireEnd Value end position + * + * @return mixed + * + * @since 1.0.0 + */ private function parseValue(int $type, string $raw, int $expireEnd) { $value = null; @@ -414,6 +425,15 @@ class FileCache implements CacheInterface return false; } + /** + * Get cache path + * + * @param mixed $key Key for cached value + * + * @return string Path to cache file + * + * @since 1.0.0 + */ private function getPath($key) : string { $path = File::sanitize($key, self::SANITIZE); diff --git a/DataStorage/Cache/MemCache.php b/DataStorage/Cache/MemCache.php index 29f028b59..8729530d1 100644 --- a/DataStorage/Cache/MemCache.php +++ b/DataStorage/Cache/MemCache.php @@ -165,6 +165,8 @@ class MemCache implements CacheInterface /** * Closing cache. * + * @return void + * * @since 1.0.0 */ public function close() diff --git a/DataStorage/Cookie/CookieJar.php b/DataStorage/Cookie/CookieJar.php index 729b50aed..2748ce2e8 100644 --- a/DataStorage/Cookie/CookieJar.php +++ b/DataStorage/Cookie/CookieJar.php @@ -56,6 +56,8 @@ class CookieJar /** * Lock * + * @return void + * * @since 1.0.0 */ public static function lock() /* : void */ diff --git a/Math/Optimization/TSP/CityPool.php b/Math/Optimization/TSP/CityPool.php index b01cfaafe..268f70ab1 100644 --- a/Math/Optimization/TSP/CityPool.php +++ b/Math/Optimization/TSP/CityPool.php @@ -49,9 +49,11 @@ class CityPool implements \Countable * * @param City $city City * + * @return void + * * @since 1.0.0 */ - public function addCity(City $city) + public function addCity(City $city) /* : void */ { $this->cities[$city->getName() . $city->getLatitude() . $city->getLongitude()] = $city; } diff --git a/Math/Optimization/TSP/Population.php b/Math/Optimization/TSP/Population.php index 95f476188..98e05fadf 100644 --- a/Math/Optimization/TSP/Population.php +++ b/Math/Optimization/TSP/Population.php @@ -56,9 +56,11 @@ class Population implements \Countable * @param int $index Position to insert at * @param Tour $tour Tour to insert * + * @return void + * * @since 1.0.0 */ - public function insertAt(int $index, Tour $tour) + public function insertAt(int $index, Tour $tour) /* : void */ { $this->tours = array_slice($this->tours, 0, $index) + [$tour] + array_slice($this->tours, $index); } @@ -69,6 +71,8 @@ class Population implements \Countable * @param int $index Position to set/replace * @param Tour $tour Tour to set * + * @return void + * * @since 1.0.0 */ public function set(int $index, Tour $tour) /* : void */ @@ -82,9 +86,11 @@ class Population implements \Countable * * @param Tour $tour Tour to add * + * @return void + * * @since 1.0.0 */ - public function add(Tour $tour) + public function add(Tour $tour) /* : void */ { $this->tours[] = $tour; } diff --git a/Math/Optimization/TSP/Tour.php b/Math/Optimization/TSP/Tour.php index 71468706f..dd4833633 100644 --- a/Math/Optimization/TSP/Tour.php +++ b/Math/Optimization/TSP/Tour.php @@ -135,9 +135,11 @@ class Tour implements \Countable * * @param City $city City * + * @return void + * * @since 1.0.0 */ - public function addCity(City $city) + public function addCity(City $city) /* : void */ { $this->cities[] = $city; @@ -151,6 +153,8 @@ class Tour implements \Countable * @param int $index Index to set/replace * @param City $city City * + * @return void + * * @since 1.0.0 */ public function setCity(int $index, City $city) /* : void */ diff --git a/Math/Stochastic/Distribution/CauchyDistribution.php b/Math/Stochastic/Distribution/CauchyDistribution.php index ef4acd680..36320b59e 100644 --- a/Math/Stochastic/Distribution/CauchyDistribution.php +++ b/Math/Stochastic/Distribution/CauchyDistribution.php @@ -27,9 +27,9 @@ class CauchyDistribution /** * Get probability density function. * - * @param float $x - * @param float $x0 - * @param float $gamma + * @param float $x Value x + * @param float $x0 Value x0 + * @param float $gamma Gamma * * @return float * @@ -43,9 +43,9 @@ class CauchyDistribution /** * Get cumulative distribution function. * - * @param float $x - * @param float $x0 - * @param float $gamma + * @param float $x Value x + * @param float $x0 Value x0 + * @param float $gamma Gamma * * @return float * @@ -59,7 +59,7 @@ class CauchyDistribution /** * Get mode. * - * @param float $x0 + * @param float $x0 Value x0 * * @return float * @@ -73,7 +73,7 @@ class CauchyDistribution /** * Get expected value. * - * @param float $x0 + * @param float $x0 Value x0 * * @return float * diff --git a/Math/Stochastic/Distribution/ChiSquaredDistribution.php b/Math/Stochastic/Distribution/ChiSquaredDistribution.php index 35435eff9..81989b602 100644 --- a/Math/Stochastic/Distribution/ChiSquaredDistribution.php +++ b/Math/Stochastic/Distribution/ChiSquaredDistribution.php @@ -142,7 +142,7 @@ class ChiSquaredDistribution /** * Get probability density function. * - * @param float $x + * @param float $x Value x * @param int $df Degreegs of freedom * * @return float @@ -220,7 +220,7 @@ class ChiSquaredDistribution * Get moment generating function. * * @param int $df Degrees of freedom - * @param float $t + * @param float $t Value t * * @return float * @@ -240,7 +240,7 @@ class ChiSquaredDistribution /** * Get skewness. * - * @param int $df + * @param int $df Degrees of freedom * * @return float * @@ -254,7 +254,7 @@ class ChiSquaredDistribution /** * Get Ex. kurtosis. * - * @param int $df + * @param int $df Degrees of freedom * * @return float * diff --git a/Message/Mail/Nntp.php b/Message/Mail/Nntp.php index f85887d2c..5dbe2eecf 100644 --- a/Message/Mail/Nntp.php +++ b/Message/Mail/Nntp.php @@ -51,7 +51,7 @@ class Nntp extends EmailAbstract */ public function connect(string $user = '', string $pass = '') /* : void */ { - $this->mailbox = '{' . $this->host . ':' . $this->port . '/nntp' . '}'; + $this->mailbox = '{' . $this->host . ':' . $this->port . '/nntp}'; parent::connect(); } } diff --git a/Message/Mail/Pop3.php b/Message/Mail/Pop3.php index fddea37cb..767524e0d 100644 --- a/Message/Mail/Pop3.php +++ b/Message/Mail/Pop3.php @@ -51,7 +51,7 @@ class Pop3 extends EmailAbstract */ public function connect(string $user = '', string $pass = '') /* : void */ { - $this->mailbox = '{' . $this->host . ':' . $this->port . '/pop3' . '}'; + $this->mailbox = '{' . $this->host . ':' . $this->port . '/pop3}'; parent::connect(); } } diff --git a/Socket/Packets/PacketAbstract.php b/Socket/Packets/PacketAbstract.php index eb456fa40..abc90ae27 100644 --- a/Socket/Packets/PacketAbstract.php +++ b/Socket/Packets/PacketAbstract.php @@ -40,6 +40,8 @@ abstract class PacketAbstract implements \Serializable * * This is using a json format * + * @return string + * * @since 1.0.0 */ abstract public function __toString(); diff --git a/Stdlib/Graph/BinaryTree.php b/Stdlib/Graph/BinaryTree.php index d96bc854e..7284f2165 100644 --- a/Stdlib/Graph/BinaryTree.php +++ b/Stdlib/Graph/BinaryTree.php @@ -170,9 +170,11 @@ class BinaryTree extends Tree * @param Node $node Tree node * @param \Closure $callback Task to perform on node * + * @return void + * * @since 1.0.0 */ - public function verticalOrder(Node $node, \Closure $callback) + public function verticalOrder(Node $node, \Closure $callback) /* : void */ { $order = []; $this->getVerticalOrder($node, 0, $order); diff --git a/Stdlib/Graph/Tree.php b/Stdlib/Graph/Tree.php index a3cb23b6f..b874c0f87 100644 --- a/Stdlib/Graph/Tree.php +++ b/Stdlib/Graph/Tree.php @@ -210,9 +210,11 @@ class Tree extends Graph * @param Node $node Tree node * @param \Closure $callback Task to perform on node * + * @return void + * * @since 1.0.0 */ - public function preOrder(Node $node, \Closure $callback) + public function preOrder(Node $node, \Closure $callback) /* : void */ { if (count($this->nodes) === 0) { return; @@ -233,9 +235,11 @@ class Tree extends Graph * @param Node $node Tree node * @param \Closure $callback Task to perform on node * + * @return void + * * @since 1.0.0 */ - public function postOrder(Node $node, \Closure $callback) + public function postOrder(Node $node, \Closure $callback) /* : void */ { if (count($this->nodes) === 0) { return; diff --git a/Stdlib/Queue/PriorityQueue.php b/Stdlib/Queue/PriorityQueue.php index 4430246dd..52f3e8a0d 100644 --- a/Stdlib/Queue/PriorityQueue.php +++ b/Stdlib/Queue/PriorityQueue.php @@ -133,6 +133,8 @@ class PriorityQueue implements \Countable, \Serializable /** * Delete last element. * + * @return mixed + * * @since 1.0.0 */ public function remove() @@ -190,6 +192,8 @@ class PriorityQueue implements \Countable, \Serializable * * @param string $data Data to unserialze * + * @return void + * * @since 1.0.0 */ public function unserialize($data) diff --git a/Utils/IO/Csv/CsvInterface.php b/Utils/IO/Csv/CsvInterface.php index cd254623a..3f1aee9cf 100644 --- a/Utils/IO/Csv/CsvInterface.php +++ b/Utils/IO/Csv/CsvInterface.php @@ -43,9 +43,11 @@ namespace phpOMS\Utils\IO\Csv { * * @param string $path Path to import * + * @return void + * * @since 1.0.0 * @author Dennis Eichhorn */ - public function importCsv($path); + public function importCsv($path); /* : void */ } }