Skip to content

Commit 6972f02

Browse files
fix: phpstan errors
1 parent 65d598c commit 6972f02

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Schema/Result/ListResourcesResult.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@
1414
use Mcp\Exception\InvalidArgumentException;
1515
use Mcp\Schema\JsonRpc\Response;
1616
use Mcp\Schema\JsonRpc\ResultInterface;
17-
use Mcp\Schema\Resource;
17+
use Mcp\Schema\Resource as ResourceSchema;
1818

1919
/**
2020
* The server's response to a resources/list request from the client.
2121
*
22-
* @phpstan-import-type ResourceData from Resource
22+
* @phpstan-import-type ResourceData from ResourceSchema
2323
*
2424
* @author Kyrian Obikwelu <koshnawaza@gmail.com>
2525
*/
2626
class ListResourcesResult implements ResultInterface
2727
{
2828
/**
29-
* @param array<Resource> $resources the list of resource definitions
30-
* @param string|null $nextCursor An opaque token representing the pagination position after the last returned result.
29+
* @param array<ResourceSchema> $resources the list of resource definitions
30+
* @param string|null $nextCursor An opaque token representing the pagination position after the last returned result.
3131
*
3232
* If present, there may be more results available.
3333
*/
@@ -50,14 +50,14 @@ public static function fromArray(array $data): self
5050
}
5151

5252
return new self(
53-
array_map(fn (array $resource) => Resource::fromArray($resource), $data['resources']),
53+
array_map(fn (array $resource) => ResourceSchema::fromArray($resource), $data['resources']),
5454
$data['nextCursor'] ?? null
5555
);
5656
}
5757

5858
/**
5959
* @return array{
60-
* resources: array<Resource>,
60+
* resources: array<ResourceSchema>,
6161
* nextCursor?: string,
6262
* }
6363
*/

0 commit comments

Comments
 (0)