mirror of
https://github.com/cerbero90/json-parser.git
synced 2025-01-17 04:58:15 +01:00
Improve types in docblocks
This commit is contained in:
parent
1eb1a56164
commit
77408fec20
@ -127,7 +127,7 @@ class JsonParser implements IteratorAggregate
|
||||
/**
|
||||
* Retrieve the lazily iterable JSON
|
||||
*
|
||||
* @return Traversable
|
||||
* @return Traversable<string|int, mixed>
|
||||
*/
|
||||
public function getIterator(): Traversable
|
||||
{
|
||||
|
@ -57,7 +57,7 @@ class Lexer implements IteratorAggregate
|
||||
/**
|
||||
* Retrieve the JSON fragments
|
||||
*
|
||||
* @return Generator<int, Token>
|
||||
* @return Traversable<int, Token>
|
||||
*/
|
||||
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<int, Token>
|
||||
*/
|
||||
protected function yieldOrBufferCharacter(string $character): Generator
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ class Parser implements IteratorAggregate
|
||||
/**
|
||||
* Retrieve the JSON fragments
|
||||
*
|
||||
* @return Traversable
|
||||
* @return Traversable<string|int, mixed>
|
||||
*/
|
||||
public function getIterator(): Traversable
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ class AnySource extends Source
|
||||
/**
|
||||
* Retrieve the JSON fragments
|
||||
*
|
||||
* @return Traversable
|
||||
* @return Traversable<int, string>
|
||||
* @throws SourceException
|
||||
*/
|
||||
public function getIterator(): Traversable
|
||||
|
@ -13,7 +13,7 @@ class CustomSource extends Source
|
||||
/**
|
||||
* Retrieve the JSON fragments
|
||||
*
|
||||
* @return Traversable
|
||||
* @return Traversable<int, string>
|
||||
*/
|
||||
public function getIterator(): Traversable
|
||||
{
|
||||
|
@ -26,7 +26,7 @@ class Endpoint extends Source
|
||||
/**
|
||||
* Retrieve the JSON fragments
|
||||
*
|
||||
* @return Traversable
|
||||
* @return Traversable<int, string>
|
||||
*/
|
||||
public function getIterator(): Traversable
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ class Filename extends Source
|
||||
/**
|
||||
* Retrieve the JSON fragments
|
||||
*
|
||||
* @return Traversable
|
||||
* @return Traversable<int, string>
|
||||
*/
|
||||
public function getIterator(): Traversable
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ class IterableSource extends Source
|
||||
/**
|
||||
* Retrieve the JSON fragments
|
||||
*
|
||||
* @return Traversable
|
||||
* @return Traversable<int, string>
|
||||
*/
|
||||
public function getIterator(): Traversable
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ class Json extends Source
|
||||
/**
|
||||
* Retrieve the JSON fragments
|
||||
*
|
||||
* @return Traversable
|
||||
* @return Traversable<int, string>
|
||||
*/
|
||||
public function getIterator(): Traversable
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ class LaravelClientResponse extends Source
|
||||
/**
|
||||
* Retrieve the JSON fragments
|
||||
*
|
||||
* @return Traversable
|
||||
* @return Traversable<int, string>
|
||||
*/
|
||||
public function getIterator(): Traversable
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ class Psr7Message extends Source
|
||||
/**
|
||||
* Retrieve the JSON fragments
|
||||
*
|
||||
* @return Traversable
|
||||
* @return Traversable<int, string>
|
||||
*/
|
||||
public function getIterator(): Traversable
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ class Psr7Stream extends Source
|
||||
/**
|
||||
* Retrieve the JSON fragments
|
||||
*
|
||||
* @return Traversable
|
||||
* @return Traversable<int, string>
|
||||
*/
|
||||
public function getIterator(): Traversable
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ class Resource extends Source
|
||||
/**
|
||||
* Retrieve the JSON fragments
|
||||
*
|
||||
* @return Traversable
|
||||
* @return Traversable<int, string>
|
||||
*/
|
||||
public function getIterator(): Traversable
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ abstract class Source implements IteratorAggregate
|
||||
/**
|
||||
* Retrieve the JSON fragments
|
||||
*
|
||||
* @return Traversable
|
||||
* @return Traversable<int, string>
|
||||
*/
|
||||
abstract public function getIterator(): Traversable;
|
||||
|
||||
|
@ -13,14 +13,14 @@ class Tree
|
||||
/**
|
||||
* The original JSON tree.
|
||||
*
|
||||
* @var array
|
||||
* @var array<int, string|int>
|
||||
*/
|
||||
protected array $original = [];
|
||||
|
||||
/**
|
||||
* The wildcarded JSON tree.
|
||||
*
|
||||
* @var array
|
||||
* @var array<int, string|int>
|
||||
*/
|
||||
protected array $wildcarded = [];
|
||||
|
||||
@ -34,7 +34,7 @@ class Tree
|
||||
/**
|
||||
* Retrieve the original JSON tree
|
||||
*
|
||||
* @return array
|
||||
* @return array<int, string|int>
|
||||
*/
|
||||
public function original(): array
|
||||
{
|
||||
@ -44,7 +44,7 @@ class Tree
|
||||
/**
|
||||
* Retrieve the wildcarded JSON tree
|
||||
*
|
||||
* @return array
|
||||
* @return array<int, string|int>
|
||||
*/
|
||||
public function wildcarded(): array
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user