Skip to content

Commit 69504ed

Browse files
authored
Align php-cs-fixer to CMS 5.3
1 parent b895369 commit 69504ed

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.php-cs-fixer.dist.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@
7272
'native_function_invocation' => ['include' => ['@compiler_optimized']],
7373
// Adds null to type declarations when parameter have a default null value
7474
'nullable_type_declaration_for_default_null_value' => true,
75+
// Removes unneeded parentheses around control statements
76+
'no_unneeded_control_parentheses' => true,
77+
// Using isset($var) && multiple times should be done in one call.
78+
'combine_consecutive_issets' => true,
79+
// Calling unset on multiple items should be done in one call
80+
'combine_consecutive_unsets' => true,
81+
// There must be no sprintf calls with only the first argument
82+
'no_useless_sprintf' => true,
7583
]
7684
)
7785
->setFinder($finder);

src/administrator/components/com_weblinks/src/Extension/WeblinksComponent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function getContexts(): array
130130
*/
131131
protected function getTableNameForSection(?string $section = null)
132132
{
133-
return ($section === 'category' ? 'categories' : 'weblinks');
133+
return $section === 'category' ? 'categories' : 'weblinks';
134134
}
135135

136136
/**

src/components/com_weblinks/helpers/icon.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ public static function edit($weblink, $params, $attribs = [])
5252
*/
5353
private static function getIcon()
5454
{
55-
return (new \Joomla\Component\Weblinks\Administrator\Service\HTML\Icon(Joomla\CMS\Factory::getApplication()));
55+
return new \Joomla\Component\Weblinks\Administrator\Service\HTML\Icon(Joomla\CMS\Factory::getApplication());
5656
}
5757
}

0 commit comments

Comments
 (0)