From f3e274438d802c0d0304e1b058e625bbba9f3008 Mon Sep 17 00:00:00 2001
From: Nikita Hovratov <nikita.h@live.de>
Date: Thu, 16 Jul 2020 18:10:43 +0200
Subject: [PATCH] [TASK] Introduce and run php-cs-fixer

Command: .Build/bin/php-cs-fixer fix --config Build/.php_cs
---
 .gitignore                                    |   1 +
 Build/.php_cs                                 | 100 ++++++++++++++++++
 Classes/Backend/BackendLayoutView.php         |   1 +
 Classes/CodeGenerator/HtmlCodeGenerator.php   |  13 ++-
 Classes/CodeGenerator/SqlCodeGenerator.php    |   4 +-
 Classes/CodeGenerator/TcaCodeGenerator.php    |   7 +-
 .../CodeGenerator/TyposcriptCodeGenerator.php |  25 +++--
 .../Controller/WizardContentController.php    |  21 +---
 Classes/Controller/WizardController.php       |  30 ++----
 Classes/Controller/WizardPageController.php   |  19 +---
 Classes/Domain/Model/BackendLayout.php        |   6 +-
 Classes/Domain/Model/Content.php              |  10 +-
 Classes/Domain/Model/Page.php                 |  25 ++---
 .../Repository/BackendLayoutRepository.php    |   9 +-
 .../Domain/Repository/ContentRepository.php   |   5 +-
 Classes/Domain/Repository/IconRepository.php  |   4 +-
 Classes/Domain/Repository/PageRepository.php  |   6 +-
 .../Domain/Repository/StorageRepository.php   |  36 ++++---
 Classes/Domain/Service/SettingsService.php    |   1 +
 .../MaskFunctionsProvider.php                 |  10 +-
 Classes/Fluid/FluidTemplateContentObject.php  |   1 +
 Classes/Helper/FieldHelper.php                |   2 +-
 Classes/Helper/InlineHelper.php               |  13 ++-
 Classes/Hooks/PageLayoutViewDrawItem.php      |   3 +-
 Classes/Hooks/PageLayoutViewHook.php          |   1 +
 .../ContentElementIconProvider.php            |  32 +++---
 Classes/ItemsProcFuncs/AbstractList.php       |   3 +-
 Classes/ItemsProcFuncs/CTypeList.php          |  17 ++-
 Classes/ItemsProcFuncs/ColPosList.php         |   1 +
 Classes/Utility/GeneralUtility.php            |   4 +-
 Classes/ViewHelpers/CTypesViewHelper.php      |   5 +-
 .../ConfigureExtensionViewHelper.php          |   5 +-
 Classes/ViewHelpers/ContentViewHelper.php     |   4 +-
 Classes/ViewHelpers/EditLinkViewHelper.php    |   3 +-
 .../ViewHelpers/ElementCountViewHelper.php    |   5 +-
 Classes/ViewHelpers/EvalViewHelper.php        |   7 +-
 Classes/ViewHelpers/FormTypeViewHelper.php    |   5 +-
 Classes/ViewHelpers/ItemsViewHelper.php       |   5 +-
 Classes/ViewHelpers/LabelViewHelper.php       |   5 +-
 Classes/ViewHelpers/LinkViewHelper.php        |  11 +-
 Classes/ViewHelpers/LinkoptionViewHelper.php  |   5 +-
 Classes/ViewHelpers/MultiuseViewHelper.php    |   5 +-
 Classes/ViewHelpers/ShuttleViewHelper.php     |   5 +-
 Classes/ViewHelpers/SubstrViewHelper.php      |   7 +-
 Classes/ViewHelpers/TcaViewHelper.php         |   5 +-
 .../ViewHelpers/TranslateLabelViewHelper.php  |   6 +-
 Configuration/Backend/AjaxRoutes.php          |   1 +
 Configuration/ExpressionLanguage.php          |   3 +-
 Configuration/Extbase/Persistence/Classes.php |   1 +
 .../CodeGenerator/TcaCodeGeneratorTest.php    |   2 +-
 Tests/Unit/GeneralUtilityTest.php             |   3 +-
 composer.json                                 |   3 +-
 ext_emconf.php                                |   1 +
 53 files changed, 274 insertions(+), 238 deletions(-)
 create mode 100644 Build/.php_cs

diff --git a/.gitignore b/.gitignore
index 742018ec..0f66ee5f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
 composer.lock
 var/
 Build/testing-docker/.env
