From d97e73ddf81239b9423ed29c12c98d3b8c517269 Mon Sep 17 00:00:00 2001 From: Hannes Bochmann Date: Mon, 6 Nov 2023 08:26:42 +0100 Subject: [PATCH] Cleanup fix cs --- Classes/Utility/ConfigurationUtility.php | 2 +- Classes/Utility/FilterUtility.php | 6 +++--- Classes/Utility/RulesUtility.php | 4 ++-- Tests/Classes/Utility/DebugUtilityTest.php | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Classes/Utility/ConfigurationUtility.php b/Classes/Utility/ConfigurationUtility.php index 49eed58..dd5b910 100644 --- a/Classes/Utility/ConfigurationUtility.php +++ b/Classes/Utility/ConfigurationUtility.php @@ -42,7 +42,7 @@ class ConfigurationUtility implements \TYPO3\CMS\Core\SingletonInterface /** * @var array */ - protected $extensionConfiguration = null; + protected $extensionConfiguration; /** * The extension configuration! diff --git a/Classes/Utility/FilterUtility.php b/Classes/Utility/FilterUtility.php index 31b681c..4503edc 100644 --- a/Classes/Utility/FilterUtility.php +++ b/Classes/Utility/FilterUtility.php @@ -143,9 +143,9 @@ protected function normalizeFilter($filter): int // @TODO: remove after dropping support for php 7.2 and add support for php 8 // @see https://wiki.php.net/rfc/deprecations_php_7_4#filter_sanitize_magic_quotes if ( - defined('FILTER_SANITIZE_MAGIC_QUOTES') && - constant('FILTER_SANITIZE_MAGIC_QUOTES') === $filter && - defined('FILTER_SANITIZE_ADD_SLASHES') + defined('FILTER_SANITIZE_MAGIC_QUOTES') + && constant('FILTER_SANITIZE_MAGIC_QUOTES') === $filter + && defined('FILTER_SANITIZE_ADD_SLASHES') ) { $filter = (int) constant('FILTER_SANITIZE_ADD_SLASHES'); } diff --git a/Classes/Utility/RulesUtility.php b/Classes/Utility/RulesUtility.php index 513a04c..d806bf2 100644 --- a/Classes/Utility/RulesUtility.php +++ b/Classes/Utility/RulesUtility.php @@ -107,8 +107,8 @@ private function getCommonRulesByName(array $rules, string $nameToSanitize): ?ar $commonRules = null; if (!( - isset($rules[Rules::COMMON_RULES_KEY]) && - isset($rules[Rules::COMMON_RULES_KEY][$nameToSanitize]) + isset($rules[Rules::COMMON_RULES_KEY]) + && isset($rules[Rules::COMMON_RULES_KEY][$nameToSanitize]) )) { return $commonRules; } diff --git a/Tests/Classes/Utility/DebugUtilityTest.php b/Tests/Classes/Utility/DebugUtilityTest.php index 108e1a2..c0a04fd 100644 --- a/Tests/Classes/Utility/DebugUtilityTest.php +++ b/Tests/Classes/Utility/DebugUtilityTest.php @@ -67,7 +67,7 @@ public function debugDoesNotEchoButDesctructDoes() ...[ $this->callback( function ($data) use ($debugs, &$echoDebugCall) { - $echoDebugCall = $echoDebugCall + 1; + ++$echoDebugCall; $this->assertSame( $debugs[$echoDebugCall][0], $data,