Skip to content
Snippets Groups Projects
Commit 2d3b4df9 authored by Christian López Espínola's avatar Christian López Espínola Committed by Ted Bowman
Browse files

Issue #3516801: Update PHPCS config to match Drupal 11 + phpstan issues

parent 52b1e49d
Branches
Tags
1 merge request!832Issue #3516801: Update PHPCS config to match Drupal 11 + phpstan issues
Pipeline #463461 failed
......@@ -31,6 +31,9 @@
<!-- Drupal sniffs -->
<rule ref="Drupal.Arrays.Array"/>
<rule ref="Drupal.Arrays.Array.LongLineDeclaration">
<include-pattern>core/*/Unit/*</include-pattern>
<include-pattern>core/*/FunctionalJavascript/*</include-pattern>
<include-pattern>core/*/Kernel/*</include-pattern>
<include-pattern>core/lib/*</include-pattern>
<include-pattern>core/modules/*/tests/modules/*</include-pattern>
</rule>
......@@ -46,12 +49,6 @@
<rule ref="Drupal.Classes.UseGlobalClass"/>
<rule ref="Drupal.Classes.UseLeadingBackslash"/>
<rule ref="Drupal.Commenting.ClassComment"/>
<rule ref="Drupal.Commenting.ClassComment.Missing">
<include-pattern>*/Functional/*</include-pattern>
<include-pattern>*/tests/modules/*</include-pattern>
<include-pattern>./core/tests/Drupal/Tests/Core/*</include-pattern>
<include-pattern>./core/modules/*</include-pattern>
</rule>
<rule ref="Drupal.Commenting.DataTypeNamespace"/>
<rule ref="Drupal.Commenting.Deprecated"/>
<rule ref="Drupal.Commenting.DocComment">
......@@ -62,30 +59,18 @@
<exclude name="Drupal.Commenting.DocComment.LongFullStop"/>
<exclude name="Drupal.Commenting.DocComment.MissingShort"/>
</rule>
<rule ref="Drupal.Commenting.DocComment">
<exclude-pattern>core/tests/*</exclude-pattern>
</rule>
<rule ref="Drupal.Commenting.DocCommentAlignment"/>
<rule ref="Drupal.Commenting.DocCommentLongArraySyntax"/>
<rule ref="Drupal.Commenting.DocCommentStar"/>
<rule ref="Drupal.Commenting.FileComment"/>
<rule ref="Drupal.Commenting.FunctionComment"/>
<rule ref="Drupal.Commenting.FunctionComment.Missing">
<include-pattern>core/modules/*/Plugin/views/argument/*</include-pattern>
<include-pattern>core/modules/*/Plugin/views/filter/*</include-pattern>
<include-pattern>core/modules/*/Plugin/views/access/*</include-pattern>
<include-pattern>core/modules/*/Plugin/views/cache/*</include-pattern>
<include-pattern>core/modules/*/Plugin/views/query/*</include-pattern>
<include-pattern>core/modules/*/Plugin/views/sort/*</include-pattern>
<include-pattern>core/modules/*/Plugin/views/display/*</include-pattern>
<include-pattern>core/modules/*/Plugin/views/exposed_form/*</include-pattern>
<include-pattern>core/modules/*/Plugin/views/field/*</include-pattern>
<include-pattern>core/modules/*/Plugin/views/pager/*</include-pattern>
<include-pattern>core/modules/*/Plugin/views/style/*</include-pattern>
<include-pattern>core/*/src/Plugin/*</include-pattern>
<include-pattern>*/Database/*</include-pattern>
<include-pattern>*/FunctionalJavascript/*</include-pattern>
<include-pattern>*/Kernel/*</include-pattern>
<include-pattern>*/Functional/*</include-pattern>
<include-pattern>*/Unit/*</include-pattern>
</rule>
<rule ref="Drupal.Commenting.FunctionComment.MissingParamType"/>
<rule ref="Drupal.Commenting.FunctionComment.MissingReturnComment">
......@@ -110,6 +95,14 @@
<rule ref="Drupal.ControlStructures.InlineControlStructure"/>
<rule ref="Drupal.Files.EndFileNewline"/>
<rule ref="Drupal.Files.FileEncoding"/>
<rule ref="Drupal.Files.LineLength">
<include-pattern>*/core/lib/*</include-pattern>
<exclude-pattern>*/core/lib/*/*Trait</exclude-pattern>
<include-pattern>*/core/includes/*</include-pattern>
<include-pattern>*/core/profiles/*</include-pattern>
<include-pattern>*/core/recipes/*</include-pattern>
<include-pattern>*/core/themes/*</include-pattern>
</rule>
<rule ref="Drupal.Files.TxtFileLineLength"/>
<rule ref="Drupal.Formatting.MultiLineAssignment"/>
<rule ref="Drupal.Formatting.MultipleStatementAlignment"/>
......
......@@ -161,6 +161,7 @@ trait XBFieldTrait {
private function assertNodeValues(Node $node, array $expected_component_ids, array $expected_inputs, array $expected_field_values): void {
$nid = $node->id();
assert(is_string($nid));
// Reset the node to ensure we're not getting a cached version.
$this->container->get('entity_type.manager')
->getStorage('node')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment