Skip to content
Snippets Groups Projects
Commit 4d006efc authored by catch's avatar catch
Browse files

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

Issue #2901789 by mfernea, andriyun, borisson_: Fix 'PEAR.Functions.FunctionCallSignature' coding standard
parent 9188516f
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Showing
with 40 additions and 20 deletions
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment