Commit 4d006efc authored by catch's avatar catch

Issue #2901789 by mfernea, andriyun, borisson_: Fix...

Issue #2901789 by mfernea, andriyun, borisson_: Fix 'PEAR.Functions.FunctionCallSignature' coding standard
parent 9188516f
......@@ -139,7 +139,7 @@ public function testPersonalContactAccess() {
$this->drupalGet('user/' . $this->contactUser->id());
$contact_link = '/user/' . $this->contactUser->id() . '/contact';
$this->assertResponse(200);
$this->assertNoLinkByHref ($contact_link, 'The "contact" tab is hidden on profiles for users with no email address');
$this->assertNoLinkByHref($contact_link, 'The "contact" tab is hidden on profiles for users with no email address');
// Restore original email address.
$this->contactUser->setEmail($original_email)->save();
......
......@@ -99,7 +99,7 @@ public function processItem($data) {
}
else {
$batch_context = $args[$last];
unset ($args[$last]);
unset($args[$last]);
}
$args = array_merge($args, [&$batch_context]);
......
......@@ -44,7 +44,7 @@ protected function setUp() {
->save();
// Log in a user who can create 'page' nodes.
$this->drupalLogin ($this->drupalCreateUser(['create page content']));
$this->drupalLogin($this->drupalCreateUser(['create page content']));
}
/**
......
......@@ -28,7 +28,7 @@ class StorageTest extends WebTestBase {
protected function setUp() {
parent::setUp();
$this->drupalLogin ($this->drupalCreateUser());
$this->drupalLogin($this->drupalCreateUser());
}
/**
......
......@@ -30,7 +30,7 @@ protected function setUp() {
parent::setUp();
// Create admin user, log in admin user, and create one node.
$this->drupalLogin ($this->drupalCreateUser([
$this->drupalLogin($this->drupalCreateUser([
'access content',
'administer site configuration',
]));
......
......@@ -13,7 +13,7 @@ class ConfigTest extends BrowserTestBase {
protected function setUp(){
parent::setUp();
$this->drupalLogin ($this->drupalCreateUser(['administer site configuration']));
$this->drupalLogin($this->drupalCreateUser(['administer site configuration']));
}
/**
......
......@@ -25,7 +25,7 @@ protected function setUp() {
parent::setUp();
// Create admin user and log in admin user.
$this->drupalLogin ($this->drupalCreateUser([
$this->drupalLogin($this->drupalCreateUser([
'administer site configuration',
'administer content types',
'administer nodes',
......
......@@ -22,7 +22,7 @@ protected function setUp() {
parent::setUp();
// Create an administrator user.
$this->drupalLogin ($this->drupalCreateUser(['administer software updates']));
$this->drupalLogin($this->drupalCreateUser(['administer software updates']));
}
/**
......
......@@ -242,8 +242,7 @@ public function testRevisionTableWithoutDataTable() {
->set('revision_table', 'entity_test_mulrev_revision')
->set('revision_data_table', NULL)
->set('id', 'entity_test_mulrev')
->setKey('revision', 'revision_id')
;
->setKey('revision', 'revision_id');
$this->viewsData->setEntityType($entity_type);
$data = $this->viewsData->getViewsData();
......@@ -278,8 +277,7 @@ public function testRevisionTableWithRevisionDataTableAndDataTable() {
->set('revision_data_table', 'entity_test_mulrev_property_revision')
->set('id', 'entity_test_mulrev')
->set('translatable', TRUE)
->setKey('revision', 'revision_id')
;
->setKey('revision', 'revision_id');
$this->viewsData->setEntityType($entity_type);
$data = $this->viewsData->getViewsData();
......@@ -326,8 +324,7 @@ public function testRevisionTableWithRevisionDataTable() {
->set('revision_data_table', 'entity_test_mulrev_property_revision')
->set('id', 'entity_test_mulrev')
->set('translatable', TRUE)
->setKey('revision', 'revision_id')
;
->setKey('revision', 'revision_id');
$this->viewsData->setEntityType($entity_type);
$data = $this->viewsData->getViewsData();
......@@ -560,8 +557,7 @@ public function testDataTableFields() {
->set('data_table', 'entity_test_mul_property_data')
->set('base_table', 'entity_test_mul')
->set('id', 'entity_test_mul')
->setKey('bundle', 'type')
;
->setKey('bundle', 'type');
$base_field_definitions = $this->setupBaseFields(EntityTestMul::baseFieldDefinitions($this->baseEntityType));
$base_field_definitions['type'] = BaseFieldDefinition::create('entity_reference')
->setLabel('entity test type')
......
......@@ -155,6 +155,32 @@
</rule>
<rule ref="PEAR.Functions.ValidDefaultValue"/>
<!-- PEAR sniffs -->
<rule ref="PEAR.Functions.FunctionCallSignature"/>
<!-- The sniffs inside PEAR.Functions.FunctionCallSignature silenced below are
also silenced in Drupal CS' ruleset.xml. The code below is a 1-on-1 copy
from that file. -->
<!-- Disable some error messages that we already cover. -->
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket">
<severity>0</severity>
</rule>
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket">
<severity>0</severity>
</rule>
<!-- Disable some error messages that we do not want. -->
<rule ref="PEAR.Functions.FunctionCallSignature.Indent">
<severity>0</severity>
</rule>
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket">
<severity>0</severity>
</rule>
<rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine">
<severity>0</severity>
</rule>
<rule ref="PEAR.Functions.FunctionCallSignature.EmptyLine">
<severity>0</severity>
</rule>
<!-- PSR-2 sniffs -->
<rule ref="PSR2.Classes.PropertyDeclaration">
<exclude name="PSR2.Classes.PropertyDeclaration.Underscore"/>
......
......@@ -583,8 +583,7 @@ protected function registerLinkTemplate($link_template) {
protected function registerBundleInfo($bundle_info) {
$this->entityTypeBundleInfo
->getBundleInfo($this->entityTypeId)
->willReturn([$this->entityTypeId => $bundle_info])
;
->willReturn([$this->entityTypeId => $bundle_info]);
}
}
......
......@@ -136,8 +136,7 @@ public function providerTestGetAddFormRoute() {
'entity_type_id' => 'the_entity_type_id',
'_title_callback' => 'Drupal\Core\Entity\Controller\EntityController::addTitle',
])
->setRequirement('_entity_create_access', 'the_entity_type_id')
;
->setRequirement('_entity_create_access', 'the_entity_type_id');
$data['no_add_form_no_bundle'] = [clone $route, $entity_type2->reveal()];
$entity_type3 = $this->getEntityType($entity_type2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment