From 1d9bed328b1bf96f5ef66b3eb25bf3e277d0d6bc Mon Sep 17 00:00:00 2001 From: Christian Kuhn Date: Mon, 18 Sep 2023 14:33:54 +0200 Subject: [PATCH] [TASK] Require friendsofphp/php-cs-fixer:^3.27 (#432) Nightly got red. Raise php-cs-fixer, update ruleset and apply cgl fixes. > composer req --dev friendsofphp/php-cs-fixer:^3.27 > Build/Scripts/runTests.sh -p 8.1 -s cgl --- Build/php-cs-fixer/config.php | 2 +- Classes/Controller/BackendController.php | 3 +-- Classes/Exception.php | 4 +--- Classes/TcaDataGenerator/Exception.php | 4 +--- Classes/TcaDataGenerator/GeneratorNotFoundException.php | 4 +--- composer.json | 2 +- 6 files changed, 6 insertions(+), 13 deletions(-) diff --git a/Build/php-cs-fixer/config.php b/Build/php-cs-fixer/config.php index ae26a405..4b6fa8be 100644 --- a/Build/php-cs-fixer/config.php +++ b/Build/php-cs-fixer/config.php @@ -29,7 +29,7 @@ 'declare_parentheses' => true, 'dir_constant' => true, 'function_to_constant' => ['functions' => ['get_called_class', 'get_class', 'get_class_this', 'php_sapi_name', 'phpversion', 'pi']], - 'function_typehint_space' => true, + 'type_declaration_spaces' => true, 'lowercase_cast' => true, 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], 'modernize_strpos' => true, diff --git a/Classes/Controller/BackendController.php b/Classes/Controller/BackendController.php index c8a13b90..3d11518c 100755 --- a/Classes/Controller/BackendController.php +++ b/Classes/Controller/BackendController.php @@ -80,8 +80,7 @@ public function __construct( private readonly ModuleTemplateFactory $moduleTemplateFactory, private readonly PageRenderer $pageRenderer, private readonly FlashMessageService $flashMessageService, - ) { - } + ) {} /** * Main entry point dispatcher diff --git a/Classes/Exception.php b/Classes/Exception.php index f2067d9a..f135b2bc 100644 --- a/Classes/Exception.php +++ b/Classes/Exception.php @@ -20,6 +20,4 @@ /** * General styleguide exception */ -class Exception extends \Exception -{ -} +class Exception extends \Exception {} diff --git a/Classes/TcaDataGenerator/Exception.php b/Classes/TcaDataGenerator/Exception.php index f95af0e1..98f17d54 100644 --- a/Classes/TcaDataGenerator/Exception.php +++ b/Classes/TcaDataGenerator/Exception.php @@ -20,6 +20,4 @@ /** * TcaDataGenerator exception */ -class Exception extends \TYPO3\CMS\Styleguide\Exception -{ -} +class Exception extends \TYPO3\CMS\Styleguide\Exception {} diff --git a/Classes/TcaDataGenerator/GeneratorNotFoundException.php b/Classes/TcaDataGenerator/GeneratorNotFoundException.php index 3d1407a7..3800d505 100644 --- a/Classes/TcaDataGenerator/GeneratorNotFoundException.php +++ b/Classes/TcaDataGenerator/GeneratorNotFoundException.php @@ -20,6 +20,4 @@ /** * Exception thrown if FieldGenerator does not find a class */ -class GeneratorNotFoundException extends Exception -{ -} +class GeneratorNotFoundException extends Exception {} diff --git a/composer.json b/composer.json index 719f7552..590d6bf3 100644 --- a/composer.json +++ b/composer.json @@ -44,7 +44,7 @@ "codeception/module-asserts": "^3.0", "codeception/module-cli": "^2.0", "codeception/module-webdriver": "^4.0", - "friendsofphp/php-cs-fixer": "^3.16.0", + "friendsofphp/php-cs-fixer": "^3.27", "phpstan/phpstan": "^1.10.14", "typo3/cms-core": "~12.4@dev", "typo3/cms-frontend": "~12.4@dev",