Skip to content

Commit 73e93be

Browse files
authored
tests(phpcs): Fix Drupal WhiteSpace Rules coding standards (#1059)
1 parent 24ccb05 commit 73e93be

15 files changed

Lines changed: 42 additions & 34 deletions

File tree

phpcs.xml.dist

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,6 @@
6767
<exclude name="Drupal.Files.EndFileNewline.TooMany"/>
6868
<exclude name="Drupal.Files.LineLength.TooLong"/>
6969
<exclude name="Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps"/>
70-
<exclude name="Drupal.WhiteSpace.CloseBracketSpacing.ClosingWhitespace"/>
71-
<exclude name="Drupal.WhiteSpace.Comma.NoSpace"/>
72-
<exclude name="Drupal.WhiteSpace.Comma.TooManySpaces"/>
73-
<exclude name="Drupal.WhiteSpace.OpenBracketSpacing.OpeningWhitespace"/>
74-
<exclude name="Drupal.WhiteSpace.OpenTagNewline.BlankLine"/>
75-
<exclude name="Drupal.WhiteSpace.ScopeClosingBrace.Line"/>
76-
<exclude name="Drupal.WhiteSpace.ScopeIndent.IncorrectExact"/>
7770
</rule>
7871

7972
</ruleset>

src/Annotation/PersistedQuery.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
43
namespace Drupal\graphql\Annotation;
54

65

src/GraphQL/Execution/Executor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ protected function cacheWrite($prefix, CacheableExecutionResult $result) {
331331

332332
$this->cacheBackend->setMultiple([
333333
"contexts:$prefix" => ['data' => $contexts, 'expire' => $expire, 'tags' => $tags],
334-
"result:$prefix:$suffix" => ['data' => $cache, 'expire' => $expire, 'tags' => $tags],
334+
"result:$prefix:$suffix" => ['data' => $cache, 'expire' => $expire, 'tags' => $tags],
335335
]);
336336

337337
return $this;

src/Plugin/GraphQL/DataProducer/Taxonomy/TaxonomyLoadTree.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
43
namespace Drupal\graphql\Plugin\GraphQL\DataProducer\Taxonomy;
54

65
use Drupal\Core\Entity\EntityTypeManagerInterface;

src/Plugin/PersistedQueryPluginInterface.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
43
namespace Drupal\graphql\Plugin;
54

65
use Drupal\Component\Plugin\ConfigurableInterface;

tests/modules/graphql_persisted_queries_test/src/Plugin/GraphQL/PersistedQuery/PersistedQueryPluginOne.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
43
namespace Drupal\graphql_persisted_queries_test\Plugin\GraphQL\PersistedQuery;
54

65
use Drupal\graphql\PersistedQuery\PersistedQueryPluginBase;

tests/modules/graphql_persisted_queries_test/src/Plugin/GraphQL/PersistedQuery/PersistedQueryPluginThree.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
43
namespace Drupal\graphql_persisted_queries_test\Plugin\GraphQL\PersistedQuery;
54

65
use Drupal\graphql\PersistedQuery\PersistedQueryPluginBase;

tests/modules/graphql_persisted_queries_test/src/Plugin/GraphQL/PersistedQuery/PersistedQueryPluginTwo.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
43
namespace Drupal\graphql_persisted_queries_test\Plugin\GraphQL\PersistedQuery;
54

65
use Drupal\graphql\PersistedQuery\PersistedQueryPluginBase;

tests/src/Kernel/DataProducer/Entity/Fields/Image/ImageDerivativeTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ public function testImageDerivative() {
7777
);
7878

7979
// TODO: Add cache checks.
80-
// $this->assertContains('config:image.style.test_style', $metadata->getCacheTags());
81-
// $this->assertContains('test_tag', $metadata->getCacheTags());
80+
// $this->assertContains('config:image.style.test_style', $metadata->getCacheTags());
81+
// $this->assertContains('test_tag', $metadata->getCacheTags());
8282

8383
// Test that we don't get the derivative if we don't have access to the
8484
// original file, but we still get the access result cache tags.
@@ -90,7 +90,7 @@ public function testImageDerivative() {
9090
$this->assertNull($result);
9191

9292
// TODO: Add cache checks.
93-
// $this->assertContains('test_tag_forbidden', $metadata->getCacheTags());
93+
// $this->assertContains('test_tag_forbidden', $metadata->getCacheTags());
9494
}
9595

9696
}

tests/src/Kernel/DataProducer/Entity/Fields/Image/ImageUrlTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function testImageUrl() {
5050
$this->assertEquals($this->file_url, $result);
5151

5252
// TODO: Add cache checks.
53-
// $this->assertContains('test_tag', $metadata->getCacheTags());
53+
// $this->assertContains('test_tag', $metadata->getCacheTags());
5454

5555
// Test that we do not get a file we don't have access to, but the cache
5656
// tags are still added.
@@ -61,7 +61,7 @@ public function testImageUrl() {
6161
$this->assertNull($result);
6262

6363
// TODO: Add cache checks.
64-
// $this->assertContains('test_tag_forbidden', $metadata->getCacheTags());
64+
// $this->assertContains('test_tag_forbidden', $metadata->getCacheTags());
6565
}
6666

6767
}

0 commit comments

Comments
 (0)