From 0847c74f47d031744aa3db0669217121a5423159 Mon Sep 17 00:00:00 2001 From: "tan.nguyen" Date: Wed, 24 Apr 2024 11:51:47 +0700 Subject: [PATCH] Force strict type. --- phpcs.xml | 1 + rector.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/phpcs.xml b/phpcs.xml index 0a9db16..7504f48 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -9,6 +9,7 @@ + diff --git a/rector.php b/rector.php index e5b0070..304ebc2 100644 --- a/rector.php +++ b/rector.php @@ -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([ @@ -29,6 +30,8 @@ Drupal10SetList::DRUPAL_10, ]); + $rectorConfig->rule(DeclareStrictTypesRector::class); + $drupalFinder = new DrupalFinder(); $drupalFinder->locateRoot(__DIR__); $drupalRoot = $drupalFinder->getDrupalRoot();