Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295775

Add declare(strict_types=1) to all test traits

$
0
0

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

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 295775


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>