Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Commit 97d899c

Browse files
committed
feat: add non-empty-string type annotation for pattern
- FabricPromptInterface::getPattern() now returns non-empty-string - FabricPrompt constructor expects non-empty-string for pattern - Improves type safety and PHPStan analysis
1 parent f947d37 commit 97d899c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/Platform/Fabric/FabricPrompt.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
final readonly class FabricPrompt implements FabricPromptInterface
1111
{
1212
/**
13+
* @param non-empty-string $pattern
1314
* @param array<string, mixed> $metadata
1415
*/
1516
public function __construct(
@@ -19,6 +20,9 @@ public function __construct(
1920
) {
2021
}
2122

23+
/**
24+
* @return non-empty-string
25+
*/
2226
public function getPattern(): string
2327
{
2428
return $this->pattern;

src/Platform/Fabric/FabricPromptInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ interface FabricPromptInterface
1111
{
1212
/**
1313
* Get the pattern name (e.g., 'create_summary').
14+
*
15+
* @return non-empty-string
1416
*/
1517
public function getPattern(): string;
1618

0 commit comments

Comments
 (0)