Skip to content

Commit af7243d

Browse files
committed
[BUGFIX] better variable naming for readability | increase of errorcount phpstan for specific constant LF not found
1 parent 2814888 commit af7243d

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

Build/phpstan-baseline-11-7.4.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ parameters:
33

44
-
55
message: "#^Constant LF not found\\.$#"
6-
count: 4
6+
count: 5
77
path: ../Classes/Tca/Registry.php
88

99
-

Build/phpstan-baseline-11.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ parameters:
33

44
-
55
message: "#^Constant LF not found\\.$#"
6-
count: 4
6+
count: 5
77
path: ../Classes/Tca/Registry.php
88

99
-

Build/phpstan-baseline-12.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ parameters:
33

44
-
55
message: "#^Constant LF not found\\.$#"
6-
count: 4
6+
count: 5
77
path: ../Classes/Tca/Registry.php
88

99
-

Build/phpstan-baseline-13.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ parameters:
33

44
-
55
message: "#^Constant LF not found\\.$#"
6-
count: 4
6+
count: 5
77
path: ../Classes/Tca/Registry.php
88

99
-

Build/phpstan-baseline-14.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ parameters:
33

44
-
55
message: "#^Constant LF not found\\.$#"
6-
count: 4
6+
count: 5
77
path: ../Classes/Tca/Registry.php
88

99
-

Classes/Tca/Registry.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ public function getPageTsString(): string
260260
$defaultGroup = 'container';
261261

262262
$typo3Version = GeneralUtility::makeInstance(Typo3Version::class);
263-
$cTypesByGroup = [];
263+
$cTypesExcludedInNewContentElementWizard = [];
264264

265265
foreach ($GLOBALS['TCA']['tt_content']['containerConfiguration'] as $cType => $containerConfiguration) {
266266
if ($containerConfiguration['registerInNewContentElementWizard'] === true) {
@@ -278,13 +278,13 @@ public function getPageTsString(): string
278278
if ($typo3Version->getMajorVersion() > 12) {
279279
if ($containerConfiguration['registerInNewContentElementWizard'] === false) {
280280
$group = $containerConfiguration['group'] !== '' ? $containerConfiguration['group'] : $defaultGroup;
281-
$cTypesByGroup[$group][] = $cType;
281+
$cTypesExcludedInNewContentElementWizard[$group][] = $cType;
282282
}
283283
}
284284
}
285285

286-
if ($typo3Version->getMajorVersion() > 12 && !empty($cTypesByGroup)) {
287-
foreach ($cTypesByGroup as $group => $ctypes) {
286+
if ($typo3Version->getMajorVersion() > 12 && !empty($cTypesExcludedInNewContentElementWizard)) {
287+
foreach ($cTypesExcludedInNewContentElementWizard as $group => $ctypes) {
288288
$pageTs .= LF . 'mod.wizards.newContentElement.wizardItems.' . $group . '.removeItems := addToList(' . implode(',', $ctypes) . ')';
289289
}
290290
return $pageTs;

0 commit comments

Comments
 (0)