From 77408fec20c0f3a74869756db665cd0cbebbe8e5 Mon Sep 17 00:00:00 2001 From: Andrea Marco Sartori Date: Sat, 3 Dec 2022 21:21:44 +1000 Subject: [PATCH] Improve types in docblocks --- src/JsonParser.php | 2 +- src/Lexer.php | 4 ++-- src/Parser.php | 2 +- src/Sources/AnySource.php | 2 +- src/Sources/CustomSource.php | 2 +- src/Sources/Endpoint.php | 2 +- src/Sources/Filename.php | 2 +- src/Sources/IterableSource.php | 2 +- src/Sources/Json.php | 2 +- src/Sources/LaravelClientResponse.php | 2 +- src/Sources/Psr7Message.php | 2 +- src/Sources/Psr7Stream.php | 2 +- src/Sources/Resource.php | 2 +- src/Sources/Source.php | 2 +- src/Tree.php | 8 ++++---- 15 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/JsonParser.php b/src/JsonParser.php index 89dc7f6..c2737ca 100644 --- a/src/JsonParser.php +++ b/src/JsonParser.php @@ -127,7 +127,7 @@ class JsonParser implements IteratorAggregate /** * Retrieve the lazily iterable JSON * - * @return Traversable + * @return Traversable */ public function getIterator(): Traversable { diff --git a/src/Lexer.php b/src/Lexer.php index 6f7a4ea..7caa3d9 100644 --- a/src/Lexer.php +++ b/src/Lexer.php @@ -57,7 +57,7 @@ class Lexer implements IteratorAggregate /** * Retrieve the JSON fragments * - * @return Generator + * @return Traversable */ public function getIterator(): Traversable { @@ -89,7 +89,7 @@ class Lexer implements IteratorAggregate * Yield the given character or buffer it * * @param string $character - * @return Generator + * @return Generator */ protected function yieldOrBufferCharacter(string $character): Generator { diff --git a/src/Parser.php b/src/Parser.php index f3a508f..db450a0 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -53,7 +53,7 @@ class Parser implements IteratorAggregate /** * Retrieve the JSON fragments * - * @return Traversable + * @return Traversable */ public function getIterator(): Traversable { diff --git a/src/Sources/AnySource.php b/src/Sources/AnySource.php index e1fdc4f..087d5fb 100644 --- a/src/Sources/AnySource.php +++ b/src/Sources/AnySource.php @@ -39,7 +39,7 @@ class AnySource extends Source /** * Retrieve the JSON fragments * - * @return Traversable + * @return Traversable * @throws SourceException */ public function getIterator(): Traversable diff --git a/src/Sources/CustomSource.php b/src/Sources/CustomSource.php index b49d21b..28ba042 100644 --- a/src/Sources/CustomSource.php +++ b/src/Sources/CustomSource.php @@ -13,7 +13,7 @@ class CustomSource extends Source /** * Retrieve the JSON fragments * - * @return Traversable + * @return Traversable */ public function getIterator(): Traversable { diff --git a/src/Sources/Endpoint.php b/src/Sources/Endpoint.php index b3bde0d..2a5ff93 100644 --- a/src/Sources/Endpoint.php +++ b/src/Sources/Endpoint.php @@ -26,7 +26,7 @@ class Endpoint extends Source /** * Retrieve the JSON fragments * - * @return Traversable + * @return Traversable */ public function getIterator(): Traversable { diff --git a/src/Sources/Filename.php b/src/Sources/Filename.php index 38f37f5..c6a517c 100644 --- a/src/Sources/Filename.php +++ b/src/Sources/Filename.php @@ -13,7 +13,7 @@ class Filename extends Source /** * Retrieve the JSON fragments * - * @return Traversable + * @return Traversable */ public function getIterator(): Traversable { diff --git a/src/Sources/IterableSource.php b/src/Sources/IterableSource.php index c3abe85..0f6ab22 100644 --- a/src/Sources/IterableSource.php +++ b/src/Sources/IterableSource.php @@ -13,7 +13,7 @@ class IterableSource extends Source /** * Retrieve the JSON fragments * - * @return Traversable + * @return Traversable */ public function getIterator(): Traversable { diff --git a/src/Sources/Json.php b/src/Sources/Json.php index 670f665..d6745b3 100644 --- a/src/Sources/Json.php +++ b/src/Sources/Json.php @@ -16,7 +16,7 @@ class Json extends Source /** * Retrieve the JSON fragments * - * @return Traversable + * @return Traversable */ public function getIterator(): Traversable { diff --git a/src/Sources/LaravelClientResponse.php b/src/Sources/LaravelClientResponse.php index da257aa..b03a60d 100644 --- a/src/Sources/LaravelClientResponse.php +++ b/src/Sources/LaravelClientResponse.php @@ -14,7 +14,7 @@ class LaravelClientResponse extends Source /** * Retrieve the JSON fragments * - * @return Traversable + * @return Traversable */ public function getIterator(): Traversable { diff --git a/src/Sources/Psr7Message.php b/src/Sources/Psr7Message.php index 9d0584d..46e5d6f 100644 --- a/src/Sources/Psr7Message.php +++ b/src/Sources/Psr7Message.php @@ -14,7 +14,7 @@ class Psr7Message extends Source /** * Retrieve the JSON fragments * - * @return Traversable + * @return Traversable */ public function getIterator(): Traversable { diff --git a/src/Sources/Psr7Stream.php b/src/Sources/Psr7Stream.php index 8117d62..54eca4c 100644 --- a/src/Sources/Psr7Stream.php +++ b/src/Sources/Psr7Stream.php @@ -14,7 +14,7 @@ class Psr7Stream extends Source /** * Retrieve the JSON fragments * - * @return Traversable + * @return Traversable */ public function getIterator(): Traversable { diff --git a/src/Sources/Resource.php b/src/Sources/Resource.php index 3af5171..5a2b77d 100644 --- a/src/Sources/Resource.php +++ b/src/Sources/Resource.php @@ -13,7 +13,7 @@ class Resource extends Source /** * Retrieve the JSON fragments * - * @return Traversable + * @return Traversable */ public function getIterator(): Traversable { diff --git a/src/Sources/Source.php b/src/Sources/Source.php index b2ae0de..362043a 100644 --- a/src/Sources/Source.php +++ b/src/Sources/Source.php @@ -22,7 +22,7 @@ abstract class Source implements IteratorAggregate /** * Retrieve the JSON fragments * - * @return Traversable + * @return Traversable */ abstract public function getIterator(): Traversable; diff --git a/src/Tree.php b/src/Tree.php index 39204f5..115da32 100644 --- a/src/Tree.php +++ b/src/Tree.php @@ -13,14 +13,14 @@ class Tree /** * The original JSON tree. * - * @var array + * @var array */ protected array $original = []; /** * The wildcarded JSON tree. * - * @var array + * @var array */ protected array $wildcarded = []; @@ -34,7 +34,7 @@ class Tree /** * Retrieve the original JSON tree * - * @return array + * @return array */ public function original(): array { @@ -44,7 +44,7 @@ class Tree /** * Retrieve the wildcarded JSON tree * - * @return array + * @return array */ public function wildcarded(): array {