Skip to content

Commit d2694af

Browse files
Naorayclaude
andcommitted
fix: correct return type of ResourceCollection::withResponse()
The method creates `new static()` so the real return type is `static`, not `self`. Use a @return static docblock to satisfy PHPStan while keeping `self` in the type hint for PHP 7.4 compatibility. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b025b72 commit d2694af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Resources/ResourceCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function setItems(array $items): self
2929
}
3030

3131
/**
32-
* @return $this
32+
* @return static
3333
*/
3434
public static function withResponse(Response $response, Connector $connector, $items = [], ?\stdClass $_links = null): self
3535
{

0 commit comments

Comments
 (0)