Skip to content

Commit

Permalink
Merge pull request #1 from phpro/improve-typedocs
Browse files Browse the repository at this point in the history
Improve type docblocks
  • Loading branch information
veewee authored Oct 21, 2024
2 parents b7ef74d + 48be39e commit 6519acb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/ResourceStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function unwrap(): mixed
*
* @throws RuntimeException
*
* @return self
* @return self<resource>
*/
public function apply(\Closure $closure): self
{
Expand Down Expand Up @@ -105,6 +105,8 @@ public function uri(): ?string

/**
* @throws RuntimeException
*
* @return self<resource>
*/
public function rewind(): self
{
Expand All @@ -122,6 +124,8 @@ public function rewind(): self
* @param ResourceStream<resource> $targetStream
*
* @throws RuntimeException
*
* @return ResourceStream<resource>
*/
public function copyTo(ResourceStream $targetStream, ?int $length = null, int $offset = 0): ResourceStream
{
Expand All @@ -140,6 +144,8 @@ public function copyTo(ResourceStream $targetStream, ?int $length = null, int $o
* @param ResourceStream<resource> $sourceStream
*
* @throws RuntimeException
*
* @return self<resource>
*/
public function copyFrom(ResourceStream $sourceStream, ?int $length = null, int $offset = 0): self
{
Expand Down Expand Up @@ -246,6 +252,8 @@ public function readBatches(int $length = self::DEFAULT_BUFFER_SIZE): \Generator

/**
* @throws RuntimeException
*
* @return self<resource>
*/
public function write(string $data): self
{
Expand Down

0 comments on commit 6519acb

Please sign in to comment.