From fd0041fa3b24cc682cad607d9dbd1e33fa7bdffd Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Fri, 7 May 2021 07:35:37 +0200 Subject: [PATCH] Fix codestyle. --- resources/php_cs_fixer.config.php | 4 ++-- .../PhpCsFixerConfigsPhp/Config/YamlConfigSpec.php | 2 +- src/Config/Psr12.php | 5 +---- src/Config/YamlConfig.php | 9 --------- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/resources/php_cs_fixer.config.php b/resources/php_cs_fixer.config.php index bcd9919..5dc1224 100644 --- a/resources/php_cs_fixer.config.php +++ b/resources/php_cs_fixer.config.php @@ -2,6 +2,6 @@ declare(strict_types=1); -use drupol\PhpCsFixerConfigsPhp\Config\Php71; +use drupol\PhpCsFixerConfigsPhp\Config\Php73; -return Php71::create(); +return new Php73(); diff --git a/spec/drupol/PhpCsFixerConfigsPhp/Config/YamlConfigSpec.php b/spec/drupol/PhpCsFixerConfigsPhp/Config/YamlConfigSpec.php index e7762a6..b302749 100644 --- a/spec/drupol/PhpCsFixerConfigsPhp/Config/YamlConfigSpec.php +++ b/spec/drupol/PhpCsFixerConfigsPhp/Config/YamlConfigSpec.php @@ -22,7 +22,7 @@ public function it_can_import_yaml_files() ->getRules() ->shouldReturn( [ - '@PSR2' => true, + '@PSR12' => true, 'a' => true, 'b' => true, ] diff --git a/src/Config/Psr12.php b/src/Config/Psr12.php index 36a1722..afc8776 100644 --- a/src/Config/Psr12.php +++ b/src/Config/Psr12.php @@ -27,10 +27,7 @@ public function __construct() ); } - /** - * {@inheritdoc} - */ - public function getFinder() + public function getFinder(): iterable { return parent::getFinder() ->in(getcwd()) diff --git a/src/Config/YamlConfig.php b/src/Config/YamlConfig.php index 0302e6b..5f0d150 100644 --- a/src/Config/YamlConfig.php +++ b/src/Config/YamlConfig.php @@ -14,9 +14,6 @@ */ class YamlConfig extends Config implements PhpCsFixerConfigInterface { - /** - * {@inheritdoc} - */ public function withRulesFromConfig(...$configs): PhpCsFixerConfigInterface { $rules = array_reduce( @@ -36,9 +33,6 @@ static function (array $carry, ConfigInterface $config) { return $clone; } - /** - * {@inheritdoc} - */ public function withRulesFromYaml(...$filenames): PhpCsFixerConfigInterface { $rules = array_merge( @@ -55,9 +49,6 @@ public function withRulesFromYaml(...$filenames): PhpCsFixerConfigInterface return $clone; } - /** - * {@inheritdoc} - */ public function withRulesFromYamlOnly(...$filenames): PhpCsFixerConfigInterface { $rules = $this->getRulesFromFiles(...$filenames);