From 64d4236a322e0dc20e7d98bbfc96e882bf892752 Mon Sep 17 00:00:00 2001 From: Alexander Stehlik Date: Wed, 20 Dec 2023 11:31:45 +0100 Subject: [PATCH] [CLEANUP] Fix code style errors --- Classes/Exception/MediaException.php | 4 +--- Configuration/Services.php | 2 +- Configuration/TCA/tx_html5mediakit_domain_model_media.php | 4 ++-- Tests/Unit/ViewHelpers/VideoViewHelperTest.php | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Classes/Exception/MediaException.php b/Classes/Exception/MediaException.php index b2680dc2..73cf1fd5 100644 --- a/Classes/Exception/MediaException.php +++ b/Classes/Exception/MediaException.php @@ -21,6 +21,4 @@ * * @codeCoverageIgnore No code to test. */ -class MediaException extends RuntimeException -{ -} +class MediaException extends RuntimeException {} diff --git a/Configuration/Services.php b/Configuration/Services.php index c09ffac9..19b57652 100644 --- a/Configuration/Services.php +++ b/Configuration/Services.php @@ -4,7 +4,7 @@ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; -return function (ContainerConfigurator $configurator): void { +return static function (ContainerConfigurator $configurator): void { $configurator->services() ->defaults()->autowire()->autoconfigure()->public() diff --git a/Configuration/TCA/tx_html5mediakit_domain_model_media.php b/Configuration/TCA/tx_html5mediakit_domain_model_media.php index 597a517c..4c25d71c 100644 --- a/Configuration/TCA/tx_html5mediakit_domain_model_media.php +++ b/Configuration/TCA/tx_html5mediakit_domain_model_media.php @@ -10,8 +10,8 @@ $languagePrefixCsh = 'LLL:EXT:html5mediakit/Resources/Private/Language/locallang_csh_media.xlf:'; $lllAddImageFileReference = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'; -$buildFileFieldConfig = function ( - string|array $allowedFileTypes, +$buildFileFieldConfig = static function ( + array|string $allowedFileTypes, int $maxitems = 1, string $showitem = '', string $createNewRelationLinkTitle = '', diff --git a/Tests/Unit/ViewHelpers/VideoViewHelperTest.php b/Tests/Unit/ViewHelpers/VideoViewHelperTest.php index ed479162..771ffd96 100644 --- a/Tests/Unit/ViewHelpers/VideoViewHelperTest.php +++ b/Tests/Unit/ViewHelpers/VideoViewHelperTest.php @@ -47,7 +47,7 @@ private function assertRenderResult(string $expectedResult, ?Video $video = null { $this->arguments['video'] = $video ?: new Video(); - $renderChildrenClosure = function () { + $renderChildrenClosure = static function () { return 'children'; };