From 8ed22190de0d24c0ed80aa8ea05cc5817e3bfaf6 Mon Sep 17 00:00:00 2001 From: jschwind Date: Mon, 18 Nov 2024 18:24:29 +0100 Subject: [PATCH] .editorconfig added (#3) --- .editorconfig | 23 +++++++++++++++++++++++ rector.php | 5 ++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..867b3c5 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,23 @@ +# This is the top-most .editorconfig file; do not search in parent directories. +root = true + +# All files. +[*] +end_of_line = lf +indent_style = space +indent_size = 4 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[*.json] +indent_size = 2 + +[composer.json] +indent_size = 4 + +[config-schema.json] +indent_size = 4 diff --git a/rector.php b/rector.php index 6b5c5f2..a589b98 100644 --- a/rector.php +++ b/rector.php @@ -6,6 +6,7 @@ use Rector\Config\RectorConfig; use Rector\Set\ValueObject\LevelSetList; use Rector\Symfony\Set\SymfonySetList; +use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector; return static function (RectorConfig $rectorConfig): void { $rectorConfig->paths([ @@ -15,6 +16,8 @@ $rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class); + $rectorConfig->rule(DeclareStrictTypesRector::class); + // define sets of rules $rectorConfig->sets([ SymfonySetList::SYMFONY_71, @@ -22,4 +25,4 @@ SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION, LevelSetList::UP_TO_PHP_82 ]); -}; \ No newline at end of file +};