We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -106,13 +106,13 @@ |
||
106 | 106 | protected function createGraphQLServices(array $services = []): GraphQLServices |
107 | 107 | { |
108 | 108 | $locateableServices = [ |
109 | - 'typeResolver' => fn () => $this->createMock(TypeResolver::class), |
|
110 | - 'queryResolver' => fn () => $this->createMock(TypeResolver::class), |
|
111 | - 'mutationResolver' => fn () => $$this->createMock(MutationResolver::class), |
|
109 | + 'typeResolver' => fn() => $this->createMock(TypeResolver::class), |
|
110 | + 'queryResolver' => fn() => $this->createMock(TypeResolver::class), |
|
111 | + 'mutationResolver' => fn() => $$this->createMock(MutationResolver::class), |
|
112 | 112 | ]; |
113 | 113 | |
114 | 114 | foreach ($services as $id => $service) { |
115 | - $locateableServices[$id] = fn () => $service; |
|
115 | + $locateableServices[$id] = fn() => $service; |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | return new GraphQLServices($locateableServices); |
@@ -22,12 +22,12 @@ discard block |
||
22 | 22 | public function testScalarTypeConfig(): void |
23 | 23 | { |
24 | 24 | $this->assertScalarTypeConfig(new YearScalarType()); |
25 | - $this->assertScalarTypeConfig(fn () => new YearScalarType()); |
|
25 | + $this->assertScalarTypeConfig(fn() => new YearScalarType()); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | public function testWithoutScalarTypeConfig(): void |
29 | 29 | { |
30 | - $genericFunc = fn ($value) => $value; |
|
30 | + $genericFunc = fn($value) => $value; |
|
31 | 31 | $type = new CustomScalarType([ |
32 | 32 | 'serialize' => $genericFunc, |
33 | 33 | 'parseValue' => $genericFunc, |
@@ -74,11 +74,11 @@ discard block |
||
74 | 74 | yield [false, 'false']; |
75 | 75 | yield [new stdClass(), 'instance of stdClass']; |
76 | 76 | yield [ |
77 | - fn () => false, |
|
77 | + fn() => false, |
|
78 | 78 | 'false', |
79 | 79 | ]; |
80 | 80 | yield [ |
81 | - fn () => new stdClass(), |
|
81 | + fn() => new stdClass(), |
|
82 | 82 | 'instance of stdClass', |
83 | 83 | ]; |
84 | 84 | } |
@@ -92,9 +92,9 @@ discard block |
||
92 | 92 | { |
93 | 93 | $type = new CustomScalarType([ |
94 | 94 | 'scalarType' => $scalarType, |
95 | - 'serialize' => fn () => 'serialize', |
|
96 | - 'parseValue' => fn () => 'parseValue', |
|
97 | - 'parseLiteral' => fn () => 'parseLiteral', |
|
95 | + 'serialize' => fn() => 'serialize', |
|
96 | + 'parseValue' => fn() => 'parseValue', |
|
97 | + 'parseLiteral' => fn() => 'parseLiteral', |
|
98 | 98 | ]); |
99 | 99 | |
100 | 100 | $this->assertSame('50 AC', $type->serialize(50)); |
@@ -281,6 +281,4 @@ |
||
281 | 281 | ], |
282 | 282 | ]; |
283 | 283 | |
284 | - $this->assertGraphQL($query, $expectedData); |
|
285 | - } |
|
286 | -} |
|
284 | + $this->assertGraphQL($query, $expectedData |
|
287 | 285 | \ No newline at end of file |
@@ -281,6 +281,4 @@ |
||
281 | 281 | ], |
282 | 282 | ]; |
283 | 283 | |
284 | - $this->assertGraphQL($query, $expectedData); |
|
285 | - } |
|
286 | -} |
|
284 | + $this->assertGraphQL($query, $expectedData |
|
287 | 285 | \ No newline at end of file |
@@ -281,6 +281,4 @@ |
||
281 | 281 | ], |
282 | 282 | ]; |
283 | 283 | |
284 | - $this->assertGraphQL($query, $expectedData); |
|
285 | - } |
|
286 | -} |
|
284 | + $this->assertGraphQL($query, $expectedData |
|
287 | 285 | \ No newline at end of file |
@@ -281,6 +281,4 @@ |
||
281 | 281 | ], |
282 | 282 | ]; |
283 | 283 | |
284 | - $this->assertGraphQL($query, $expectedData); |
|
285 | - } |
|
286 | -} |
|
284 | + $this->assertGraphQL($query, $expectedData |
|
287 | 285 | \ No newline at end of file |
@@ -281,6 +281,4 @@ |
||
281 | 281 | ], |
282 | 282 | ]; |
283 | 283 | |
284 | - $this->assertGraphQL($query, $expectedData); |
|
285 | - } |
|
286 | -} |
|
284 | + $this->assertGraphQL($query, $expectedData |
|
287 | 285 | \ No newline at end of file |
@@ -111,38 +111,3 @@ |
||
111 | 111 | |
112 | 112 | // this is the part is why we must make this test run in separate process |
113 | 113 | $query = <<<'EOF' |
114 | - mutation { |
|
115 | - conflictingValidatorNamespaces(test: "123", test2: "1", test3: "4") |
|
116 | - } |
|
117 | - EOF; |
|
118 | - |
|
119 | - $response = static::query( |
|
120 | - $query, |
|
121 | - self::USER_RYAN, |
|
122 | - 'conflictingValidatorNamespaces' |
|
123 | - )->getResponse()->getContent(); |
|
124 | - |
|
125 | - $this->assertEquals('{"data":{"conflictingValidatorNamespaces":true}}', $response); |
|
126 | - // end part |
|
127 | - |
|
128 | - // Validate definition file |
|
129 | - /** @var string $definitionFile */ |
|
130 | - $definitionFile = file_get_contents($kernel->getCacheDir().'/overblog/graphql-bundle/__definitions__/MutationType.php'); |
|
131 | - |
|
132 | - $this->assertStringContainsString( |
|
133 | - 'use Symfony\Component\Validator\Constraints as SymfonyConstraints;', |
|
134 | - $definitionFile, |
|
135 | - 'Generated definition file should contain import of Symfony\Component\Validator\Constraints aliased as SymfonyConstraints' |
|
136 | - ); |
|
137 | - $this->assertStringNotContainsString( |
|
138 | - 'use '.Validator\CustomValidator1\Constraint::class, |
|
139 | - $definitionFile, |
|
140 | - 'Generated definition file should not contain imports of custom constraints, FQCN should be used instead' |
|
141 | - ); |
|
142 | - $this->assertStringNotContainsString( |
|
143 | - 'use '.Validator\CustomValidator2\Constraint::class, |
|
144 | - $definitionFile, |
|
145 | - 'Generated definition file should not contain imports of custom constraints, FQCN should be used instead' |
|
146 | - ); |
|
147 | - } |
|
148 | -} |
@@ -111,38 +111,3 @@ |
||
111 | 111 | |
112 | 112 | // this is the part is why we must make this test run in separate process |
113 | 113 | $query = <<<'EOF' |
114 | - mutation { |
|
115 | - conflictingValidatorNamespaces(test: "123", test2: "1", test3: "4") |
|
116 | - } |
|
117 | - EOF; |
|
118 | - |
|
119 | - $response = static::query( |
|
120 | - $query, |
|
121 | - self::USER_RYAN, |
|
122 | - 'conflictingValidatorNamespaces' |
|
123 | - )->getResponse()->getContent(); |
|
124 | - |
|
125 | - $this->assertEquals('{"data":{"conflictingValidatorNamespaces":true}}', $response); |
|
126 | - // end part |
|
127 | - |
|
128 | - // Validate definition file |
|
129 | - /** @var string $definitionFile */ |
|
130 | - $definitionFile = file_get_contents($kernel->getCacheDir().'/overblog/graphql-bundle/__definitions__/MutationType.php'); |
|
131 | - |
|
132 | - $this->assertStringContainsString( |
|
133 | - 'use Symfony\Component\Validator\Constraints as SymfonyConstraints;', |
|
134 | - $definitionFile, |
|
135 | - 'Generated definition file should contain import of Symfony\Component\Validator\Constraints aliased as SymfonyConstraints' |
|
136 | - ); |
|
137 | - $this->assertStringNotContainsString( |
|
138 | - 'use '.Validator\CustomValidator1\Constraint::class, |
|
139 | - $definitionFile, |
|
140 | - 'Generated definition file should not contain imports of custom constraints, FQCN should be used instead' |
|
141 | - ); |
|
142 | - $this->assertStringNotContainsString( |
|
143 | - 'use '.Validator\CustomValidator2\Constraint::class, |
|
144 | - $definitionFile, |
|
145 | - 'Generated definition file should not contain imports of custom constraints, FQCN should be used instead' |
|
146 | - ); |
|
147 | - } |
|
148 | -} |
@@ -111,38 +111,3 @@ |
||
111 | 111 | |
112 | 112 | // this is the part is why we must make this test run in separate process |
113 | 113 | $query = <<<'EOF' |
114 | - mutation { |
|
115 | - conflictingValidatorNamespaces(test: "123", test2: "1", test3: "4") |
|
116 | - } |
|
117 | - EOF; |
|
118 | - |
|
119 | - $response = static::query( |
|
120 | - $query, |
|
121 | - self::USER_RYAN, |
|
122 | - 'conflictingValidatorNamespaces' |
|
123 | - )->getResponse()->getContent(); |
|
124 | - |
|
125 | - $this->assertEquals('{"data":{"conflictingValidatorNamespaces":true}}', $response); |
|
126 | - // end part |
|
127 | - |
|
128 | - // Validate definition file |
|
129 | - /** @var string $definitionFile */ |
|
130 | - $definitionFile = file_get_contents($kernel->getCacheDir().'/overblog/graphql-bundle/__definitions__/MutationType.php'); |
|
131 | - |
|
132 | - $this->assertStringContainsString( |
|
133 | - 'use Symfony\Component\Validator\Constraints as SymfonyConstraints;', |
|
134 | - $definitionFile, |
|
135 | - 'Generated definition file should contain import of Symfony\Component\Validator\Constraints aliased as SymfonyConstraints' |
|
136 | - ); |
|
137 | - $this->assertStringNotContainsString( |
|
138 | - 'use '.Validator\CustomValidator1\Constraint::class, |
|
139 | - $definitionFile, |
|
140 | - 'Generated definition file should not contain imports of custom constraints, FQCN should be used instead' |
|
141 | - ); |
|
142 | - $this->assertStringNotContainsString( |
|
143 | - 'use '.Validator\CustomValidator2\Constraint::class, |
|
144 | - $definitionFile, |
|
145 | - 'Generated definition file should not contain imports of custom constraints, FQCN should be used instead' |
|
146 | - ); |
|
147 | - } |
|
148 | -} |
@@ -111,38 +111,3 @@ |
||
111 | 111 | |
112 | 112 | // this is the part is why we must make this test run in separate process |
113 | 113 | $query = <<<'EOF' |
114 | - mutation { |
|
115 | - conflictingValidatorNamespaces(test: "123", test2: "1", test3: "4") |
|
116 | - } |
|
117 | - EOF; |
|
118 | - |
|
119 | - $response = static::query( |
|
120 | - $query, |
|
121 | - self::USER_RYAN, |
|
122 | - 'conflictingValidatorNamespaces' |
|
123 | - )->getResponse()->getContent(); |
|
124 | - |
|
125 | - $this->assertEquals('{"data":{"conflictingValidatorNamespaces":true}}', $response); |
|
126 | - // end part |
|
127 | - |
|
128 | - // Validate definition file |
|
129 | - /** @var string $definitionFile */ |
|
130 | - $definitionFile = file_get_contents($kernel->getCacheDir().'/overblog/graphql-bundle/__definitions__/MutationType.php'); |
|
131 | - |
|
132 | - $this->assertStringContainsString( |
|
133 | - 'use Symfony\Component\Validator\Constraints as SymfonyConstraints;', |
|
134 | - $definitionFile, |
|
135 | - 'Generated definition file should contain import of Symfony\Component\Validator\Constraints aliased as SymfonyConstraints' |
|
136 | - ); |
|
137 | - $this->assertStringNotContainsString( |
|
138 | - 'use '.Validator\CustomValidator1\Constraint::class, |
|
139 | - $definitionFile, |
|
140 | - 'Generated definition file should not contain imports of custom constraints, FQCN should be used instead' |
|
141 | - ); |
|
142 | - $this->assertStringNotContainsString( |
|
143 | - 'use '.Validator\CustomValidator2\Constraint::class, |
|
144 | - $definitionFile, |
|
145 | - 'Generated definition file should not contain imports of custom constraints, FQCN should be used instead' |
|
146 | - ); |
|
147 | - } |
|
148 | -} |
@@ -111,38 +111,3 @@ |
||
111 | 111 | |
112 | 112 | // this is the part is why we must make this test run in separate process |
113 | 113 | $query = <<<'EOF' |
114 | - mutation { |
|
115 | - conflictingValidatorNamespaces(test: "123", test2: "1", test3: "4") |
|
116 | - } |
|
117 | - EOF; |
|
118 | - |
|
119 | - $response = static::query( |
|
120 | - $query, |
|
121 | - self::USER_RYAN, |
|
122 | - 'conflictingValidatorNamespaces' |
|
123 | - )->getResponse()->getContent(); |
|
124 | - |
|
125 | - $this->assertEquals('{"data":{"conflictingValidatorNamespaces":true}}', $response); |
|
126 | - // end part |
|
127 | - |
|
128 | - // Validate definition file |
|
129 | - /** @var string $definitionFile */ |
|
130 | - $definitionFile = file_get_contents($kernel->getCacheDir().'/overblog/graphql-bundle/__definitions__/MutationType.php'); |
|
131 | - |
|
132 | - $this->assertStringContainsString( |
|
133 | - 'use Symfony\Component\Validator\Constraints as SymfonyConstraints;', |
|
134 | - $definitionFile, |
|
135 | - 'Generated definition file should contain import of Symfony\Component\Validator\Constraints aliased as SymfonyConstraints' |
|
136 | - ); |
|
137 | - $this->assertStringNotContainsString( |
|
138 | - 'use '.Validator\CustomValidator1\Constraint::class, |
|
139 | - $definitionFile, |
|
140 | - 'Generated definition file should not contain imports of custom constraints, FQCN should be used instead' |
|
141 | - ); |
|
142 | - $this->assertStringNotContainsString( |
|
143 | - 'use '.Validator\CustomValidator2\Constraint::class, |
|
144 | - $definitionFile, |
|
145 | - 'Generated definition file should not contain imports of custom constraints, FQCN should be used instead' |
|
146 | - ); |
|
147 | - } |
|
148 | -} |