Problem/Motivation
This is a child issue of #3399992: Fix strict type errors in test traits. After fixing strict type issues we can add the strict_types declaration to all test traits.
Steps to reproduce
Add to phpcs.xml.dist
:
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="spacesCountAroundEqualsSign" value="0" />
</properties>
<include-pattern>*/tests/src/Traits/*</include-pattern>
<include-pattern>./tests/Drupal/Tests/*Trait.php</include-pattern>
<include-pattern>./tests/Drupal/Tests/Traits/*</include-pattern>
<exclude-pattern>./tests/Drupal/Tests/Composer/*</exclude-pattern>
<exclude-pattern>./tests/Drupal/Tests/Listeners/*</exclude-pattern>
</rule>
Run phpcs:
composer phpcs
Proposed resolution
Run phpcbf:
composer phpcbf