From c9bf118d49fcd8adc3f8390bf6113a9f26ee16c9 Mon Sep 17 00:00:00 2001 From: Hannes Bochmann Date: Mon, 8 Jan 2024 09:15:08 +0100 Subject: [PATCH] Cleanup fix cs --- Configuration/Backend/AjaxRoutes.php | 4 +-- Configuration/Backend/Modules.php | 4 +-- Configuration/Icons.php | 2 +- Configuration/TCA/Overrides/sys_template.php | 2 +- Configuration/TCA/Overrides/tt_content.php | 2 +- Tests/UnitTestsBootstrap.php | 38 ++++++++++---------- ext_localconf.php | 2 +- ext_tables.php | 10 +++--- 8 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Configuration/Backend/AjaxRoutes.php b/Configuration/Backend/AjaxRoutes.php index 8897b27..ff0483a 100644 --- a/Configuration/Backend/AjaxRoutes.php +++ b/Configuration/Backend/AjaxRoutes.php @@ -16,10 +16,10 @@ return [ 'blob_image' => [ 'path' => '/blob/image', - 'target' => \DMK\MkContentAi\Controller\AjaxController::class.'::blobImage', + 'target' => DMK\MkContentAi\Controller\AjaxController::class.'::blobImage', ], 'image_prompt' => [ 'path' => '/image/prompt', - 'target' => \DMK\MkContentAi\Controller\AiImageController::class.'::promptResultAjaxAction', + 'target' => DMK\MkContentAi\Controller\AiImageController::class.'::promptResultAjaxAction', ], ]; diff --git a/Configuration/Backend/Modules.php b/Configuration/Backend/Modules.php index 02ce565..eb00e9a 100644 --- a/Configuration/Backend/Modules.php +++ b/Configuration/Backend/Modules.php @@ -25,10 +25,10 @@ 'labels' => 'LLL:EXT:mkcontentai/Resources/Private/Language/locallang_contentai.xlf', 'extensionName' => 'Mkcontentai', 'controllerActions' => [ - \DMK\MkContentAi\Controller\AiImageController::class => [ + DMK\MkContentAi\Controller\AiImageController::class => [ 'filelist', 'variants', 'prompt', 'promptResult', 'saveFile', 'upscale', 'extend', 'cropAndExtend', ], - \DMK\MkContentAi\Controller\SettingsController::class => [ + DMK\MkContentAi\Controller\SettingsController::class => [ 'settings', ], ], diff --git a/Configuration/Icons.php b/Configuration/Icons.php index ce400bc..04b985f 100644 --- a/Configuration/Icons.php +++ b/Configuration/Icons.php @@ -15,7 +15,7 @@ return [ 'mkcontentai' => [ - 'provider' => \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class, + 'provider' => TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class, 'source' => 'EXT:mkcontentai/Resources/Public/Icons/Extension.svg', ], ]; diff --git a/Configuration/TCA/Overrides/sys_template.php b/Configuration/TCA/Overrides/sys_template.php index 4997d63..2bbac0f 100644 --- a/Configuration/TCA/Overrides/sys_template.php +++ b/Configuration/TCA/Overrides/sys_template.php @@ -15,4 +15,4 @@ defined('TYPO3') || exit; -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('mkcontentai', 'Configuration/TypoScript', 'DMK Content AI'); +TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('mkcontentai', 'Configuration/TypoScript', 'DMK Content AI'); diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php index 2874f98..cf926fc 100644 --- a/Configuration/TCA/Overrides/tt_content.php +++ b/Configuration/TCA/Overrides/tt_content.php @@ -13,4 +13,4 @@ * of the License, or any later version. */ -$GLOBALS['TCA']['tt_content']['columns']['image']['config']['customControls']['addHeader']['userFunc'] = \DMK\MkContentAi\User\InlineControl\ImageGenerationButton::class.'->render'; +$GLOBALS['TCA']['tt_content']['columns']['image']['config']['customControls']['addHeader']['userFunc'] = DMK\MkContentAi\User\InlineControl\ImageGenerationButton::class.'->render'; diff --git a/Tests/UnitTestsBootstrap.php b/Tests/UnitTestsBootstrap.php index 3ab40ff..d689af2 100644 --- a/Tests/UnitTestsBootstrap.php +++ b/Tests/UnitTestsBootstrap.php @@ -16,7 +16,7 @@ use TYPO3\CMS\Core\Information\Typo3Version; call_user_func(function () { - $testbase = new \TYPO3\TestingFramework\Core\Testbase(); + $testbase = new TYPO3\TestingFramework\Core\Testbase(); // These if's are for core testing (package typo3/cms) only. cms-composer-installer does // not create the autoload-include.php file that sets these env vars and sets composer @@ -34,42 +34,42 @@ $testbase->defineSitePath(); - $requestType = \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_BE | \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_CLI; - \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(0, $requestType); + $requestType = TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_BE | TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_CLI; + TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(0, $requestType); - $testbase->createDirectory(\TYPO3\CMS\Core\Core\Environment::getPublicPath().'/typo3conf/ext'); - $testbase->createDirectory(\TYPO3\CMS\Core\Core\Environment::getPublicPath().'/typo3temp/assets'); - $testbase->createDirectory(\TYPO3\CMS\Core\Core\Environment::getPublicPath().'/typo3temp/var/tests'); - $testbase->createDirectory(\TYPO3\CMS\Core\Core\Environment::getPublicPath().'/typo3temp/var/transient'); + $testbase->createDirectory(TYPO3\CMS\Core\Core\Environment::getPublicPath().'/typo3conf/ext'); + $testbase->createDirectory(TYPO3\CMS\Core\Core\Environment::getPublicPath().'/typo3temp/assets'); + $testbase->createDirectory(TYPO3\CMS\Core\Core\Environment::getPublicPath().'/typo3temp/var/tests'); + $testbase->createDirectory(TYPO3\CMS\Core\Core\Environment::getPublicPath().'/typo3temp/var/transient'); // Retrieve an instance of class loader and inject to core bootstrap $classLoader = require $testbase->getPackagesPath().'/autoload.php'; - \TYPO3\CMS\Core\Core\Bootstrap::initializeClassLoader($classLoader); + TYPO3\CMS\Core\Core\Bootstrap::initializeClassLoader($classLoader); // Initialize default TYPO3_CONF_VARS - $configurationManager = new \TYPO3\CMS\Core\Configuration\ConfigurationManager(); + $configurationManager = new TYPO3\CMS\Core\Configuration\ConfigurationManager(); $GLOBALS['TYPO3_CONF_VARS'] = $configurationManager->getDefaultConfiguration(); - $cache = new \TYPO3\CMS\Core\Cache\Frontend\PhpFrontend( + $cache = new TYPO3\CMS\Core\Cache\Frontend\PhpFrontend( 'core', - new \TYPO3\CMS\Core\Cache\Backend\NullBackend('production', []) + new TYPO3\CMS\Core\Cache\Backend\NullBackend('production', []) ); // Set all packages to active if (version_compare((new Typo3Version())->getVersion(), '11.3.0', '>')) { - $packageManager = \TYPO3\CMS\Core\Core\Bootstrap::createPackageManager( - \TYPO3\CMS\Core\Package\UnitTestPackageManager::class, - \TYPO3\CMS\Core\Core\Bootstrap::createPackageCache($cache) + $packageManager = TYPO3\CMS\Core\Core\Bootstrap::createPackageManager( + TYPO3\CMS\Core\Package\UnitTestPackageManager::class, + TYPO3\CMS\Core\Core\Bootstrap::createPackageCache($cache) ); } else { - $packageManager = \TYPO3\CMS\Core\Core\Bootstrap::createPackageManager( - \TYPO3\CMS\Core\Package\UnitTestPackageManager::class, + $packageManager = TYPO3\CMS\Core\Core\Bootstrap::createPackageManager( + TYPO3\CMS\Core\Package\UnitTestPackageManager::class, $cache ); } - \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance(\TYPO3\CMS\Core\Package\PackageManager::class, $packageManager); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::setPackageManager($packageManager); + TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance(TYPO3\CMS\Core\Package\PackageManager::class, $packageManager); + TYPO3\CMS\Core\Utility\ExtensionManagementUtility::setPackageManager($packageManager); $testbase->dumpClassLoadingInformation(); - \TYPO3\CMS\Core\Utility\GeneralUtility::purgeInstances(); + TYPO3\CMS\Core\Utility\GeneralUtility::purgeInstances(); }); diff --git a/ext_localconf.php b/ext_localconf.php index 57c5951..acd5395 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -21,4 +21,4 @@ = ButtonBarHook::class.'->getButtons'; $GLOBALS['TYPO3_CONF_VARS']['BE']['ContextMenu']['ItemProviders'][1697195476] = - \DMK\MkContentAi\ContextMenu\ContentAiItemProvider::class; + DMK\MkContentAi\ContextMenu\ContentAiItemProvider::class; diff --git a/ext_tables.php b/ext_tables.php index 635e2c2..b2beecc 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -16,14 +16,14 @@ defined('TYPO3') or exit; (static function () { - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( + TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( 'Mkcontentai', 'system', 'contentai', '', [ - \DMK\MkContentAi\Controller\AiImageController::class => 'filelist, variants, prompt, promptResult, saveFile, upscale, extend, cropAndExtend', - \DMK\MkContentAi\Controller\SettingsController::class => 'settings', + DMK\MkContentAi\Controller\AiImageController::class => 'filelist, variants, prompt, promptResult, saveFile, upscale, extend, cropAndExtend', + DMK\MkContentAi\Controller\SettingsController::class => 'settings', ], [ 'access' => 'user,group', @@ -32,6 +32,6 @@ ] ); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_mkcontentai_domain_model_image', 'EXT:mkcontentai/Resources/Private/Language/locallang_csh_tx_mkcontentai_domain_model_image.xlf'); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_mkcontentai_domain_model_image'); + TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_mkcontentai_domain_model_image', 'EXT:mkcontentai/Resources/Private/Language/locallang_csh_tx_mkcontentai_domain_model_image.xlf'); + TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_mkcontentai_domain_model_image'); })();