diff --git a/src/FileChunks.php b/src/FileChunks.php index 26d170f..3085a1a 100644 --- a/src/FileChunks.php +++ b/src/FileChunks.php @@ -24,6 +24,8 @@ public function __construct($fileName, $chunkSize = 1024 * 8) /** * @return \Generator + * + * @throws Exception\InvalidArgumentException */ #[\ReturnTypeWillChange] public function getIterator() diff --git a/src/Items.php b/src/Items.php index 1dfb958..03568b0 100644 --- a/src/Items.php +++ b/src/Items.php @@ -117,6 +117,8 @@ public static function fromIterable($iterable, array $options = []) /** * @return \Generator + * + * @throws Exception\PathNotFoundException */ #[\ReturnTypeWillChange] public function getIterator() @@ -124,6 +126,9 @@ public function getIterator() return $this->parser->getIterator(); } + /** + * @throws Exception\JsonMachineException + */ public function getPosition() { return $this->parser->getPosition(); @@ -134,11 +139,17 @@ public function getJsonPointers(): array return $this->parser->getJsonPointers(); } + /** + * @throws Exception\JsonMachineException + */ public function getCurrentJsonPointer(): string { return $this->parser->getCurrentJsonPointer(); } + /** + * @throws Exception\JsonMachineException + */ public function getMatchedJsonPointer(): string { return $this->parser->getMatchedJsonPointer(); diff --git a/src/ItemsOptions.php b/src/ItemsOptions.php index 0e528b9..e0b9d68 100644 --- a/src/ItemsOptions.php +++ b/src/ItemsOptions.php @@ -12,6 +12,9 @@ class ItemsOptions extends \ArrayObject { private $options = []; + /** + * @throws InvalidArgumentException + */ public function __construct(array $options = []) { $this->validateOptions($options); diff --git a/src/Parser.php b/src/Parser.php index 8a18265..c4a6b55 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -321,6 +321,9 @@ public function getJsonPointers(): array return array_values($this->jsonPointers); } + /** + * @throws JsonMachineException + */ public function getCurrentJsonPointer(): string { if ($this->currentPath === null) { @@ -330,6 +333,9 @@ public function getCurrentJsonPointer(): string return self::pathToJsonPointer($this->currentPath); } + /** + * @throws JsonMachineException + */ public function getMatchedJsonPointer(): string { if ($this->matchedJsonPointer === null) { diff --git a/src/StreamChunks.php b/src/StreamChunks.php index d6c6e72..da8502e 100644 --- a/src/StreamChunks.php +++ b/src/StreamChunks.php @@ -17,6 +17,8 @@ class StreamChunks implements \IteratorAggregate /** * @param resource $stream * @param int $chunkSize + * + * @throws InvalidArgumentException */ public function __construct($stream, $chunkSize = 1024 * 8) {