Skip to content

Commit 9115be2

Browse files
committed
fix pint errors
1 parent 49b6a57 commit 9115be2

File tree

9 files changed

+19
-26
lines changed

9 files changed

+19
-26
lines changed

phpstan.neon

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ parameters:
22
level: 9
33
paths:
44
- src
5-
checkMissingIterableValueType: false
5+
ignoreErrors:
6+
-
7+
identifier: missingType.iterableValue

src/Client.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ class Client implements ClientInterface
2222
public function __construct(
2323
protected readonly array $options = [],
2424
protected readonly array $headers = [],
25-
) {
26-
}
25+
) {}
2726

2827
/**
2928
* {@inheritDoc}

src/ClientFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class ClientFactory
1010
*/
1111
public static function create(): ClientInterface
1212
{
13-
return new Client();
13+
return new Client;
1414
}
1515

1616
/**

src/Exceptions/ClientException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@
55

66
use Exception;
77

8-
class ClientException extends Exception
9-
{
10-
}
8+
class ClientException extends Exception {}

src/Exceptions/ServerException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@
55

66
use Exception;
77

8-
class ServerException extends Exception
9-
{
10-
}
8+
class ServerException extends Exception {}

src/Request.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ public function __construct(
1616
protected HttpMethod $method,
1717
protected string $url,
1818
protected array $body = [],
19-
) {
20-
}
19+
) {}
2120

2221
/**
2322
* @return $this

src/Response.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ public function __construct(
2020
private readonly CookieJarInterface $cookies,
2121
private readonly int $statusCode,
2222
private readonly float $duration,
23-
) {
24-
}
23+
) {}
2524

2625
/**
2726
* {@inheritDoc}

tests/ClientTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
class ClientTest extends TestCase
1616
{
17-
public function testGetRequest(): void
17+
public function test_get_request(): void
1818
{
1919
Http::fake([
2020
'https://reqres.in/*' => Http::response('ok', 200),
@@ -28,7 +28,7 @@ public function testGetRequest(): void
2828
$this->assertEquals('ok', $response->body());
2929
}
3030

31-
public function testPostRequest(): void
31+
public function test_post_request(): void
3232
{
3333
$body = [
3434
'id' => 100,
@@ -47,7 +47,7 @@ public function testPostRequest(): void
4747
$this->assertEquals($body, $response->toArray());
4848
}
4949

50-
public function testPutRequest(): void
50+
public function test_put_request(): void
5151
{
5252
$body = [
5353
'name' => 'user name',
@@ -65,7 +65,7 @@ public function testPutRequest(): void
6565
$this->assertEquals($body, $response->toArray());
6666
}
6767

68-
public function testPatchRequest(): void
68+
public function test_patch_request(): void
6969
{
7070
$body = [
7171
'name' => 'user name',
@@ -83,7 +83,7 @@ public function testPatchRequest(): void
8383
$this->assertEquals($body, $response->toArray());
8484
}
8585

86-
public function testDeleteRequest(): void
86+
public function test_delete_request(): void
8787
{
8888
Http::fake([
8989
'https://reqres.in/*' => Http::response(null, 204),
@@ -96,7 +96,7 @@ public function testDeleteRequest(): void
9696
$this->assertEquals(204, $response->statusCode());
9797
}
9898

99-
public function testClientErrorResponses(): void
99+
public function test_client_error_responses(): void
100100
{
101101
Http::fake([
102102
'https://reqres.in/*' => Http::response([], 401),
@@ -115,7 +115,7 @@ public function testClientErrorResponses(): void
115115
$response->validate();
116116
}
117117

118-
public function testServerErrorResponses(): void
118+
public function test_server_error_responses(): void
119119
{
120120
Http::fake([
121121
'https://reqres.in/*' => Http::response([], 500),
@@ -134,7 +134,7 @@ public function testServerErrorResponses(): void
134134
$response->validate();
135135
}
136136

137-
public function testValidationErrorResponses(): void
137+
public function test_validation_error_responses(): void
138138
{
139139
Http::fake([
140140
'https://reqres.in/*' => Http::response(['errors' => ['username' => []]], 422),
@@ -153,7 +153,7 @@ public function testValidationErrorResponses(): void
153153
$response->validate();
154154
}
155155

156-
public function testUploadFile(): void
156+
public function test_upload_file(): void
157157
{
158158
Http::fake([
159159
'https://reqres.in/*' => Http::response([], 200),

tests/TestCase.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@
55

66
use Orchestra\Testbench\TestCase as Orchestra;
77

8-
abstract class TestCase extends Orchestra
9-
{
10-
}
8+
abstract class TestCase extends Orchestra {}

0 commit comments

Comments
 (0)