diff --git a/VERSION b/VERSION index 3335ccb..5a11be7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2311.91259 +0.2311.91312 diff --git a/src/Collections/ArrayIterator.php b/src/ArrayIterator.php similarity index 51% rename from src/Collections/ArrayIterator.php rename to src/ArrayIterator.php index dc15d58..3416d68 100644 --- a/src/Collections/ArrayIterator.php +++ b/src/ArrayIterator.php @@ -1,36 +1,63 @@ array = $array; } + /** + * Returns the current element. + * + * @return mixed Can return any type. + */ public function current(): mixed { return current($this->array); } + /** + * Returns the key of the current element. + * + * @return mixed Returns scalar on success, or null on failure. + */ public function key(): mixed { return key($this->array); } + /** + * Moves forward to next element. + */ public function next(): void { $this->wasValid = next($this->array) !== false; } + /** + * Rewind the Iterator to the first element. + */ public function rewind(): void { $this->wasValid = reset($this->array) !== false; } + /** + * Checks if current position is valid. + * + * @return bool Returns true on success or false on failure. + */ public function valid(): bool { return $this->wasValid; } diff --git a/src/Collections/IArrayable.php b/src/Collections/IArrayable.php deleted file mode 100644 index 1a9aa87..0000000 --- a/src/Collections/IArrayable.php +++ /dev/null @@ -1,10 +0,0 @@ -toArray(); $items = []; diff --git a/src/XNumber.php b/src/XNumber.php index 3ed7605..a8df0f7 100644 --- a/src/XNumber.php +++ b/src/XNumber.php @@ -1,11 +1,12 @@