Skip to content

Commit af83f9f

Browse files
committed
CS Fixer
1 parent 6b88994 commit af83f9f

File tree

12 files changed

+21
-22
lines changed

12 files changed

+21
-22
lines changed

src/Capability/Attribute/McpPrompt.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ final class McpPrompt
2424
* @param ?string $name overrides the prompt name (defaults to method name)
2525
* @param ?string $description Optional description of the prompt. Defaults to method DocBlock summary.
2626
* @param ?array $_meta Optional metadata
27-
*/
27+
*/
2828
public function __construct(
2929
public ?string $name = null,
3030
public ?string $description = null,
31-
public ?array $_meta = null
31+
public ?array $_meta = null,
3232
) {
3333
}
3434
}

src/Capability/Attribute/McpResource.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,14 @@ final class McpResource
3131
* @param Annotations|null $annotations optional annotations describing the resource
3232
* @param ?array $_meta optional metadata
3333
*/
34-
3534
public function __construct(
3635
public string $uri,
3736
public ?string $name = null,
3837
public ?string $description = null,
3938
public ?string $mimeType = null,
4039
public ?int $size = null,
4140
public ?Annotations $annotations = null,
42-
public ?array $_meta = null
41+
public ?array $_meta = null,
4342
) {
4443
}
4544
}

src/Capability/Attribute/McpResourceTemplate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ final class McpResourceTemplate
2828
* @param ?string $description Optional description. Defaults to class DocBlock summary.
2929
* @param ?string $mimeType optional default MIME type for matching resources
3030
* @param ?Annotations $annotations optional annotations describing the resource template
31-
* @param ?array $_meta optional metadata
31+
* @param ?array $_meta optional metadata
3232
*/
3333
public function __construct(
3434
public string $uriTemplate,
3535
public ?string $name = null,
3636
public ?string $description = null,
3737
public ?string $mimeType = null,
3838
public ?Annotations $annotations = null,
39-
public ?array $_meta = null
39+
public ?array $_meta = null,
4040
) {
4141
}
4242
}

src/Capability/Attribute/McpTool.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class McpTool
2323
* @param string|null $name The name of the tool (defaults to the method name)
2424
* @param string|null $description The description of the tool (defaults to the DocBlock/inferred)
2525
* @param ToolAnnotations|null $annotations Optional annotations describing tool behavior
26-
* @param ?array $_meta Optional metadata
26+
* @param ?array $_meta Optional metadata
2727
*/
2828
public function __construct(
2929
public ?string $name = null,

src/Capability/Registry/ResourceReference.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function formatResult(mixed $readResult, string $uri, ?string $mimeType =
162162
try {
163163
$jsonString = json_encode($readResult, \JSON_THROW_ON_ERROR | \JSON_PRETTY_PRINT);
164164

165-
return [new TextResourceContents($uri, $mimeType, $jsonString, $_meta)];
165+
return [new TextResourceContents($uri, $mimeType, $jsonString, $_meta)];
166166
} catch (\JsonException $e) {
167167
throw new RuntimeException(\sprintf('Failed to encode array as JSON for URI "%s": %s', $uri, $e->getMessage()));
168168
}
@@ -172,7 +172,7 @@ public function formatResult(mixed $readResult, string $uri, ?string $mimeType =
172172
$jsonString = json_encode($readResult, \JSON_THROW_ON_ERROR | \JSON_PRETTY_PRINT);
173173
$mimeType = $mimeType ?? 'application/json';
174174

175-
return [new TextResourceContents($uri, $mimeType, $jsonString, $_meta)];
175+
return [new TextResourceContents($uri, $mimeType, $jsonString, $_meta)];
176176
} catch (\JsonException $e) {
177177
throw new RuntimeException(\sprintf('Failed to encode array as JSON for URI "%s": %s', $uri, $e->getMessage()));
178178
}

src/Schema/Content/BlobResourceContents.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(
3636
string $uri,
3737
?string $mimeType,
3838
public readonly string $blob,
39-
?array $_meta
39+
?array $_meta,
4040
) {
4141
parent::__construct($uri, $mimeType, $_meta);
4242
}

src/Schema/Content/ResourceContents.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ abstract class ResourceContents implements \JsonSerializable
2727
* @param string $uri the URI of the resource or sub-resource
2828
* @param string|null $mimeType the MIME type of the resource or sub-resource
2929
* @param ?array $_meta Optional metadata
30-
*/
30+
*/
3131
public function __construct(
3232
public readonly string $uri,
3333
public readonly ?string $mimeType = null,

src/Schema/Content/TextResourceContents.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ class TextResourceContents extends ResourceContents
3131
* @param string|null $mimeType the MIME type of the resource or sub-resource
3232
* @param string $text The text of the item. This must only be set if the item can actually be represented as text (not binary data).
3333
* @param ?array $_meta Optional metadata
34-
*/
34+
*/
3535
public function __construct(
3636
string $uri,
3737
?string $mimeType,
3838
public readonly string $text,
39-
?array $_meta
39+
?array $_meta,
4040
) {
4141
parent::__construct($uri, $mimeType, $_meta);
4242
}

src/Schema/Prompt.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ class Prompt implements \JsonSerializable
3333
* @param string|null $description an optional description of what this prompt provides
3434
* @param PromptArgument[]|null $arguments A list of arguments for templating. Null if not a template.
3535
* @param array|null $_meta optional for additional metadata
36-
*/
36+
*/
3737
public function __construct(
3838
public readonly string $name,
3939
public readonly ?string $description = null,
4040
public readonly ?array $arguments = null,
41-
public readonly ?array $_meta = null
41+
public readonly ?array $_meta = null,
4242
) {
4343
if (null !== $this->arguments) {
4444
foreach ($this->arguments as $arg) {
@@ -66,7 +66,7 @@ public static function fromArray(array $data): self
6666
name: $data['name'],
6767
description: $data['description'] ?? null,
6868
arguments: $arguments,
69-
_meta: isset($data['_meta']) ? (int) $data['_meta'] : null
69+
_meta: isset($data['_meta']) ? (int) $data['_meta'] : null
7070
);
7171
}
7272

src/Schema/Resource.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class Resource implements \JsonSerializable
5151
* @param int|null $size The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.
5252
* @param array|null $_meta optional for additional metadata
5353
*
54-
* This can be used by Hosts to display file sizes and estimate context window usage.
54+
* This can be used by Hosts to display file sizes and estimate context window usage
5555
*/
5656
public function __construct(
5757
public readonly string $uri,
@@ -60,7 +60,7 @@ public function __construct(
6060
public readonly ?string $mimeType = null,
6161
public readonly ?Annotations $annotations = null,
6262
public readonly ?int $size = null,
63-
public readonly ?array $_meta = null
63+
public readonly ?array $_meta = null,
6464
) {
6565
if (!preg_match(self::RESOURCE_NAME_PATTERN, $name)) {
6666
throw new InvalidArgumentException('Invalid resource name: must contain only alphanumeric characters, underscores, and hyphens.');

0 commit comments

Comments
 (0)