Skip to content

Commit

Permalink
Force strict type.
Browse files Browse the repository at this point in the history
  • Loading branch information
tannguyen04 committed Apr 24, 2024
1 parent 1dc4718 commit 0847c74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<rule ref="DrupalPractice"/>
<rule ref="Generic.Debug.ESLint"/>
<rule ref="PHPCompatibility"/>
<rule ref="Generic.PHP.RequireStrictTypes" />

<arg name="extensions" value="inc,info,install,module,php,profile,test,theme,js,css"/>
<arg name="colors"/>
Expand Down
3 changes: 3 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use DrupalRector\Set\Drupal9SetList;
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\SetList;
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->sets([
Expand All @@ -29,6 +30,8 @@
Drupal10SetList::DRUPAL_10,
]);

$rectorConfig->rule(DeclareStrictTypesRector::class);

$drupalFinder = new DrupalFinder();
$drupalFinder->locateRoot(__DIR__);
$drupalRoot = $drupalFinder->getDrupalRoot();
Expand Down

0 comments on commit 0847c74

Please sign in to comment.