Skip to content

Commit

Permalink
feat: code style
Browse files Browse the repository at this point in the history
  • Loading branch information
maikschneider committed Oct 15, 2023
1 parent 52d6cec commit 7d8b2e4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 19 deletions.
6 changes: 3 additions & 3 deletions ext_localconf.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

// register custom form element
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1629534119] = [
'nodeName' => 'iconSelection',
'priority' => 40,
'class' => \Blueways\BwIcons\Form\Element\IconSelection::class,
];

if (!isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['bwicons_conf']) || !is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['bwicons_conf'])) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['bwicons_conf'] = [];
}
// register cache
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['bwicons_conf'] ??= [];
4 changes: 0 additions & 4 deletions phpmd.baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
<violation rule="PHPMD\Rule\CyclomaticComplexity" file="Classes/Provider/CssIconProvider.php" method="getIcons"/>
<violation rule="PHPMD\Rule\Design\NpathComplexity" file="Classes/Provider/CssIconProvider.php" method="getIcons"/>
<violation rule="PHPMD\Rule\Design\LongMethod" file="Classes/Provider/CssIconProvider.php" method="getIcons"/>
<violation rule="PHPMD\Rule\Naming\LongVariable" file="Classes/Provider/CssIconProvider.php"/>
<violation rule="PHPMD\Rule\Controversial\CamelCaseVariableName" file="Classes/Provider/CssIconProvider.php" method="handleCssUrl"/>
<violation rule="PHPMD\Rule\CyclomaticComplexity" file="Classes/Provider/CssIconProvider.php" method="ruleIsAGlyph"/>
<violation rule="PHPMD\Rule\Naming\LongVariable" file="Classes/ViewHelpers/IconViewHelper.php"/>
<violation rule="PHPMD\Rule\UnusedFormalParameter" file="Classes/ViewHelpers/IconViewHelper.php"/>
<violation rule="PHPMD\Rule\Naming\LongVariable" file="Classes/ViewHelpers/IsWhiteViewHelper.php"/>
<violation rule="PHPMD\Rule\UnusedFormalParameter" file="Classes/ViewHelpers/IsWhiteViewHelper.php"/>
</phpmd-baseline>
1 change: 1 addition & 0 deletions phpmd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<rule ref="rulesets/design.xml"/>
<rule ref="rulesets/naming.xml">
<exclude name="ShortVariable" />
<exclude name="LongVariable" />
</rule>
<rule ref="rulesets/unusedcode.xml"/>
<rule ref="rulesets/controversial.xml"/>
Expand Down
14 changes: 2 additions & 12 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@ parameters:
ignoreErrors:
-
message: "#^Call to an undefined method Sabberworm\\\\CSS\\\\RuleSet\\\\RuleSet\\:\\:getSelectors\\(\\)\\.$#"
count: 1
path: Classes/Provider/CssIconProvider.php

-
message: "#^Call to an undefined method Sabberworm\\\\CSS\\\\Value\\\\RuleValueList\\:\\:getString\\(\\)\\.$#"
count: 3
path: Classes/Provider/CssIconProvider.php

-
message: "#^Call to function is_string\\(\\) with Sabberworm\\\\CSS\\\\Value\\\\RuleValueList\\|null will always evaluate to false\\.$#"
count: 1
message: "#^Call to an undefined method Sabberworm\\\\CSS\\\\Value\\\\RuleValueList\\:\\:getString\\(\\)\\.$#"
count: 4
path: Classes/Provider/CssIconProvider.php

-
Expand All @@ -25,11 +20,6 @@ parameters:
count: 1
path: Classes/Provider/CssIconProvider.php

-
message: "#^Parameter \\#1 \\$rule of method Blueways\\\\BwIcons\\\\Provider\\\\CssIconProvider\\:\\:adjustSrcOfFontFaceRule\\(\\) expects Sabberworm\\\\CSS\\\\RuleSet\\\\AtRuleSet, Sabberworm\\\\CSS\\\\RuleSet\\\\RuleSet given\\.$#"
count: 1
path: Classes/Provider/CssIconProvider.php

-
message: "#^Unsafe call to private method Blueways\\\\BwIcons\\\\Provider\\\\CssIconProvider\\:\\:glyphIsNotInSet\\(\\) through static\\:\\:\\.$#"
count: 1
Expand Down

0 comments on commit 7d8b2e4

Please sign in to comment.