+.php_cs.cache
diff --git a/Build/.php_cs b/Build/.php_cs
new file mode 100644
index 00000000..744a4cac
--- /dev/null
+++ b/Build/.php_cs
@@ -0,0 +1,100 @@
+<?php
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+/**
+ * This file represents the configuration for Code Sniffing PSR-2-related
+ * automatic checks of coding guidelines
+ * Install @fabpot's great php-cs-fixer tool via
+ *
+ *  $ composer global require friendsofphp/php-cs-fixer
+ *
+ * And then simply run
+ *
+ *  $ ./bin/php-cs-fixer fix --config ./Build/.php_cs
+ *
+ * inside the TYPO3 directory. Warning: This may take up to 10 minutes.
+ *
+ * For more information read:
+ * 	 https://www.php-fig.org/psr/psr-2/
+ * 	 https://cs.sensiolabs.org
+ */
+if (PHP_SAPI !== 'cli') {
+    die('This script supports command line usage only. Please check your command.');
+}
+// Define in which folders to search and which folders to exclude
+// Exclude some directories that are excluded by Git anyways to speed up the sniffing
+$finder = PhpCsFixer\Finder::create()
+    ->in(__DIR__ . '/../');
+
+// Return a Code Sniffing configuration using
+// all sniffers needed for PSR-2
+// and additionally:
+//  - Remove leading slashes in use clauses.
+//  - PHP single-line arrays should not have trailing comma.
+//  - Single-line whitespace before closing semicolon are prohibited.
+//  - Remove unused use statements in the PHP source code
+//  - Ensure Concatenation to have at least one whitespace around
+//  - Remove trailing whitespace at the end of blank lines.
+return PhpCsFixer\Config::create()
+    ->setRiskyAllowed(true)
+    ->setRules([
+        '@DoctrineAnnotation' => true,
+        '@PSR2' => true,
+        'array_syntax' => ['syntax' => 'short'],
+        'blank_line_after_opening_tag' => true,
+        'braces' => ['allow_single_line_closure' => true],
+        'cast_spaces' => ['space' => 'none'],
+        'compact_nullable_typehint' => true,
+        'concat_space' => ['spacing' => 'one'],
+        'declare_equal_normalize' => ['space' => 'none'],
+        'dir_constant' => true,
+        'function_typehint_space' => true,
+        'hash_to_slash_comment' => true,
+        'lowercase_cast' => true,
+        'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
+        'modernize_types_casting' => true,
+        'native_function_casing' => true,
+        'new_with_braces' => true,
+        'no_alias_functions' => true,
+        'no_blank_lines_after_phpdoc' => true,
+        'no_empty_phpdoc' => true,
+        'no_empty_statement' => true,
+        'no_extra_consecutive_blank_lines' => true,
+        'no_leading_import_slash' => true,
+        'no_leading_namespace_whitespace' => true,
+        'no_null_property_initialization' => true,
+        'no_short_bool_cast' => true,
+        'no_singleline_whitespace_before_semicolons' => true,
+        'no_superfluous_elseif' => true,
+        'no_trailing_comma_in_singleline_array' => true,
+        'no_unneeded_control_parentheses' => true,
+        'no_unused_imports' => true,
+        'no_useless_else' => true,
+        'no_whitespace_in_blank_line' => true,
+        'ordered_imports' => true,
+        'php_unit_construct' => ['assertEquals', 'assertSame', 'assertNotEquals', 'assertNotSame'],
+        'php_unit_mock_short_will_return' => true,
+        'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
+        'phpdoc_no_access' => true,
+        'phpdoc_no_empty_return' => true,
+        'phpdoc_no_package' => true,
+        'phpdoc_scalar' => true,
+        'phpdoc_trim' => true,
+        'phpdoc_types' => true,
+        'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
+        'return_type_declaration' => ['space_before' => 'none'],
+        'single_quote' => true,
+        'single_trait_insert_per_statement' => true,
+        'whitespace_after_comma_in_array' => true,
+    ])
+    ->setFinder($finder);
diff --git a/Classes/Backend/BackendLayoutView.php b/Classes/Backend/BackendLayoutView.php
index 87afde2b..b59395b7 100644
--- a/Classes/Backend/BackendLayoutView.php
+++ b/Classes/Backend/BackendLayoutView.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\Backend;
diff --git a/Classes/CodeGenerator/HtmlCodeGenerator.php b/Classes/CodeGenerator/HtmlCodeGenerator.php
index ff52f678..4aac0b4e 100644
--- a/Classes/CodeGenerator/HtmlCodeGenerator.php
+++ b/Classes/CodeGenerator/HtmlCodeGenerator.php
@@ -1,4 +1,6 @@
-<?php namespace MASK\Mask\CodeGenerator;
+<?php
+
+namespace MASK\Mask\CodeGenerator;
 
 /* * *************************************************************
  *  Copyright notice
@@ -55,7 +57,6 @@ public function __construct(StorageRepository $storageRepository)
      * @param string $table
      * @return string $html
      * @author Gernot Ploiner <gp@webprofil.at>
-     *
      */
     public function generateHtml($key, $table): string
     {
@@ -122,8 +123,12 @@ protected function generateFieldHtml($fieldKey, $elementKey, $table, $datafield
                 $inlineFields = $this->storageRepository->loadInlineFields($fieldKey);
                 if ($inlineFields) {
                     foreach ($inlineFields as $inlineField) {
-                        $html .= $this->generateFieldHtml($inlineField['maskKey'], $elementKey, $fieldKey,
-                                $datafield . '_item') . "\n";
+                        $html .= $this->generateFieldHtml(
+                            $inlineField['maskKey'],
+                            $elementKey,
+                            $fieldKey,
+                            $datafield . '_item'
+                        ) . "\n";
                     }
                 }
                 $html .= "</li>\n</f:for>" . "\n";
diff --git a/Classes/CodeGenerator/SqlCodeGenerator.php b/Classes/CodeGenerator/SqlCodeGenerator.php
index 20ba3350..82fbfa2d 100644
--- a/Classes/CodeGenerator/SqlCodeGenerator.php
+++ b/Classes/CodeGenerator/SqlCodeGenerator.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\CodeGenerator;
@@ -29,13 +30,13 @@
 
 use Doctrine\DBAL\DBALException;
 use Doctrine\DBAL\Schema\SchemaException;
+use MASK\Mask\Domain\Repository\StorageRepository;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Database\Event\AlterTableDefinitionStatementsEvent;
 use TYPO3\CMS\Core\Database\Schema\Exception\StatementException;
 use TYPO3\CMS\Core\Database\Schema\Exception\UnexpectedSignalReturnValueTypeException;
 use TYPO3\CMS\Core\Database\Schema\SchemaMigrator;
 use TYPO3\CMS\Core\Database\Schema\SqlReader;
-use MASK\Mask\Domain\Repository\StorageRepository;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -205,7 +206,6 @@ public function getSqlByConfiguration($json): array
      * Adds the SQL for all elements to the psr-14 AlterTableDefinitionStatementsEvent event.
      *
      * @param AlterTableDefinitionStatementsEvent $event
-     * @return void
      */
     public function addDatabaseTablesDefinition(AlterTableDefinitionStatementsEvent $event): void
     {
diff --git a/Classes/CodeGenerator/TcaCodeGenerator.php b/Classes/CodeGenerator/TcaCodeGenerator.php
index 821d436e..5f713312 100644
--- a/Classes/CodeGenerator/TcaCodeGenerator.php
+++ b/Classes/CodeGenerator/TcaCodeGenerator.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\CodeGenerator;
@@ -29,10 +30,10 @@
 
 use Exception;
 use MASK\Mask\Domain\Repository\StorageRepository;
+use MASK\Mask\Helper\FieldHelper;
 use MASK\Mask\Utility\GeneralUtility as MaskUtility;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
-use MASK\Mask\Helper\FieldHelper;
 
 /**
  * Generates all the tca needed for mask content elements
@@ -287,14 +288,14 @@ public function generateFieldsTca($table): array
                 if ($tcavalue['config']['range']['upper'] ?? false) {
                     $date = \DateTime::createFromFormat($format, $tcavalue['config']['range']['upper']);
                     if ($dbType == 'date') {
-                        $date->setTime(0,0);
+                        $date->setTime(0, 0);
                     }
                     $tcavalue['config']['range']['upper'] = $date->getTimestamp();
                 }
                 if ($tcavalue['config']['range']['lower'] ?? false) {
                     $date = \DateTime::createFromFormat($format, $tcavalue['config']['range']['lower']);
                     if ($dbType == 'date') {
-                        $date->setTime(0,0);
+                        $date->setTime(0, 0);
                     }
                     $tcavalue['config']['range']['lower'] = $date->getTimestamp();
                 }
diff --git a/Classes/CodeGenerator/TyposcriptCodeGenerator.php b/Classes/CodeGenerator/TyposcriptCodeGenerator.php
index b09923aa..d1dc1212 100644
--- a/Classes/CodeGenerator/TyposcriptCodeGenerator.php
+++ b/Classes/CodeGenerator/TyposcriptCodeGenerator.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\CodeGenerator;
@@ -30,10 +31,10 @@
 use MASK\Mask\Domain\Model\BackendLayout;
 use MASK\Mask\Domain\Repository\StorageRepository;
 use MASK\Mask\Domain\Service\SettingsService;
+use MASK\Mask\Imaging\IconProvider\ContentElementIconProvider;
 use MASK\Mask\Utility\GeneralUtility as MaskUtility;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Imaging\IconRegistry;
-use MASK\Mask\Imaging\IconProvider\ContentElementIconProvider;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
  * Generates all the typoscript needed for mask content elements
@@ -84,7 +85,9 @@ public function generateTsConfig(): string
             // Register icons for contentelements
             $iconIdentifier = 'mask-ce-' . $element['key'];
             $iconRegistry->registerIcon(
-                $iconIdentifier, ContentElementIconProvider::class, [
+                $iconIdentifier,
+                ContentElementIconProvider::class,
+                [
                     'contentElementKey' => $element['key']
                 ]
             );
@@ -201,7 +204,7 @@ public function generateSetupTyposcript(): string
                     $templateName = MaskUtility::getTemplatePath($this->extSettings, $element['key'], true);
                     $elementContent = [];
                     $elementContent[] = 'tt_content.mask_' . $element['key'] . ' =< lib.maskContentElement' . LF;
-                    $elementContent[] = 'tt_content.mask_' . $element['key'] . " {" . LF;
+                    $elementContent[] = 'tt_content.mask_' . $element['key'] . ' {' . LF;
                     $elementContent[] = "\t" . 'templateName = ' . $templateName . LF;
                     $elementContent[] = '}' . LF . LF;
                     $setupContent[] = implode('', $elementContent);
@@ -217,8 +220,8 @@ public function generateSetupTyposcript(): string
      *
      * @param array $typoScriptArray The array to convert to string
      * @param string $addKey Prefix given values with given key (eg. lib.whatever = {...})
-     * @param integer $tab Internal
-     * @param boolean $init Internal
+     * @param int $tab Internal
+     * @param bool $init Internal
      * @return string TypoScript
      */
     protected function convertArrayToTypoScript(array $typoScriptArray, $addKey = '', $tab = 0, $init = true): string
@@ -236,9 +239,13 @@ protected function convertArrayToTypoScript(array $typoScriptArray, $addKey = ''
                 if (strpos($value, "\n") === false) {
                     $typoScript .= str_repeat("\t", ($tab === 0) ? $tab : $tab - 1) . "$key = $value\n";
                 } else {
-                    $typoScript .= str_repeat("\t",
-                            ($tab === 0) ? $tab : $tab - 1) . "$key (\n$value\n" . str_repeat("\t",
-                            ($tab === 0) ? $tab : $tab - 1) . ")\n";
+                    $typoScript .= str_repeat(
+                        "\t",
+                        ($tab === 0) ? $tab : $tab - 1
+                    ) . "$key (\n$value\n" . str_repeat(
+                        "\t",
+                        ($tab === 0) ? $tab : $tab - 1
+                    ) . ")\n";
                 }
             } else {
                 $typoScript .= $this->convertArrayToTypoScript($value, $key, $tab, false);
diff --git a/Classes/Controller/WizardContentController.php b/Classes/Controller/WizardContentController.php
index 293e7d18..4b511b26 100755
--- a/Classes/Controller/WizardContentController.php
+++ b/Classes/Controller/WizardContentController.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\Controller;
@@ -33,11 +34,7 @@
 use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
 
 /**
- *
- *
- * @package mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
- *
  */
 class WizardContentController extends WizardController
 {
@@ -58,8 +55,6 @@ public function injectIconRepository(IconRepository $iconRepository)
 
     /**
      * action list
-     *
-     * @return void
      */
     public function listAction(): void
     {
@@ -70,8 +65,6 @@ public function listAction(): void
 
     /**
      * action new
-     *
-     * @return void
      */
     public function newAction(): void
     {
@@ -83,7 +76,6 @@ public function newAction(): void
      * action create
      *
      * @param array $storage
-     * @return void
      * @throws StopActionException
      */
     public function createAction($storage): void
@@ -101,7 +93,6 @@ public function createAction($storage): void
      *
      * @param string $type
      * @param string $key
-     * @return void
      */
     public function editAction($type, $key): void
     {
@@ -117,7 +108,6 @@ public function editAction($type, $key): void
      * action update
      *
      * @param array $storage
-     * @return void
      * @throws StopActionException
      */
     public function updateAction($storage): void
@@ -135,7 +125,6 @@ public function updateAction($storage): void
      *
      * @param string $key
      * @param string $type
-     * @return void
      * @throws StopActionException
      */
     public function deleteAction($key, $type): void
@@ -151,7 +140,6 @@ public function deleteAction($key, $type): void
      *
      * @param string $key
      * @param string $type
-     * @return void
      * @throws StopActionException
      */
     public function purgeAction($key, $type): void
@@ -167,7 +155,6 @@ public function purgeAction($key, $type): void
      * action hide
      *
      * @param string $key
-     * @return void
      * @throws StopActionException
      */
     public function hideAction($key): void
@@ -175,14 +162,13 @@ public function hideAction($key): void
         $this->storageRepository->hide('tt_content', $key);
         $this->generateAction();
         $this->addFlashMessage(LocalizationUtility::translate('tx_mask.content.hiddencontentelement', 'mask'));
-        $this->redirect('list','Wizard');
+        $this->redirect('list', 'Wizard');
     }
 
     /**
      * action activate
      *
      * @param string $key
-     * @return void
      * @throws StopActionException
      */
     public function activateAction($key): void
@@ -190,7 +176,7 @@ public function activateAction($key): void
         $this->storageRepository->activate('tt_content', $key);
         $this->generateAction();
         $this->addFlashMessage(LocalizationUtility::translate('tx_mask.content.activatedcontentelement', 'mask'));
-        $this->redirect('list','Wizard');
+        $this->redirect('list', 'Wizard');
     }
 
     /**
@@ -224,5 +210,4 @@ protected function createHtmlAction($key): void
         $this->saveHtml($key, $html);
         $this->redirect('list', 'Wizard');
     }
-
 }
diff --git a/Classes/Controller/WizardController.php b/Classes/Controller/WizardController.php
index 005cc475..702706ac 100755
--- a/Classes/Controller/WizardController.php
+++ b/Classes/Controller/WizardController.php
@@ -46,11 +46,7 @@
 use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
 
 /**
- *
- *
- * @package mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
- *
  */
 class WizardController extends ActionController
 {
@@ -161,12 +157,12 @@ public function generateAction(): void
     protected function prepareStorage(&$storage): void
     {
         // Fill storage with additional data before assigning to view
-        if ($storage["tca"]) {
-            foreach ($storage["tca"] as $key => $field) {
+        if ($storage['tca']) {
+            foreach ($storage['tca'] as $key => $field) {
                 if (is_array($field)) {
-                    if ($field["config"]["type"] == "inline") {
-                        $storage["tca"][$key]["inlineFields"] = $this->storageRepository->loadInlineFields($key);
-                        $this->sortInlineFieldsByOrder($storage["tca"][$key]["inlineFields"]);
+                    if ($field['config']['type'] == 'inline') {
+                        $storage['tca'][$key]['inlineFields'] = $this->storageRepository->loadInlineFields($key);
+                        $this->sortInlineFieldsByOrder($storage['tca'][$key]['inlineFields']);
                     }
                 }
                 // Convert old date format Y-m-d to d-m-Y
@@ -175,10 +171,10 @@ protected function prepareStorage(&$storage): void
                     $format = ($dbType == 'date') ? 'd-m-Y' : 'H:i d-m-Y';
                     $lower = $field['config']['range']['lower'] ?? false;
                     $upper = $field['config']['range']['upper'] ?? false;
-                    if ($lower && (bool)preg_match("/^[0-9]{4}]/", $lower)) {
+                    if ($lower && (bool)preg_match('/^[0-9]{4}]/', $lower)) {
                         $storage['tca'][$key]['config']['range']['lower'] = (new \DateTime($lower))->format($format);
                     }
-                    if ($upper && (bool)preg_match("/^[0-9]{4}]/", $upper)) {
+                    if ($upper && (bool)preg_match('/^[0-9]{4}]/', $upper)) {
                         $storage['tca'][$key]['config']['range']['upper'] = (new \DateTime($upper))->format($format);
                     }
                 }
@@ -209,7 +205,7 @@ protected function showHtmlAction($key, $table): void
      */
     protected function saveHtml($key, $html): bool
     {
-        # fallback to prevent breaking change
+        // fallback to prevent breaking change
         $path = MaskUtility::getTemplatePath($this->extSettings, $key);
         if (file_exists($path)) {
             return false;
@@ -287,7 +283,6 @@ protected function redirectByAction(): void
     /**
      * Check, if folders from extensionmanager-settings are existing
      *
-     * @return void
      * @author Gernot Ploiner <gp@webprofil.at>
      */
     protected function checkFolders(): void
@@ -360,7 +355,6 @@ protected function createFile($path): bool
     /**
      * @param string $path
      * @param string $translationKey
-     * @return void
      */
     protected function checkFolder($path, $translationKey = 'tx_mask.all.error.missingjson'): void
     {
@@ -391,9 +385,9 @@ function ($columnA, $columnB) {
         );
 
         foreach ($inlineFields as $i => $field) {
-            if ($field["config"]["type"] == "inline") {
-                if (isset($inlineFields[$i]["inlineFields"]) && is_array($inlineFields[$i]["inlineFields"])) {
-                    $this->sortInlineFieldsByOrder($inlineFields[$i]["inlineFields"]);
+            if ($field['config']['type'] == 'inline') {
+                if (isset($inlineFields[$i]['inlineFields']) && is_array($inlineFields[$i]['inlineFields'])) {
+                    $this->sortInlineFieldsByOrder($inlineFields[$i]['inlineFields']);
                 }
             }
         }
@@ -401,8 +395,6 @@ function ($columnA, $columnB) {
 
     /**
      * action list
-     *
-     * @return void
      */
     public function listAction()
     {
diff --git a/Classes/Controller/WizardPageController.php b/Classes/Controller/WizardPageController.php
index 058cc1e6..895dff3b 100755
--- a/Classes/Controller/WizardPageController.php
+++ b/Classes/Controller/WizardPageController.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\Controller;
@@ -31,18 +32,12 @@
 use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
 
 /**
- *
- *
- * @package mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
- *
  */
 class WizardPageController extends WizardController
 {
     /**
      * action list
-     *
-     * @return void
      */
     public function listAction(): void
     {
@@ -53,8 +48,6 @@ public function listAction(): void
 
     /**
      * action new
-     *
-     * @return void
      */
     public function newAction(): void
     {
@@ -67,7 +60,6 @@ public function newAction(): void
      * action create
      *
      * @param array $storage
-     * @return void
      * @throws StopActionException
      */
     public function createAction($storage): void
@@ -82,13 +74,14 @@ public function createAction($storage): void
      * action edit
      *
      * @param string $layoutIdentifier
-     * @return void
      */
     public function editAction($layoutIdentifier = null): void
     {
         $settings = $this->settingsService->get();
-        $layout = $this->backendLayoutRepository->findByIdentifier($layoutIdentifier,
-            explode(',', $settings['backendlayout_pids']));
+        $layout = $this->backendLayoutRepository->findByIdentifier(
+            $layoutIdentifier,
+            explode(',', $settings['backendlayout_pids'])
+        );
 
         if ($layout) {
             $storage = $this->storageRepository->loadElement('pages', $layoutIdentifier);
@@ -103,7 +96,6 @@ public function editAction($layoutIdentifier = null): void
      * action update
      *
      * @param array $storage
-     * @return void
      * @throws StopActionException
      */
     public function updateAction($storage): void
@@ -118,7 +110,6 @@ public function updateAction($storage): void
      * action delete
      *
      * @param array $storage
-     * @return void
      * @throws StopActionException
      */
     public function deleteAction(array $storage): void
diff --git a/Classes/Domain/Model/BackendLayout.php b/Classes/Domain/Model/BackendLayout.php
index e9acce5a..a8c7d77b 100644
--- a/Classes/Domain/Model/BackendLayout.php
+++ b/Classes/Domain/Model/BackendLayout.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\Domain\Model;
@@ -30,7 +31,6 @@
  *  This copyright notice MUST APPEAR in all copies of the script!
  * ************************************************************* */
 
-use TYPO3\CMS\Extbase\Annotation\Validate;
 use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
 
 /**
@@ -77,7 +77,6 @@ public function getTitle(): string
      * Sets the title.
      *
      * @param string $title the user name to set, must not be empty
-     * @return void
      */
     public function setTitle($title): void
     {
@@ -98,7 +97,6 @@ public function getUid(): ?int
      * Sets the uid.
      *
      * @param int $uid the user name to set, must not be empty
-     * @return void
      * @noinspection PhpUnused
      */
     public function setUid($uid): void
@@ -120,7 +118,6 @@ public function getIcon(): string
      * Sets the icon.
      *
      * @param string $icon
-     * @return void
      */
     public function setIcon($icon): void
     {
@@ -141,7 +138,6 @@ public function getDescription(): string
      * Sets the description.
      *
      * @param string $description
-     * @return void
      */
     public function setDescription($description): void
     {
diff --git a/Classes/Domain/Model/Content.php b/Classes/Domain/Model/Content.php
index c8fe41b5..a392dc81 100644
--- a/Classes/Domain/Model/Content.php
+++ b/Classes/Domain/Model/Content.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\Domain\Model;
@@ -27,15 +28,10 @@
  *  This copyright notice MUST APPEAR in all copies of the script!
  * ************************************************************* */
 
-use TYPO3\CMS\Extbase\Annotation\Validate;
 use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
 
 /**
- *
- *
- * @package mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
- *
  */
 class Content extends AbstractEntity
 {
@@ -110,7 +106,6 @@ public function getTitle(): string
      * Sets the title
      *
      * @param string $title
-     * @return void
      */
     public function setTitle($title): void
     {
@@ -131,7 +126,6 @@ public function getDescription(): string
      * Sets the description
      *
      * @param string $description
-     * @return void
      */
     public function setDescription($description): void
     {
@@ -152,7 +146,6 @@ public function getShorttitle(): string
      * Sets the shorttitle
      *
      * @param string $shorttitle
-     * @return void
      */
     public function setShorttitle($shorttitle): void
     {
@@ -173,7 +166,6 @@ public function getFieldkey(): string
      * Sets the fieldkey
      *
      * @param string $fieldkey
-     * @return void
      */
     public function setFieldkey($fieldkey): void
     {
diff --git a/Classes/Domain/Model/Page.php b/Classes/Domain/Model/Page.php
index d8faf178..3542c50f 100644
--- a/Classes/Domain/Model/Page.php
+++ b/Classes/Domain/Model/Page.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\Domain\Model;
@@ -27,15 +28,10 @@
  *  This copyright notice MUST APPEAR in all copies of the script!
  * ************************************************************* */
 
-use TYPO3\CMS\Extbase\Annotation\Validate;
 use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
 
 /**
- *
- *
- * @package mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
- *
  */
 class Page extends AbstractEntity
 {
@@ -51,7 +47,7 @@ class Page extends AbstractEntity
     /**
      * Backend layout
      *
-     * @var integer
+     * @var int
      */
     protected $belayout;
 
@@ -73,7 +69,7 @@ class Page extends AbstractEntity
     /**
      * Default Template if no selection.
      *
-     * @var boolean
+     * @var bool
      */
     protected $defaulttemplate = false;
 
@@ -91,7 +87,6 @@ public function getTitle(): string
      * Sets the title
      *
      * @param string $title
-     * @return void
      */
     public function setTitle($title): void
     {
@@ -101,7 +96,7 @@ public function setTitle($title): void
     /**
      * Returns the belayout
      *
-     * @return integer $belayout
+     * @return int $belayout
      */
     public function getBelayout(): int
     {
@@ -111,8 +106,7 @@ public function getBelayout(): int
     /**
      * Sets the belayout
      *
-     * @param integer $belayout
-     * @return void
+     * @param int $belayout
      */
     public function setBelayout($belayout): void
     {
@@ -133,7 +127,6 @@ public function getFieldkey(): string
      * Sets the fieldkey
      *
      * @param string $fieldkey
-     * @return void
      */
     public function setFieldkey($fieldkey): void
     {
@@ -154,7 +147,6 @@ public function getHeader(): string
      * Sets the header
      *
      * @param string $header
-     * @return void
      */
     public function setHeader($header): void
     {
@@ -164,7 +156,7 @@ public function setHeader($header): void
     /**
      * Returns the defaulttemplate
      *
-     * @return boolean $defaulttemplate
+     * @return bool $defaulttemplate
      */
     public function getDefaulttemplate(): bool
     {
@@ -174,8 +166,7 @@ public function getDefaulttemplate(): bool
     /**
      * Sets the defaulttemplate
      *
-     * @param boolean $defaulttemplate
-     * @return void
+     * @param bool $defaulttemplate
      */
     public function setDefaulttemplate($defaulttemplate): void
     {
@@ -185,7 +176,7 @@ public function setDefaulttemplate($defaulttemplate): void
     /**
      * Returns the boolean state of defaulttemplate
      *
-     * @return boolean
+     * @return bool
      */
     public function isDefaulttemplate(): bool
     {
diff --git a/Classes/Domain/Repository/BackendLayoutRepository.php b/Classes/Domain/Repository/BackendLayoutRepository.php
index 88494be8..62b62e23 100644
--- a/Classes/Domain/Repository/BackendLayoutRepository.php
+++ b/Classes/Domain/Repository/BackendLayoutRepository.php
@@ -1,4 +1,6 @@
-<?php namespace MASK\Mask\Domain\Repository;
+<?php
+
+namespace MASK\Mask\Domain\Repository;
 
 /* * *************************************************************
  *  Copyright notice
@@ -56,8 +58,6 @@ class BackendLayoutRepository extends Repository
 
     /**
      * Initializes the repository.
-     *
-     * @return void
      */
     public function initializeObject(): void
     {
@@ -111,7 +111,6 @@ public function findAll($pageTsPids = []): array
         return $backendLayouts;
     }
 
-
     /**
      * @param $pid
      * @return bool
@@ -156,7 +155,6 @@ public function findIdentifierByPid($pid): ?string
         return null;
     }
 
-
     /**
      * Returns a backendlayout or null, if non found
      *
@@ -169,5 +167,4 @@ public function findByIdentifier($identifier, $pageTsPids = []): ?BackendLayout
         $backendLayouts = $this->findAll($pageTsPids);
         return $backendLayouts[$identifier] ?? null;
     }
-
 }
diff --git a/Classes/Domain/Repository/ContentRepository.php b/Classes/Domain/Repository/ContentRepository.php
index e62e074e..56eeff55 100644
--- a/Classes/Domain/Repository/ContentRepository.php
+++ b/Classes/Domain/Repository/ContentRepository.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\Domain\Repository;
@@ -32,16 +33,12 @@
 use TYPO3\CMS\Extbase\Persistence\Repository;
 
 /**
- *
- *
- * @package mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
  *
  * @method findByContentType(string $string)
  */
 class ContentRepository extends Repository
 {
-
     public function initializeObject(): void
     {
         $querySettings = GeneralUtility::makeInstance(Typo3QuerySettings::class);
diff --git a/Classes/Domain/Repository/IconRepository.php b/Classes/Domain/Repository/IconRepository.php
index 8678a5fe..0ad411cb 100644
--- a/Classes/Domain/Repository/IconRepository.php
+++ b/Classes/Domain/Repository/IconRepository.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\Domain\Repository;
@@ -27,9 +28,6 @@
  *  This copyright notice MUST APPEAR in all copies of the script!
  * ************************************************************* */
 /**
- *
- *
- * @package mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
  */
 class IconRepository
diff --git a/Classes/Domain/Repository/PageRepository.php b/Classes/Domain/Repository/PageRepository.php
index 5b29bc6e..617db245 100644
--- a/Classes/Domain/Repository/PageRepository.php
+++ b/Classes/Domain/Repository/PageRepository.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\Domain\Repository;
@@ -30,13 +31,8 @@
 use TYPO3\CMS\Extbase\Persistence\Repository;
 
 /**
- *
- *
- * @package mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
- *
  */
 class PageRepository extends Repository
 {
-
 }
diff --git a/Classes/Domain/Repository/StorageRepository.php b/Classes/Domain/Repository/StorageRepository.php
index fc02950d..e8a79ba1 100644
--- a/Classes/Domain/Repository/StorageRepository.php
+++ b/Classes/Domain/Repository/StorageRepository.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\Domain\Repository;
@@ -37,7 +38,6 @@
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
- *
  * @api
  */
 class StorageRepository implements SingletonInterface
@@ -100,7 +100,6 @@ public function load(): array
      * Write Storage
      *
      * @param $json
-     * @return void
      * @noinspection PhpComposerExtensionStubsInspection
      */
     public function write($json): void
@@ -203,10 +202,16 @@ public function add($content): void
                         // If using a mask field with empty label, we have to set the "default" label
                         $label = '';
                         foreach ($json[$content['type']]['elements'] as $element) {
-                            if (is_array($element['columns']) && in_array($content['elements']['columns'][$index],
-                                    $element['columns'], true)) {
-                                $i = array_search($content['elements']['columns'][$index], $element['columns'],
-                                    true);
+                            if (is_array($element['columns']) && in_array(
+                                $content['elements']['columns'][$index],
+                                $element['columns'],
+                                true
+                            )) {
+                                $i = array_search(
+                                    $content['elements']['columns'][$index],
+                                    $element['columns'],
+                                    true
+                                );
                                 if (!empty($element['labels'][$i])) {
                                     $label = $element['labels'][$i];
                                     break;
@@ -247,7 +252,6 @@ public function add($content): void
 
         // Create JSON tca Array:
         if (is_array($content['tca'])) {
-
             foreach ($content['tca'] as $key => $value) {
                 $inlineField = false;
 
@@ -351,7 +355,6 @@ public function activate($type, $key): void
      * @param array $json
      * @param array $remainingFields
      * @return array
-     *
      */
     private function removeField($table, $field, $json, $remainingFields = []): array
     {
@@ -369,7 +372,6 @@ private function removeField($table, $field, $json, $remainingFields = []): arra
             }
         }
 
-
         // check if father gets deleted
         $fatherFound = false;
         if ($remainingFields) {
@@ -398,13 +400,19 @@ private function removeField($table, $field, $json, $remainingFields = []): arra
                     }
                     if ($found) {
                         // was not really deleted => can be deleted temporarly because it will be readded
-                        $json = $this->removeField($inlineField['inlineParent'], 'tx_mask_' . $inlineField['key'],
-                            $json);
+                        $json = $this->removeField(
+                            $inlineField['inlineParent'],
+                            'tx_mask_' . $inlineField['key'],
+                            $json
+                        );
                     } else {
                         // was really deleted and can only be deleted if father is not in use in another element
                         if (($fatherGetsDeleted && count($elementsInUse) == 0) || !$fatherGetsDeleted) {
-                            $json = $this->removeField($inlineField['inlineParent'], 'tx_mask_' . $inlineField['key'],
-                                $json);
+                            $json = $this->removeField(
+                                $inlineField['inlineParent'],
+                                'tx_mask_' . $inlineField['key'],
+                                $json
+                            );
                         }
                     }
                 }
@@ -467,7 +475,6 @@ public function update($content): void
     /**
      * Sorts the json entries
      * @param array $array
-     * @return void
      */
     private function sortJson(array &$array): void
     {
@@ -529,7 +536,6 @@ public function getFormType($fieldKey, $elementKey = '', $type = 'tt_content'):
             $evals = explode(',', $tca['config']['eval']);
         }
 
-
         if (($tca['options'] ?? '') === 'file') {
             $formType = 'File';
         }
diff --git a/Classes/Domain/Service/SettingsService.php b/Classes/Domain/Service/SettingsService.php
index c0e6ba35..145c429f 100644
--- a/Classes/Domain/Service/SettingsService.php
+++ b/Classes/Domain/Service/SettingsService.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\Domain\Service;
diff --git a/Classes/ExpressionLanguage/MaskFunctionsProvider.php b/Classes/ExpressionLanguage/MaskFunctionsProvider.php
index a8d93f07..c22ae96f 100644
--- a/Classes/ExpressionLanguage/MaskFunctionsProvider.php
+++ b/Classes/ExpressionLanguage/MaskFunctionsProvider.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\ExpressionLanguage;
@@ -33,7 +34,6 @@ protected function maskBeLayout(): ExpressionFunction
     {
         return new ExpressionFunction('maskBeLayout', static function ($param) {
         }, static function ($arguments, $param = null) {
-
             $layout = (string)$param;
             $backend_layout = (string)$arguments['page']['backend_layout'];
             $backend_layout_next_level = (string)$arguments['page']['backend_layout_next_level'];
@@ -50,8 +50,11 @@ protected function maskBeLayout(): ExpressionFunction
 
             // If backend_layout and backend_layout_next_level is not set on current page, check backend_layout_next_level on rootline
             foreach ($arguments['tree']->rootLine as $page) {
-                if (in_array((string)$page['backend_layout_next_level'], [$layout, 'pagets__' . $layout],
-                    true)) {
+                if (in_array(
+                    (string)$page['backend_layout_next_level'],
+                    [$layout, 'pagets__' . $layout],
+                    true
+                )) {
                     return true;
                 }
             }
@@ -142,7 +145,6 @@ protected function maskContentType(): ExpressionFunction
 
             // if we have found nothing, then return that this is not a mask field
             return false;
-
         });
     }
 }
diff --git a/Classes/Fluid/FluidTemplateContentObject.php b/Classes/Fluid/FluidTemplateContentObject.php
index 92bdfb71..6053f9fd 100755
--- a/Classes/Fluid/FluidTemplateContentObject.php
+++ b/Classes/Fluid/FluidTemplateContentObject.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\Fluid;
diff --git a/Classes/Helper/FieldHelper.php b/Classes/Helper/FieldHelper.php
index c55ef6ab..bb1918f1 100644
--- a/Classes/Helper/FieldHelper.php
+++ b/Classes/Helper/FieldHelper.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\Helper;
@@ -130,7 +131,6 @@ public function getFieldType($fieldKey, $elementKey = '', $excludeInlineFields =
                     // if this is the element we search for, or no special element was given,
                     // and the element has columns and the fieldType wasn't found yet
                     if (($element['key'] === $elementKey || $elementKey === '') && $element['columns'] && !$found) {
-
                         foreach ($element['columns'] as $column) {
                             if ($column === $fieldKey && !$found) {
                                 $fieldType = $type;
diff --git a/Classes/Helper/InlineHelper.php b/Classes/Helper/InlineHelper.php
index 7f8dff10..bb798ef5 100644
--- a/Classes/Helper/InlineHelper.php
+++ b/Classes/Helper/InlineHelper.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\Helper;
@@ -32,10 +33,10 @@
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Context\Context;
 use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
-use TYPO3\CMS\Extbase\Object\Exception;
 use TYPO3\CMS\Core\Resource\FileRepository;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Extbase\Object\Exception;
 
 /**
  * Methods for working with inline fields (IRRE)
@@ -58,7 +59,8 @@ class InlineHelper
      */
     protected $backendLayoutRepository;
 
-    public function __construct(StorageRepository $storageRepository, BackendLayoutRepository $backendLayoutRepository) {
+    public function __construct(StorageRepository $storageRepository, BackendLayoutRepository $backendLayoutRepository)
+    {
         $this->storageRepository = $storageRepository;
         $this->backendLayoutRepository = $backendLayoutRepository;
     }
@@ -112,7 +114,6 @@ public function addFilesToData(&$data, $table = 'tt_content'): void
      */
     public function addIrreToData(&$data, $table = 'tt_content', $cType = ''): void
     {
-
         if ($cType === '') {
             $cType = $data['CType'];
         }
@@ -144,7 +145,6 @@ public function addIrreToData(&$data, $table = 'tt_content', $cType = ''): void
                     if (isset($storage[$table]['tca'])) {
                         $elementFields = array_keys($storage[$table]['tca']);
                     }
-
                 }
             }
         } elseif (isset($storage[$table])) {
@@ -157,7 +157,6 @@ public function addIrreToData(&$data, $table = 'tt_content', $cType = ''): void
 
             // check foreach column
             foreach ($elementFields as $field) {
-
                 $fieldKeyPrefix = $field;
                 $fieldKey = str_replace('tx_mask_', '', $field);
                 $type = $this->storageRepository->getFormType($fieldKey, $cType, $table);
@@ -166,7 +165,7 @@ public function addIrreToData(&$data, $table = 'tt_content', $cType = ''): void
                 if ($type === 'Inline') {
                     $elements = $this->getInlineElements($data, $fieldKeyPrefix, $cType, 'parentid', $table);
                     $data[$fieldKeyPrefix] = $elements;
-                    // or if it is of type Content (Nested Content) and has to be filled
+                // or if it is of type Content (Nested Content) and has to be filled
                 } elseif ($type === 'Content') {
                     $elements = $this->getInlineElements(
                         $data,
diff --git a/Classes/Hooks/PageLayoutViewDrawItem.php b/Classes/Hooks/PageLayoutViewDrawItem.php
index a57eed75..29235db7 100644
--- a/Classes/Hooks/PageLayoutViewDrawItem.php
+++ b/Classes/Hooks/PageLayoutViewDrawItem.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\Hooks;
@@ -48,8 +49,6 @@
  * Renders the backend preview of mask content elements
  *
  * @author Benjamin Butschell <bb@webprofil.at>
- * @package MASK
- * @subpackage mask
  */
 class PageLayoutViewDrawItem implements PageLayoutViewDrawItemHookInterface
 {
diff --git a/Classes/Hooks/PageLayoutViewHook.php b/Classes/Hooks/PageLayoutViewHook.php
index f27d956a..1b475681 100644
--- a/Classes/Hooks/PageLayoutViewHook.php
+++ b/Classes/Hooks/PageLayoutViewHook.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\Hooks;
diff --git a/Classes/Imaging/IconProvider/ContentElementIconProvider.php b/Classes/Imaging/IconProvider/ContentElementIconProvider.php
index 5d4739e2..ae63e51a 100644
--- a/Classes/Imaging/IconProvider/ContentElementIconProvider.php
+++ b/Classes/Imaging/IconProvider/ContentElementIconProvider.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\Imaging\IconProvider;
@@ -37,7 +38,6 @@
  * ************************************************************* */
 
 /**
- * @package mask
  * @author Benjamin Butschell <bb@webprofil.at>
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
  */
@@ -78,7 +78,6 @@ public function __construct(StorageRepository $storageRepository, SettingsServic
     }
 
     /**
-     *
      * @param Icon $icon
      * @param array $options
      * @throws Exception
@@ -105,37 +104,42 @@ public function prepareIconMarkup(Icon $icon, array $options = []): void
      */
     protected function generateMarkup(Icon $icon, array $options): string
     {
-
         $styles = [];
         $previewIconAvailable = $this->isPreviewIconAvailable($options['contentElementKey']);
         $fontAwesomeKeyAvailable = $this->isFontAwesomeKeyAvailable($this->contentElement);
 
         // decide what kind of icon to render
         if ($fontAwesomeKeyAvailable && !$previewIconAvailable) {
-
             $color = $this->getColor($this->contentElement);
 
             if ($color) {
                 $styles[] = 'color: #' . $color;
             }
             if (count($styles)) {
-                $markup = '<span class="icon-unify" style="' . implode('; ',
-                        $styles) . '"><i class="fa fa-' . htmlspecialchars($this->getFontAwesomeKey($this->contentElement)) . '"></i></span>';
+                $markup = '<span class="icon-unify" style="' . implode(
+                    '; ',
+                    $styles
+                ) . '"><i class="fa fa-' . htmlspecialchars($this->getFontAwesomeKey($this->contentElement)) . '"></i></span>';
             } else {
                 $markup = '<span class="icon-unify" ><i class="fa fa-' . htmlspecialchars($this->getFontAwesomeKey($this->contentElement)) . '"></i></span>';
             }
         } else {
             if ($previewIconAvailable) {
-                $markup = '<img src="' . str_replace(Environment::getPublicPath(), '',
-                        $this->getPreviewIconPath($options['contentElementKey'])) . '" alt="' . $this->contentElement['label'] . '" title="' . $this->contentElement['label'] . '"/>';
+                $markup = '<img src="' . str_replace(
+                    Environment::getPublicPath(),
+                    '',
+                    $this->getPreviewIconPath($options['contentElementKey'])
+                ) . '" alt="' . $this->contentElement['label'] . '" title="' . $this->contentElement['label'] . '"/>';
             } else {
                 $color = $this->getColor($this->contentElement);
                 if ($color) {
                     $styles[] = 'background-color: #' . $color;
                 }
                 $styles[] = 'color: #fff';
-                $markup = '<span class="icon-unify mask-default-icon" style="' . implode('; ',
-                        $styles) . '">' . mb_substr($this->contentElement['label'], 0, 1) . '</span>';
+                $markup = '<span class="icon-unify mask-default-icon" style="' . implode(
+                    '; ',
+                    $styles
+                ) . '">' . mb_substr($this->contentElement['label'], 0, 1) . '</span>';
             }
         }
 
@@ -145,7 +149,7 @@ protected function generateMarkup(Icon $icon, array $options): string
     /**
      * Checks if a preview icon is available in defined folder
      * @param string $key
-     * @return boolean
+     * @return bool
      */
     protected function isPreviewIconAvailable($key): bool
     {
@@ -155,7 +159,7 @@ protected function isPreviewIconAvailable($key): bool
     /**
      * Checks if content element has set a fontawesome key
      * @param array $element
-     * @return boolean
+     * @return bool
      */
     protected function isFontAwesomeKeyAvailable($element): bool
     {
@@ -171,8 +175,8 @@ protected function getPreviewIconPath($key): string
         // the path to the file
         $filePath = function ($key) {
             return MaskUtility::getFileAbsFileName(
-                    rtrim($this->extSettings['preview'], '/') . '/'
-                ) . $key . '.';
+                rtrim($this->extSettings['preview'], '/') . '/'
+            ) . $key . '.';
         };
 
         // search a fitting png or svg file in this path
diff --git a/Classes/ItemsProcFuncs/AbstractList.php b/Classes/ItemsProcFuncs/AbstractList.php
index 57e9cb60..78e7d9d2 100644
--- a/Classes/ItemsProcFuncs/AbstractList.php
+++ b/Classes/ItemsProcFuncs/AbstractList.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\ItemsProcFuncs;
@@ -33,7 +34,5 @@
  */
 abstract class AbstractList
 {
-
     protected $colPos = 999;
-
 }
diff --git a/Classes/ItemsProcFuncs/CTypeList.php b/Classes/ItemsProcFuncs/CTypeList.php
index 24226caa..d7a5116d 100644
--- a/Classes/ItemsProcFuncs/CTypeList.php
+++ b/Classes/ItemsProcFuncs/CTypeList.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\ItemsProcFuncs;
@@ -28,8 +29,8 @@
  * ************************************************************* */
 
 use MASK\Mask\Domain\Repository\StorageRepository;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
 use MASK\Mask\Helper\FieldHelper;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
  * Render the allowed CTypes for nested content elements
@@ -107,8 +108,11 @@ public function itemsProcFunc(&$params): void
             // and if other itemsProcFunc from other extension was available (e.g. gridelements),
             // then call it now and let it render the items
             if (!empty($params['config']['m_itemsProcFunc'])) {
-                GeneralUtility::callUserFunction($params['config']['m_itemsProcFunc'], $params,
-                    $this);
+                GeneralUtility::callUserFunction(
+                    $params['config']['m_itemsProcFunc'],
+                    $params,
+                    $this
+                );
             }
         }
     }
@@ -134,7 +138,10 @@ protected function startsWith($haystack, $needle): bool
     protected function endsWith($haystack, $needle): bool
     {
         // search forward starting from end minus needle length characters
-        return $needle === '' || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos($haystack, $needle,
-                    $temp) !== false);
+        return $needle === '' || (($temp = strlen($haystack) - strlen($needle)) >= 0 && strpos(
+            $haystack,
+            $needle,
+            $temp
+        ) !== false);
     }
 }
diff --git a/Classes/ItemsProcFuncs/ColPosList.php b/Classes/ItemsProcFuncs/ColPosList.php
index 9ee6366c..2eb5e503 100644
--- a/Classes/ItemsProcFuncs/ColPosList.php
+++ b/Classes/ItemsProcFuncs/ColPosList.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\ItemsProcFuncs;
diff --git a/Classes/Utility/GeneralUtility.php b/Classes/Utility/GeneralUtility.php
index 56fd35e1..98f838d8 100755
--- a/Classes/Utility/GeneralUtility.php
+++ b/Classes/Utility/GeneralUtility.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\Utility;
@@ -86,7 +87,8 @@ public function isBlindLinkOptionSet($fieldKey, $evalValue, $type = 'tt_content'
         $storage = $this->storageRepository->load();
         $found = false;
         if (isset($storage[$type]['tca'][$fieldKey]['config']['fieldControl']['linkPopup']['options']['blindLinkOptions'])) {
-            $evals = explode(',',
+            $evals = explode(
+                ',',
                 $storage[$type]['tca'][$fieldKey]['config']['fieldControl']['linkPopup']['options']['blindLinkOptions']
             );
             $found = in_array(strtolower($evalValue), $evals, true);
diff --git a/Classes/ViewHelpers/CTypesViewHelper.php b/Classes/ViewHelpers/CTypesViewHelper.php
index c0efe94f..f117da0b 100644
--- a/Classes/ViewHelpers/CTypesViewHelper.php
+++ b/Classes/ViewHelpers/CTypesViewHelper.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\ViewHelpers;
@@ -8,14 +9,10 @@
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
 
 /**
- *
  * Example
  * {namespace mask=MASK\Mask\ViewHelpers}
  *
- * @package TYPO3
- * @subpackage mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
- *
  */
 class CTypesViewHelper extends AbstractViewHelper
 {
diff --git a/Classes/ViewHelpers/ConfigureExtensionViewHelper.php b/Classes/ViewHelpers/ConfigureExtensionViewHelper.php
index 8a518ecf..9c3f7007 100644
--- a/Classes/ViewHelpers/ConfigureExtensionViewHelper.php
+++ b/Classes/ViewHelpers/ConfigureExtensionViewHelper.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\ViewHelpers;
@@ -9,12 +10,8 @@
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
 
 /**
- *
- * @package TYPO3
- * @subpackage mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
  * @author Benjamin Butschell bb@webprofil.at>
- *
  */
 class ConfigureExtensionViewHelper extends AbstractViewHelper
 {
diff --git a/Classes/ViewHelpers/ContentViewHelper.php b/Classes/ViewHelpers/ContentViewHelper.php
index c0632db2..fab89b24 100644
--- a/Classes/ViewHelpers/ContentViewHelper.php
+++ b/Classes/ViewHelpers/ContentViewHelper.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\ViewHelpers;
@@ -11,11 +12,9 @@
  * ViewHelper for rendering any content element
  * @author Paul Beck
  * @link http://blog.teamgeist-medien.de/2014/01/extbase-fluid-viewhelper-fuer-tt_content-elemente-mit-namespaces.html Source
- *
  */
 class ContentViewHelper extends AbstractViewHelper
 {
-
     protected $escapeOutput = false;
 
     /**
@@ -52,7 +51,6 @@ public function render(): string
      * Injects Configuration Manager
      *
      * @param ConfigurationManagerInterface $configurationManager
-     * @return void
      */
     public function injectConfigurationManager(
         ConfigurationManagerInterface $configurationManager
diff --git a/Classes/ViewHelpers/EditLinkViewHelper.php b/Classes/ViewHelpers/EditLinkViewHelper.php
index 8f85120e..f2918d9f 100644
--- a/Classes/ViewHelpers/EditLinkViewHelper.php
+++ b/Classes/ViewHelpers/EditLinkViewHelper.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\ViewHelpers;
@@ -17,7 +18,7 @@ class EditLinkViewHelper extends AbstractTagBasedViewHelper
     protected $tagName = 'a';
 
     /**
-     * @var boolean
+     * @var bool
      */
     protected $doEdit = 1;
 
diff --git a/Classes/ViewHelpers/ElementCountViewHelper.php b/Classes/ViewHelpers/ElementCountViewHelper.php
index 5b41ba58..2162987c 100644
--- a/Classes/ViewHelpers/ElementCountViewHelper.php
+++ b/Classes/ViewHelpers/ElementCountViewHelper.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\ViewHelpers;
@@ -7,14 +8,10 @@
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
 
 /**
- *
  * Example
  * {namespace mask=MASK\Mask\ViewHelpers}
  *
- * @package TYPO3
- * @subpackage mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
- *
  */
 class ElementCountViewHelper extends AbstractViewHelper
 {
diff --git a/Classes/ViewHelpers/EvalViewHelper.php b/Classes/ViewHelpers/EvalViewHelper.php
index 5828d1a8..5f4695ab 100644
--- a/Classes/ViewHelpers/EvalViewHelper.php
+++ b/Classes/ViewHelpers/EvalViewHelper.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\ViewHelpers;
@@ -8,12 +9,8 @@
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
 
 /**
- *
- * @package TYPO3
- * @subpackage mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
  * @author Benjamin Butschell bb@webprofil.at>
- *
  */
 class EvalViewHelper extends AbstractViewHelper
 {
@@ -49,7 +46,7 @@ public function initializeArguments(): void
     /**
      * Checks if a $evalValue is set in a field
      *
-     * @return boolean $evalValue is set
+     * @return bool $evalValue is set
      * @author Benjamin Butschell bb@webprofil.at>
      */
     public function render(): bool
diff --git a/Classes/ViewHelpers/FormTypeViewHelper.php b/Classes/ViewHelpers/FormTypeViewHelper.php
index 66788109..005243c7 100644
--- a/Classes/ViewHelpers/FormTypeViewHelper.php
+++ b/Classes/ViewHelpers/FormTypeViewHelper.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\ViewHelpers;
@@ -7,12 +8,8 @@
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
 
 /**
- *
- * @package TYPO3
- * @subpackage mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
  * @author Benjamin Butschell bb@webprofil.at>
- *
  */
 class FormTypeViewHelper extends AbstractViewHelper
 {
diff --git a/Classes/ViewHelpers/ItemsViewHelper.php b/Classes/ViewHelpers/ItemsViewHelper.php
index d8d016fc..ba1a5ac3 100644
--- a/Classes/ViewHelpers/ItemsViewHelper.php
+++ b/Classes/ViewHelpers/ItemsViewHelper.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\ViewHelpers;
@@ -6,12 +7,8 @@
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
 
 /**
- *
- * @package TYPO3
- * @subpackage mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
  * @author Benjamin Butschell <bb@webprofil.at>
- *
  */
 class ItemsViewHelper extends AbstractViewHelper
 {
diff --git a/Classes/ViewHelpers/LabelViewHelper.php b/Classes/ViewHelpers/LabelViewHelper.php
index b2615c96..261ac150 100644
--- a/Classes/ViewHelpers/LabelViewHelper.php
+++ b/Classes/ViewHelpers/LabelViewHelper.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\ViewHelpers;
@@ -7,12 +8,8 @@
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
 
 /**
- *
- * @package TYPO3
- * @subpackage mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
  * @author Benjamin Butschell bb@webprofil.at>
- *
  */
 class LabelViewHelper extends AbstractViewHelper
 {
diff --git a/Classes/ViewHelpers/LinkViewHelper.php b/Classes/ViewHelpers/LinkViewHelper.php
index e55bdf0c..ec168b30 100644
--- a/Classes/ViewHelpers/LinkViewHelper.php
+++ b/Classes/ViewHelpers/LinkViewHelper.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\ViewHelpers;
@@ -9,14 +10,10 @@
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
 
 /**
- *
  * Example
  * {namespace mask=MASK\Mask\ViewHelpers}
  *
- * @package TYPO3
- * @subpackage mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
- *
  */
 class LinkViewHelper extends AbstractViewHelper
 {
@@ -62,8 +59,10 @@ public function render(): string
             $content = '<div class="alert alert-warning"><div class="media">
 <div class="media-left"><span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x"></i>
 <i class="fa fa-exclamation fa-stack-1x"></i></span></div>
-<div class="media-body"><h4 class="alert-title">' . LocalizationUtility::translate('tx_mask.content.htmlmissing',
-                    'mask') . '</h4>      <p class="alert-message">' . $templatePath . '
+<div class="media-body"><h4 class="alert-title">' . LocalizationUtility::translate(
+                'tx_mask.content.htmlmissing',
+                'mask'
+            ) . '</h4>      <p class="alert-message">' . $templatePath . '
 				</p></div></div></div>';
         }
         return $content;
diff --git a/Classes/ViewHelpers/LinkoptionViewHelper.php b/Classes/ViewHelpers/LinkoptionViewHelper.php
index db536a37..b14b5d10 100644
--- a/Classes/ViewHelpers/LinkoptionViewHelper.php
+++ b/Classes/ViewHelpers/LinkoptionViewHelper.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\ViewHelpers;
@@ -8,12 +9,8 @@
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
 
 /**
- *
- * @package TYPO3
- * @subpackage mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
  * @author Benjamin Butschell <bb@webprofil.at>
- *
  */
 class LinkoptionViewHelper extends AbstractViewHelper
 {
diff --git a/Classes/ViewHelpers/MultiuseViewHelper.php b/Classes/ViewHelpers/MultiuseViewHelper.php
index 5bc9b196..95072ef0 100644
--- a/Classes/ViewHelpers/MultiuseViewHelper.php
+++ b/Classes/ViewHelpers/MultiuseViewHelper.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\ViewHelpers;
@@ -7,12 +8,8 @@
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
 
 /**
- *
- * @package TYPO3
- * @subpackage mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
  * @author Benjamin Butschell bb@webprofil.at>
- *
  */
 class MultiuseViewHelper extends AbstractViewHelper
 {
diff --git a/Classes/ViewHelpers/ShuttleViewHelper.php b/Classes/ViewHelpers/ShuttleViewHelper.php
index bd2d3ca0..a12d632c 100644
--- a/Classes/ViewHelpers/ShuttleViewHelper.php
+++ b/Classes/ViewHelpers/ShuttleViewHelper.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\ViewHelpers;
@@ -9,16 +10,12 @@
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
 
 /**
- *
  * Example
  * {namespace mask=MASK\Mask\ViewHelpers}
  * <mask:shuttle data="{data}" name="tx_mask_slider"/>
  *
- * @package TYPO3
- * @subpackage mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
  * @todo Test if neccessary in selectbox-shuttle-frontend
- *
  */
 class ShuttleViewHelper extends AbstractViewHelper
 {
diff --git a/Classes/ViewHelpers/SubstrViewHelper.php b/Classes/ViewHelpers/SubstrViewHelper.php
index de757b0f..f3040566 100644
--- a/Classes/ViewHelpers/SubstrViewHelper.php
+++ b/Classes/ViewHelpers/SubstrViewHelper.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\ViewHelpers;
@@ -6,12 +7,8 @@
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
 
 /**
- *
- * @package TYPO3
- * @subpackage mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
  * @author Benjamin Butschell bb@webprofil.at>
- *
  */
 class SubstrViewHelper extends AbstractViewHelper
 {
@@ -33,6 +30,6 @@ public function render(): bool
         $from = $this->arguments['from'];
         $length = $this->arguments['length'];
 
-        return (substr($string, $from, $length) === $search);
+        return substr($string, $from, $length) === $search;
     }
 }
diff --git a/Classes/ViewHelpers/TcaViewHelper.php b/Classes/ViewHelpers/TcaViewHelper.php
index ddb6b343..61922312 100644
--- a/Classes/ViewHelpers/TcaViewHelper.php
+++ b/Classes/ViewHelpers/TcaViewHelper.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\ViewHelpers;
@@ -8,14 +9,10 @@
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
 
 /**
- *
  * Example
  * {namespace mask=MASK\Mask\ViewHelpers}
  *
- * @package TYPO3
- * @subpackage mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
- *
  */
 class TcaViewHelper extends AbstractViewHelper
 {
diff --git a/Classes/ViewHelpers/TranslateLabelViewHelper.php b/Classes/ViewHelpers/TranslateLabelViewHelper.php
index 94b20a9f..99e8714e 100644
--- a/Classes/ViewHelpers/TranslateLabelViewHelper.php
+++ b/Classes/ViewHelpers/TranslateLabelViewHelper.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 namespace MASK\Mask\ViewHelpers;
@@ -13,11 +14,8 @@
  * {namespace mask=MASK\Mask\ViewHelpers}
  * <mask:translateLabel key="{key}" />
  *
- * @package TYPO3
- * @subpackage mask
  * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 2 or later
  * @author Fabian Galinski <fabian@sgalinski.de>
- *
  */
 class TranslateLabelViewHelper extends AbstractViewHelper
 {
@@ -45,6 +43,6 @@ public function render(): string
         $request = $this->renderingContext->getControllerContext()->getRequest();
         $extensionName = $extensionName ?? $request->getControllerExtensionName();
         $result = LocalizationUtility::translate($key, $extensionName);
-        return (empty($result) ? $key : $result);
+        return empty($result) ? $key : $result;
     }
 }
diff --git a/Configuration/Backend/AjaxRoutes.php b/Configuration/Backend/AjaxRoutes.php
index 6d991bba..cc9cd9e0 100644
--- a/Configuration/Backend/AjaxRoutes.php
+++ b/Configuration/Backend/AjaxRoutes.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 return [
diff --git a/Configuration/ExpressionLanguage.php b/Configuration/ExpressionLanguage.php
index a8512be1..d67afbc4 100644
--- a/Configuration/ExpressionLanguage.php
+++ b/Configuration/ExpressionLanguage.php
@@ -1,9 +1,10 @@
 <?php
+
 declare(strict_types=1);
 
 use MASK\Mask\ExpressionLanguage\MaskProvider;
 
-defined('TYPO3_MODE') or die ('Access denied.');
+defined('TYPO3_MODE') or die('Access denied.');
 
 return [
     // Add the condition provider to the 'typoscript' namespace
diff --git a/Configuration/Extbase/Persistence/Classes.php b/Configuration/Extbase/Persistence/Classes.php
index 05c47d8d..0aebc460 100644
--- a/Configuration/Extbase/Persistence/Classes.php
+++ b/Configuration/Extbase/Persistence/Classes.php
@@ -1,4 +1,5 @@
 <?php
+
 declare(strict_types=1);
 
 return [
diff --git a/Tests/Unit/CodeGenerator/TcaCodeGeneratorTest.php b/Tests/Unit/CodeGenerator/TcaCodeGeneratorTest.php
index b0f681bd..a8068a51 100644
--- a/Tests/Unit/CodeGenerator/TcaCodeGeneratorTest.php
+++ b/Tests/Unit/CodeGenerator/TcaCodeGeneratorTest.php
@@ -295,7 +295,7 @@ public function getMaskIrreTables($json, $expected)
         $storage->method('load')->willReturn($json);
         $fieldHelper = new FieldHelper($storage);
         $tcaGenerator = new TcaCodeGenerator($storage, $fieldHelper);
-        $this->assertSame($expected, $tcaGenerator->getMaskIrreTables());
+        self::assertSame($expected, $tcaGenerator->getMaskIrreTables());
     }
 
     public function processTableTcaDataProvider()
diff --git a/Tests/Unit/GeneralUtilityTest.php b/Tests/Unit/GeneralUtilityTest.php
index 9a53a43f..63ed08bf 100644
--- a/Tests/Unit/GeneralUtilityTest.php
+++ b/Tests/Unit/GeneralUtilityTest.php
@@ -24,7 +24,7 @@ public function getTemplatePathDataProvider()
                 'noelement',
                 false,
                 null,
-                Environment::getPublicPath() .'/typo3conf/ext/mask/Tests/Unit/Fixtures/Templates/Noelement.html'
+                Environment::getPublicPath() . '/typo3conf/ext/mask/Tests/Unit/Fixtures/Templates/Noelement.html'
             ],
             'under_scored exists' => [
                 ['content' => 'typo3conf/ext/mask/Tests/Unit/Fixtures/Templates/'],
@@ -107,7 +107,6 @@ public function getTemplatePath($settings, $elementKey, $onlyTemplateName, $path
         self::assertSame($expectedPath, $path);
     }
 
-
     public function removeBlankOptionsDataProvider()
     {
         return [
diff --git a/composer.json b/composer.json
index 2fe583f2..a95ae42f 100644
--- a/composer.json
+++ b/composer.json
@@ -31,7 +31,8 @@
 		"typo3/testing-framework": "^6",
 		"phpunit/phpunit": "^8.4",
 		"phpstan/phpstan": "^0.12.13",
-		"rector/rector": "^0.7.14"
+		"rector/rector": "^0.7.14",
+		"friendsofphp/php-cs-fixer": "^2.16"
 	},
 	"require": {
 		"php": "^7.2",
diff --git a/ext_emconf.php b/ext_emconf.php
index 0289aad1..d538afc3 100644
--- a/ext_emconf.php
+++ b/ext_emconf.php
@@ -1,4 +1,5 @@
 <?php
+
 $EM_CONF['mask'] = [
     'title' => 'Mask',
     'description' => 'Create your own content elements and page templates. Easy to use, even without programming skills because of the comfortable drag and drop system. Stored in structured database tables. Style your frontend with Fluid tags. Ideal, if you want to switch from Templavoila.',