diff --git a/Classes/Aggregate/AbstractAggregate.php b/Classes/Aggregate/AbstractAggregate.php index 129ff5e..c1b63c2 100644 --- a/Classes/Aggregate/AbstractAggregate.php +++ b/Classes/Aggregate/AbstractAggregate.php @@ -49,9 +49,6 @@ abstract class AbstractAggregate */ protected $typoScriptFilePath = 'Configuration/TypoScript/'; - /** - * @param array $maskConfiguration - */ public function __construct(array $maskConfiguration) { $this->maskConfiguration = $maskConfiguration; @@ -63,12 +60,12 @@ public function __construct(array $maskConfiguration) /** * Evaluates the configuration and stores necessary Interface information */ - abstract protected function process(); + abstract protected function process(): void; /** * Remove hidden content elements from configuration */ - protected function removeHiddenContentElements() + protected function removeHiddenContentElements(): void { if (empty($this->maskConfiguration['tt_content']['elements'])) { return; @@ -85,7 +82,7 @@ static function (array $element) { /** * Remove core fields from configuration */ - protected function removeCoreFields() + protected function removeCoreFields(): void { foreach ($this->maskConfiguration as $table => $configuration) { if (empty($configuration['tca'])) { @@ -100,11 +97,7 @@ static function ($field) { } } - /** - * @param string $string - * @return string - */ - protected function escapeMaskExtensionKey($string) + protected function escapeMaskExtensionKey(string $string): string { return preg_replace('/(m)ask/i', '${\\1ask}', $string); } diff --git a/Classes/Aggregate/AbstractInlineContentAggregate.php b/Classes/Aggregate/AbstractInlineContentAggregate.php index 7e6ce92..04bafd2 100644 --- a/Classes/Aggregate/AbstractInlineContentAggregate.php +++ b/Classes/Aggregate/AbstractInlineContentAggregate.php @@ -19,10 +19,7 @@ abstract class AbstractInlineContentAggregate extends AbstractAggregate { - /** - * @return array - */ - protected function getAvailableInlineFields() + protected function getAvailableInlineFields(): array { $inlineFields = []; foreach ($this->maskConfiguration as $table => $configuration) { diff --git a/Classes/Aggregate/AbstractOverridesAggregate.php b/Classes/Aggregate/AbstractOverridesAggregate.php index 14014f2..393b48a 100644 --- a/Classes/Aggregate/AbstractOverridesAggregate.php +++ b/Classes/Aggregate/AbstractOverridesAggregate.php @@ -30,10 +30,7 @@ abstract class AbstractOverridesAggregate extends AbstractAggregate implements L */ protected $tcaOverridesFilePath = 'Configuration/TCA/Overrides/'; - /** - * @param array $tableConfiguration - */ - protected function addTableColumns(array $tableConfiguration) + protected function addTableColumns(array $tableConfiguration): void { if (empty($tableConfiguration['columns']) || empty($this->maskConfiguration[$this->table]['tca'])) { return; diff --git a/Classes/Aggregate/AggregateCollection.php b/Classes/Aggregate/AggregateCollection.php index f364066..81c03e1 100644 --- a/Classes/Aggregate/AggregateCollection.php +++ b/Classes/Aggregate/AggregateCollection.php @@ -36,10 +36,6 @@ class AggregateCollection */ protected $maskConfiguration; - /** - * @param array $aggregateClassNames - * @param array $maskConfiguration - */ public function __construct(array $aggregateClassNames, array $maskConfiguration) { $this->aggregateClassNames = $aggregateClassNames; @@ -49,7 +45,7 @@ public function __construct(array $aggregateClassNames, array $maskConfiguration /** * @return AbstractAggregate[] */ - public function getCollection() + public function getCollection(): array { if (null === $this->collection) { $this->initializeCollection(); @@ -61,7 +57,7 @@ public function getCollection() /** * Initializes aggregate objects */ - protected function initializeCollection() + protected function initializeCollection(): void { $this->collection = []; foreach ($this->aggregateClassNames as $className) { diff --git a/Classes/Aggregate/BackendPreviewAggregate.php b/Classes/Aggregate/BackendPreviewAggregate.php index 90992e2..b2d7560 100644 --- a/Classes/Aggregate/BackendPreviewAggregate.php +++ b/Classes/Aggregate/BackendPreviewAggregate.php @@ -40,10 +40,6 @@ class BackendPreviewAggregate extends AbstractOverridesAggregate implements Plai */ protected $templatesFilePath = 'Resources/Private/Backend/Templates/'; - /** - * @param array $maskConfiguration - * @param BackendFluidCodeGenerator $fluidCodeGenerator - */ public function __construct(array $maskConfiguration, BackendFluidCodeGenerator $fluidCodeGenerator = null) { $this->fluidCodeGenerator = (null !== $fluidCodeGenerator) ? $fluidCodeGenerator : GeneralUtility::makeInstance(BackendFluidCodeGenerator::class); @@ -54,7 +50,7 @@ public function __construct(array $maskConfiguration, BackendFluidCodeGenerator /** * Adds PHP and Fluid files */ - protected function process() + protected function process(): void { if (empty($this->maskConfiguration[$this->table]['elements'])) { return; @@ -66,7 +62,7 @@ protected function process() $this->addFluidTemplates(); } - protected function addPageTsConfiguration() + protected function addPageTsConfiguration(): void { $rootPaths = $this->getFluidRootPaths(); @@ -96,7 +92,7 @@ protected function addPageTsConfiguration() /** * This adds the PHP file with the hook to render own element template */ - protected function addDrawItemHook() + protected function addDrawItemHook(): void { $this->appendPhpFile( 'ext_localconf.php', @@ -266,7 +262,7 @@ protected function getProcessedData(array \$databaseRow, array \$processedTcaCol /** * Ensure proper labels in $GLOBALS['TCA'] configuration */ - protected function replaceTableLabels() + protected function replaceTableLabels(): void { foreach ($this->maskConfiguration as $table => $_) { if (!isset($GLOBALS['TCA'][$table]) || empty($GLOBALS['TCA'][$table]['columns'])) { @@ -297,7 +293,7 @@ protected function replaceTableLabels() } } - protected function addFluidTemplates() + protected function addFluidTemplates(): void { foreach ($this->maskConfiguration[$this->table]['elements'] as $key => $element) { $templateKey = GeneralUtility::underscoredToUpperCamelCase($key); @@ -325,7 +321,7 @@ protected function addFluidTemplates() } } - protected function getFluidRootPaths() + protected function getFluidRootPaths(): array { $rootPath = dirname($this->templatesFilePath); diff --git a/Classes/Aggregate/ContentElementIconAggregate.php b/Classes/Aggregate/ContentElementIconAggregate.php index a4cd594..8d4de4d 100644 --- a/Classes/Aggregate/ContentElementIconAggregate.php +++ b/Classes/Aggregate/ContentElementIconAggregate.php @@ -35,7 +35,7 @@ class ContentElementIconAggregate extends TtContentOverridesAggregate implements /** * Adds content elements to the newContentElementWizard */ - protected function process() + protected function process(): void { if (empty($this->maskConfiguration['tt_content']['elements'])) { return; diff --git a/Classes/Aggregate/ContentRenderingAggregate.php b/Classes/Aggregate/ContentRenderingAggregate.php index 8221ef5..b15aebc 100644 --- a/Classes/Aggregate/ContentRenderingAggregate.php +++ b/Classes/Aggregate/ContentRenderingAggregate.php @@ -55,10 +55,6 @@ class ContentRenderingAggregate extends AbstractOverridesAggregate implements Pl */ protected $partialPath = 'Partials/'; - /** - * @param array $maskConfiguration - * @param HtmlCodeGenerator $htmlCodeGenerator - */ public function __construct(array $maskConfiguration, HtmlCodeGenerator $htmlCodeGenerator = null) { $this->htmlCodeGenerator = (null !== $htmlCodeGenerator) ? $htmlCodeGenerator : GeneralUtility::makeInstance(HtmlCodeGenerator::class); @@ -69,7 +65,7 @@ public function __construct(array $maskConfiguration, HtmlCodeGenerator $htmlCod /** * Adds TypoScript and Fluid information */ - protected function process() + protected function process(): void { if (empty($this->maskConfiguration[$this->table]['elements'])) { return; @@ -113,10 +109,7 @@ protected function process() } } - /** - * @param array $element - */ - protected function addTypoScript(array $element) + protected function addTypoScript(array $element): void { $resourcesPath = 'EXT:mask/' . $this->resourcePath; $layoutsPath = $resourcesPath . $this->layoutPath; @@ -157,12 +150,7 @@ protected function addTypoScript(array $element) ); } - /** - * @param string $table - * @param array $fields - * @return string - */ - protected function addDataProcessing($table, array $fields) + protected function addDataProcessing(string $table, array $fields): string { $dataProcessing = ''; $index = 10; @@ -206,13 +194,7 @@ protected function addDataProcessing($table, array $fields) return $dataProcessing; } - /** - * @param string $table - * @param string $columnName - * @param int $index - * @return string - */ - protected function addFileProcessorForField($table, $columnName, $index) + protected function addFileProcessorForField(string $table, string $columnName, int $index): string { return <<