Skip to content

Commit 049aa14

Browse files
committed
Run lint with newest Pint release
1 parent 614d9c9 commit 049aa14

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/OpenAI.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ final class OpenAI
1010
/**
1111
* Creates a new Open AI Client with the given API token.
1212
*/
13-
public static function client(string $apiKey, string $organization = null): Client
13+
public static function client(string $apiKey, ?string $organization = null): Client
1414
{
1515
return self::factory()
1616
->withApiKey($apiKey)

src/Responses/Audio/SpeechStreamResponse.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function meta(): MetaInformation
3636
return MetaInformation::from($this->response->getHeaders());
3737
}
3838

39-
public static function fake(string $content = null, MetaInformation $meta = null): static
39+
public static function fake(?string $content = null, ?MetaInformation $meta = null): static
4040
{
4141
$psr17Factory = new Psr17Factory();
4242
$response = $psr17Factory->createResponse()

src/Testing/ClientFake.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function addResponses(array $responses): void
4545
$this->responses = [...$this->responses, ...$responses];
4646
}
4747

48-
public function assertSent(string $resource, callable|int $callback = null): void
48+
public function assertSent(string $resource, callable|int|null $callback = null): void
4949
{
5050
if (is_int($callback)) {
5151
$this->assertSentTimes($resource, $callback);
@@ -72,7 +72,7 @@ private function assertSentTimes(string $resource, int $times = 1): void
7272
/**
7373
* @return mixed[]
7474
*/
75-
private function sent(string $resource, callable $callback = null): array
75+
private function sent(string $resource, ?callable $callback = null): array
7676
{
7777
if (! $this->hasSent($resource)) {
7878
return [];
@@ -88,7 +88,7 @@ private function hasSent(string $resource): bool
8888
return $this->resourcesOf($resource) !== [];
8989
}
9090

91-
public function assertNotSent(string $resource, callable $callback = null): void
91+
public function assertNotSent(string $resource, ?callable $callback = null): void
9292
{
9393
PHPUnit::assertCount(
9494
0, $this->sent($resource, $callback),

src/Testing/Resources/Concerns/Testable.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ protected function record(string $method, array $args = []): ResponseContract|Re
2323
return $this->fake->record(new TestRequest($this->resource(), $method, $args));
2424
}
2525

26-
public function assertSent(callable|int $callback = null): void
26+
public function assertSent(callable|int|null $callback = null): void
2727
{
2828
$this->fake->assertSent($this->resource(), $callback);
2929
}
3030

31-
public function assertNotSent(callable|int $callback = null): void
31+
public function assertNotSent(callable|int|null $callback = null): void
3232
{
3333
$this->fake->assertNotSent($this->resource(), $callback);
3434
}

src/Testing/Responses/Concerns/Fakeable.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ trait Fakeable
1111
/**
1212
* @param array<string, mixed> $override
1313
*/
14-
public static function fake(array $override = [], MetaInformation $meta = null): static
14+
public static function fake(array $override = [], ?MetaInformation $meta = null): static
1515
{
1616
$class = str_replace('Responses\\', 'Testing\\Responses\\Fixtures\\', static::class).'Fixture';
1717

0 commit comments

Comments
 (0)