Skip to content

Commit 5852b8a

Browse files
authored
InlineComment, VariableComment and NewlineAfterCloseBrace Rules removed (#1062)
1 parent f8d403b commit 5852b8a

13 files changed

Lines changed: 35 additions & 33 deletions

File tree

phpcs.xml.dist

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,6 @@
4747
<exclude name="Drupal.Commenting.FunctionComment.ReturnCommentIndentation"/>
4848
<exclude name="Drupal.Commenting.FunctionComment.ReturnTypeSpaces"/>
4949
<exclude name="Drupal.Commenting.FunctionComment.TypeHintMissing"/>
50-
<exclude name="Drupal.Commenting.InlineComment.InvalidEndChar"/>
51-
<exclude name="Drupal.Commenting.InlineComment.NoSpaceBefore"/>
52-
<exclude name="Drupal.Commenting.InlineComment.SpacingAfter"/>
53-
<exclude name="Drupal.Commenting.InlineComment.SpacingBefore"/>
54-
<exclude name="Drupal.Commenting.InlineComment.SpacingBefore"/>
55-
<exclude name="Drupal.Commenting.VariableComment.IncorrectVarType"/>
56-
<exclude name="Drupal.Commenting.VariableComment.Missing"/>
57-
<exclude name="Drupal.ControlStructures.ControlSignature.NewlineAfterCloseBrace"/>
5850
</rule>
5951

6052
</ruleset>

src/Entity/Server.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,21 +98,21 @@ class Server extends ConfigEntityBase implements ServerInterface {
9898
/**
9999
* Whether the server is in debug mode.
100100
*
101-
* @var boolean
101+
* @var bool
102102
*/
103103
public $debug = FALSE;
104104

105105
/**
106106
* Whether the server should cache its results.
107107
*
108-
* @var boolean
108+
* @var bool
109109
*/
110110
public $caching = TRUE;
111111

112112
/**
113113
* Whether the server allows query batching.
114114
*
115-
* @var boolean
115+
* @var bool
116116
*/
117117
public $batching = TRUE;
118118

src/Form/PersistedQueriesForm.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313

1414
class PersistedQueriesForm extends EntityForm {
1515

16+
/**
17+
* @var PersistedQueryPluginManager
18+
*/
1619
protected $persistedQueryPluginManager;
1720

1821
/**
@@ -76,7 +79,7 @@ public function form(array $form, FormStateInterface $form_state) {
7679
];
7780
}
7881

79-
// Set the weights of the persisted query plugins
82+
// Set the weights of the persisted query plugins.
8083
$form['weights'] = [
8184
'#type' => 'fieldset',
8285
'#title' => $this->t('Order'),

src/Plugin/GraphQL/DataProducer/DataProducerProxy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class DataProducerProxy implements ResolverInterface {
6464
protected $mapping = [];
6565

6666
/**
67-
* @var boolean
67+
* @var bool
6868
*/
6969
protected $cached = FALSE;
7070

src/Plugin/GraphQL/DataProducer/Menu/MenuLink/MenuLinkAttribute.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ public function resolve(MenuLinkInterface $link, $attribute) {
4141
$attributeValue = NestedArray::getValue($options, ['attributes', $attribute]);
4242
if (is_array($attributeValue)) {
4343
return implode(" ", $attributeValue);
44-
} else {
44+
}
45+
else {
4546
return $attributeValue;
4647
}
4748
}

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

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

7979
// TODO: Add cache checks.
80-
// $this->assertContains('config:image.style.test_style',
81-
// $metadata->getCacheTags());
82-
// $this->assertContains('test_tag', $metadata->getCacheTags());
83-
80+
// $this->assertContains('config:image.style.test_style',
81+
// $metadata->getCacheTags());
82+
// $this->assertContains('test_tag', $metadata->getCacheTags());
8483
// Test that we don't get the derivative if we don't have access to the
8584
// original file, but we still get the access result cache tags.
8685
$result = $this->executeDataProducer('image_derivative', [
@@ -91,8 +90,8 @@ public function testImageDerivative() {
9190
$this->assertNull($result);
9291

9392
// TODO: Add cache checks.
94-
// $this->assertContains('test_tag_forbidden',
95-
// $metadata->getCacheTags());
93+
// $this->assertContains('test_tag_forbidden',
94+
// $metadata->getCacheTags());
9695
}
9796

9897
}

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +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());
54-
53+
// $this->assertContains('test_tag', $metadata->getCacheTags());
5554
// Test that we do not get a file we don't have access to, but the cache
5655
// tags are still added.
5756
$result = $this->executeDataProducer('image_url', [
@@ -61,8 +60,8 @@ public function testImageUrl() {
6160
$this->assertNull($result);
6261

6362
// TODO: Add cache checks.
64-
// $this->assertContains('test_tag_forbidden',
65-
// $metadata->getCacheTags());
63+
// $this->assertContains('test_tag_forbidden',
64+
// $metadata->getCacheTags());
6665
}
6766

6867
}

tests/src/Kernel/DataProducer/EntityTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ public function testResolveUnknownEntityLoad() {
334334
]);
335335

336336
// TODO: Add metadata check.
337-
//$this->assertContains('node_list', $metadata->getCacheTags());
337+
// $this->assertContains('node_list', $metadata->getCacheTags());
338338
$this->assertNull($result);
339339
}
340340

@@ -349,7 +349,7 @@ public function testResolveMismatchEntityLoad() {
349349
]);
350350

351351
// TODO: Add metadata check.
352-
//$this->assertContains('node:1', $metadata->getCacheTags());
352+
// $this->assertContains('node:1', $metadata->getCacheTags());
353353
$this->assertNull($result);
354354
}
355355

@@ -377,7 +377,7 @@ public function testResolveEntityRendered() {
377377
]);
378378

379379
// TODO: Add metadata check.
380-
//$this->assertContains('node:1', $metadata->getCacheTags());
380+
// $this->assertContains('node:1', $metadata->getCacheTags());
381381
$this->assertContains('<a href="/node/1" rel="bookmark"><span>' . $this->node->getTitle() . '</span>', $result);
382382
}
383383

tests/src/Kernel/DataProducer/Routing/RouteEntityTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ public function testRouteEntity() {
207207
$this->assertNull($result);
208208

209209
// TODO: Add cache checks.
210-
// $this->assertContains('node_list', $metadata->getCacheTags());
211-
// $this->assertContains('4xx-response', $metadata->getCacheTags());
210+
// $this->assertContains('node_list', $metadata->getCacheTags());
211+
// $this->assertContains('4xx-response', $metadata->getCacheTags());
212212
}
213213

214214
}

tests/src/Kernel/DataProducer/RoutingTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function testUrlNotFound() {
4646
'path' => '/idontexist',
4747
]);
4848

49-
// $this->assertContains('4xx-response', $metadata->getCacheTags());
49+
// $this->assertContains('4xx-response', $metadata->getCacheTags());
5050
$this->assertNull($result);
5151
}
5252

0 commit comments

Comments
 (0)