style: apply php-cs-fixer and PHPStan fixes (#289)
* style: apply php-cs-fixer to test files Addresses drift flagged by the default PHP-CS-Fixer config — mostly adds missing `: void` return types on pre-existing test methods. No behavioural changes. * fix: resolve phpstan errors surfaced by qa - Drop the obsolete `Method ::test*() has no return type specified` ignore rule — every test method now declares a return type, so the pattern never matches and phpstan reports it as unmatched. - Remove `?? []` from two reads of `CallToolRequest::$arguments`; the property is typed `array` (non-nullable), so the coalesce is a no-op that phpstan flags. --------- Co-authored-by: DDEV User <nobody@example.com>
This commit is contained in:
parent
7af5a345c1
commit
73e4cc2456
1 changed files with 98 additions and 100 deletions
|
|
@ -20,7 +20,7 @@ use PHPUnit\Framework\TestCase;
|
|||
|
||||
final class CreateSamplingMessageRequestTest extends TestCase
|
||||
{
|
||||
public function testConstructorWithValidSetOfMessages()
|
||||
public function testConstructorWithValidSetOfMessages(): void
|
||||
{
|
||||
$messages = [
|
||||
new SamplingMessage(Role::User, new TextContent('My name is George.')),
|
||||
|
|
@ -34,7 +34,7 @@ final class CreateSamplingMessageRequestTest extends TestCase
|
|||
$this->assertSame(150, $request->maxTokens);
|
||||
}
|
||||
|
||||
public function testConstructorWithInvalidSetOfMessages()
|
||||
public function testConstructorWithInvalidSetOfMessages(): void
|
||||
{
|
||||
$this->expectException(InvalidArgumentException::class);
|
||||
$this->expectExceptionMessage('Messages must be instance of SamplingMessage.');
|
||||
|
|
|
|||
Loading…
Reference in a new issue