Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Chain/Toolbox/Exception/ToolMetadataException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ final class ToolMetadataException extends InvalidArgumentException implements Ex
{
public static function invalidReference(mixed $reference): self
{
return new self(sprintf('The reference "%s" is not a valid as tool.', $reference));
return new self(sprintf('The reference "%s" is not a valid tool.', $reference));
}

public static function missingAttribute(string $className): self
Expand Down
2 changes: 1 addition & 1 deletion tests/Chain/Toolbox/MetadataFactory/ChainFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function setUp(): void
public function testGetMetadataNotExistingClass(): void
{
$this->expectException(ToolMetadataException::class);
$this->expectExceptionMessage('The reference "NoClass" is not a valid as tool.');
$this->expectExceptionMessage('The reference "NoClass" is not a valid tool.');

iterator_to_array($this->factory->getMetadata('NoClass'));
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Chain/Toolbox/MetadataFactory/MemoryFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ final class MemoryFactoryTest extends TestCase
public function getMetadataWithoutTools(): void
{
$this->expectException(ToolMetadataException::class);
$this->expectExceptionMessage('The reference "SomeClass" is not a valid as tool.');
$this->expectExceptionMessage('The reference "SomeClass" is not a valid tool.');

$factory = new MemoryFactory();
iterator_to_array($factory->getMetadata('SomeClass')); // @phpstan-ignore-line Yes, this class does not exist
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected function setUp(): void
public function invalidReferenceNonExistingClass(): void
{
$this->expectException(ToolMetadataException::class);
$this->expectExceptionMessage('The reference "invalid" is not a valid as tool.');
$this->expectExceptionMessage('The reference "invalid" is not a valid tool.');

iterator_to_array($this->factory->getMetadata('invalid')); // @phpstan-ignore-line Yes, this class does not exist
}
Expand Down