Skip to content

Commit b0d64d1

Browse files
tannguyen04AlexSkrypnyk
authored andcommitted
Force strict type.
1 parent 1dc4718 commit b0d64d1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

phpcs.xml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<rule ref="DrupalPractice"/>
1010
<rule ref="Generic.Debug.ESLint"/>
1111
<rule ref="PHPCompatibility"/>
12+
<rule ref="Generic.PHP.RequireStrictTypes" />
1213

1314
<arg name="extensions" value="inc,info,install,module,php,profile,test,theme,js,css"/>
1415
<arg name="colors"/>

rector.php

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use DrupalRector\Set\Drupal9SetList;
1919
use Rector\Config\RectorConfig;
2020
use Rector\Set\ValueObject\SetList;
21+
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
2122

2223
return static function (RectorConfig $rectorConfig): void {
2324
$rectorConfig->sets([
@@ -29,6 +30,8 @@
2930
Drupal10SetList::DRUPAL_10,
3031
]);
3132

33+
$rectorConfig->rule(DeclareStrictTypesRector::class);
34+
3235
$drupalFinder = new DrupalFinder();
3336
$drupalFinder->locateRoot(__DIR__);
3437
$drupalRoot = $drupalFinder->getDrupalRoot();

0 commit comments

Comments
 (0)