Skip to content

Commit 5b7ed69

Browse files
author
Jeremiah VALERIE
committed
Fix PHP CS rule name
1 parent 5b10c26 commit 5b7ed69

File tree

17 files changed

+448
-448
lines changed

17 files changed

+448
-448
lines changed

.php_cs.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ return PhpCsFixer\Config::create()
1010
->setRules(
1111
[
1212
'@Symfony' => true,
13-
'@PHP71Migration' => true,
13+
'@PHP74Migration' => true,
1414
'@PHP74Migration:risky' => true,
1515
'ordered_imports' => ['imports_order' => ['class', 'function', 'const']],
1616
'general_phpdoc_annotation_remove' => ['author', 'category', 'copyright', 'created', 'license', 'package', 'since', 'subpackage', 'version'],

tests/Executor/Promise/Adapter/ReactPromiseAdapterTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ public function testWaitAsyncPromise(): void
4747
{
4848
$output = 'OK!';
4949
$process = new PhpProcess(<<<EOF
50-
<?php
51-
usleep(30);
52-
echo '$output';
53-
EOF
50+
<?php
51+
usleep(30);
52+
echo '$output';
53+
EOF
5454
);
5555
$result = new ExecutionResult(['output' => $output]);
5656

tests/Functional/Command/CompileCommandTest.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -66,29 +66,29 @@ public function testVerboseGeneration(): void
6666
private function displayExpected(bool $isVerbose = false): string
6767
{
6868
$display = <<<'OUTPUT'
69-
Types compilation starts
70-
Types compilation ends successfully
69+
Types compilation starts
70+
Types compilation ends successfully
7171

72-
OUTPUT;
72+
OUTPUT;
7373

7474
if ($isVerbose) {
7575
$display .= <<<'OUTPUT'
7676
77-
Summary
78-
=======
79-
80-
\-[\-]+\s+\-[\-]+\s
81-
class\s+path\s*
82-
\-[\-]+\s+\-[\-]+\s
83-
Overblog\\GraphQLBundle\\Connection\\__DEFINITIONS__\\QueryType {{PATH}}/QueryType\.php
84-
Overblog\\GraphQLBundle\\Connection\\__DEFINITIONS__\\UserType {{PATH}}/UserType\.php
85-
Overblog\\GraphQLBundle\\Connection\\__DEFINITIONS__\\friendConnectionType {{PATH}}/friendConnectionType\.php
86-
Overblog\\GraphQLBundle\\Connection\\__DEFINITIONS__\\userConnectionType {{PATH}}/userConnectionType\.php
87-
Overblog\\GraphQLBundle\\Connection\\__DEFINITIONS__\\PageInfoType {{PATH}}/PageInfoType\.php
88-
Overblog\\GraphQLBundle\\Connection\\__DEFINITIONS__\\friendEdgeType {{PATH}}/friendEdgeType\.php
89-
Overblog\\GraphQLBundle\\Connection\\__DEFINITIONS__\\userEdgeType {{PATH}}/userEdgeType\.php
90-
\-[\-]+\s+\-[\-]+\s
91-
OUTPUT;
77+
Summary
78+
=======
79+
80+
\-[\-]+\s+\-[\-]+\s
81+
class\s+path\s*
82+
\-[\-]+\s+\-[\-]+\s
83+
Overblog\\GraphQLBundle\\Connection\\__DEFINITIONS__\\QueryType {{PATH}}/QueryType\.php
84+
Overblog\\GraphQLBundle\\Connection\\__DEFINITIONS__\\UserType {{PATH}}/UserType\.php
85+
Overblog\\GraphQLBundle\\Connection\\__DEFINITIONS__\\friendConnectionType {{PATH}}/friendConnectionType\.php
86+
Overblog\\GraphQLBundle\\Connection\\__DEFINITIONS__\\userConnectionType {{PATH}}/userConnectionType\.php
87+
Overblog\\GraphQLBundle\\Connection\\__DEFINITIONS__\\PageInfoType {{PATH}}/PageInfoType\.php
88+
Overblog\\GraphQLBundle\\Connection\\__DEFINITIONS__\\friendEdgeType {{PATH}}/friendEdgeType\.php
89+
Overblog\\GraphQLBundle\\Connection\\__DEFINITIONS__\\userEdgeType {{PATH}}/userEdgeType\.php
90+
\-[\-]+\s+\-[\-]+\s
91+
OUTPUT;
9292

9393
$display = str_replace('{{PATH}}', preg_quote($this->cacheDir), $display);
9494
}

tests/Functional/Controller/GraphControllerTest.php

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,30 @@
1414
class GraphControllerTest extends TestCase
1515
{
1616
private string $friendsQuery = <<<'EOF'
17-
query FriendsQuery {
18-
user {
19-
friends(first: 2) {
20-
totalCount
21-
edges {
22-
friendshipTime
23-
node {
24-
name
17+
query FriendsQuery {
18+
user {
19+
friends(first: 2) {
20+
totalCount
21+
edges {
22+
friendshipTime
23+
node {
24+
name
25+
}
26+
}
2527
}
2628
}
2729
}
28-
}
29-
}
30-
EOF;
30+
EOF;
3131

3232
private string $friendsTotalCountQuery = <<<'EOF'
33-
query FriendsTotalCountQuery {
34-
user {
35-
friends {
36-
totalCount
33+
query FriendsTotalCountQuery {
34+
user {
35+
friends {
36+
totalCount
37+
}
38+
}
3739
}
38-
}
39-
}
40-
EOF;
40+
EOF;
4141

4242
private array $expectedData = [
4343
'user' => [
@@ -127,20 +127,20 @@ public function testEndpointActionWithVariables(): void
127127
$this->disableCatchExceptions($client);
128128

129129
$query = <<<'EOF'
130-
query FriendsQuery($firstFriends: Int) {
131-
user {
132-
friends(first: $firstFriends) {
133-
totalCount
134-
edges {
135-
friendshipTime
136-
node {
137-
name
130+
query FriendsQuery($firstFriends: Int) {
131+
user {
132+
friends(first: $firstFriends) {
133+
totalCount
134+
edges {
135+
friendshipTime
136+
node {
137+
name
138+
}
139+
}
138140
}
139141
}
140142
}
141-
}
142-
}
143-
EOF;
143+
EOF;
144144

145145
$content = json_encode(['query' => $query, 'variables' => '{"firstFriends": 2}']) ?: null;
146146
$client->request('GET', '/', [], [], ['CONTENT_TYPE' => 'application/json'], $content);
@@ -155,10 +155,10 @@ public function testEndpointActionWithInvalidVariables(): void
155155
$this->disableCatchExceptions($client);
156156

157157
$query = <<<'EOF'
158-
query {
159-
user
160-
}
161-
EOF;
158+
query {
159+
user
160+
}
161+
EOF;
162162

163163
$client->request('GET', '/', ['query' => $query, 'variables' => '"firstFriends": 2}']);
164164
}
@@ -171,10 +171,10 @@ public function testMultipleEndpointActionWithUnknownSchemaName(): void
171171
$this->disableCatchExceptions($client);
172172

173173
$query = <<<'EOF'
174-
query {
175-
user
176-
}
177-
EOF;
174+
query {
175+
user
176+
}
177+
EOF;
178178

179179
$client->request('GET', '/graphql/fake', ['query' => $query]);
180180
}

tests/Functional/Exception/ExceptionTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ protected function setUp(): void
1818
public function testExceptionIsMappedToAWarning(): void
1919
{
2020
$query = <<<'EOF'
21-
query ExceptionQuery {
22-
test
23-
}
24-
EOF;
21+
query ExceptionQuery {
22+
test
23+
}
24+
EOF;
2525

2626
$expectedData = [
2727
'test' => null,

tests/Functional/MultipleQueries/MultipleQueriesTest.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ protected function setUp(): void
5656
public function testRequiredFails(): void
5757
{
5858
$query = <<<'EOF'
59-
{
60-
fail: failRequire
61-
success: success
62-
}
63-
EOF;
59+
{
60+
fail: failRequire
61+
success: success
62+
}
63+
EOF;
6464
$result = $this->executeGraphQLRequest($query);
6565
$this->assertSame(self::REQUIRED_FAILS_ERRORS, $result['errors']);
6666
$this->assertTrue(empty($result['data']));
@@ -69,23 +69,23 @@ public function testRequiredFails(): void
6969
public function testOptionalFails(): void
7070
{
7171
$query = <<<'EOF'
72-
{
73-
fail: failOptional
74-
success: success
75-
}
76-
EOF;
72+
{
73+
fail: failOptional
74+
success: success
75+
}
76+
EOF;
7777
$result = $this->executeGraphQLRequest($query);
7878
$this->assertSame(self::OPTIONAL_FAILS, $result);
7979
}
8080

8181
public function testMutationRequiredFails(): void
8282
{
8383
$query = <<<'EOF'
84-
mutation {
85-
fail: failRequire
86-
success: success
87-
}
88-
EOF;
84+
mutation {
85+
fail: failRequire
86+
success: success
87+
}
88+
EOF;
8989
$result = $this->executeGraphQLRequest($query);
9090
$this->assertSame(self::REQUIRED_FAILS_ERRORS, $result['errors']);
9191
$this->assertTrue(empty($result['data']));
@@ -94,11 +94,11 @@ public function testMutationRequiredFails(): void
9494
public function testMutationOptionalFails(): void
9595
{
9696
$query = <<<'EOF'
97-
mutation {
98-
fail: failOptional
99-
success: success
100-
}
101-
EOF;
97+
mutation {
98+
fail: failOptional
99+
success: success
100+
}
101+
EOF;
102102
$result = $this->executeGraphQLRequest($query);
103103
$this->assertSame(self::OPTIONAL_FAILS, $result);
104104
}

tests/Functional/MultipleSchema/MultipleSchemaTest.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ public function testPublicSchema(): void
2626
$this->assertSame([['node' => ['username' => 'user1']]], $result['data']['users']['edges']);
2727

2828
$query = <<<'EOF'
29-
mutation M {
30-
addUser(input: {username: "user1"}) {
31-
user {
32-
username
29+
mutation M {
30+
addUser(input: {username: "user1"}) {
31+
user {
32+
username
33+
}
34+
}
3335
}
34-
}
35-
}
36-
EOF;
36+
EOF;
3737

3838
$expectedData = [
3939
'addUser' => [
@@ -55,15 +55,15 @@ public function testInternalSchema(): void
5555
$this->assertSame([['node' => ['username' => 'user1', 'email' => 'topsecret']]], $result['data']['users']['edges']);
5656

5757
$query = <<<'EOF'
58-
mutation M {
59-
addUser(input: {username: "user1"}) {
60-
user {
61-
username
62-
email
58+
mutation M {
59+
addUser(input: {username: "user1"}) {
60+
user {
61+
username
62+
email
63+
}
64+
}
6365
}
64-
}
65-
}
66-
EOF;
66+
EOF;
6767

6868
$expectedData = [
6969
'addUser' => [

0 commit comments

Comments
 (0)