Skip to content
Snippets Groups Projects
Commit 4d0c9849 authored by Torben Hansen's avatar Torben Hansen Committed by Benjamin Franzke
Browse files

[TASK] Ensure short list syntax is used


With #90002, all occurrences of the `list()` function have been migrated
to the short list syntax. Our php-cs-fixer configuration does however
not check the short list syntax usage, so we have one usage of `list()`
in our codebase again.

This change extends the php-cs-fixer configuration to ensure, that
only the short list syntax is used. The new ruleset has been applied
to the codebase and one usage of the `list()` function has been migrated.

Resolves: #101777
Related: #90002
Releases: main, 12.4
Signed-off-by: default avatarTorben Hansen <derhansen@gmail.com>
Change-Id: I30f5822e27a36515c2c77a19089a0754ff6fdcfd
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80684


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarBenjamin Franzke <ben@bnf.dev>
Reviewed-by: default avatarBenjamin Franzke <ben@bnf.dev>
parent 42b49a99
Branches
Tags
No related merge requests found
...@@ -59,6 +59,7 @@ return (new \PhpCsFixer\Config()) ...@@ -59,6 +59,7 @@ return (new \PhpCsFixer\Config())
'function_to_constant' => ['functions' => ['get_called_class', 'get_class', 'get_class_this', 'php_sapi_name', 'phpversion', 'pi']], 'function_to_constant' => ['functions' => ['get_called_class', 'get_class', 'get_class_this', 'php_sapi_name', 'phpversion', 'pi']],
'function_typehint_space' => true, 'function_typehint_space' => true,
'global_namespace_import' => ['import_classes' => false, 'import_constants' => false, 'import_functions' => false], 'global_namespace_import' => ['import_classes' => false, 'import_constants' => false, 'import_functions' => false],
'list_syntax' => ['syntax' => 'short'],
'modernize_strpos' => true, 'modernize_strpos' => true,
'modernize_types_casting' => true, 'modernize_types_casting' => true,
'native_function_casing' => true, 'native_function_casing' => true,
......
...@@ -186,7 +186,7 @@ class ExportPageTreeView extends AbstractTreeView ...@@ -186,7 +186,7 @@ class ExportPageTreeView extends AbstractTreeView
$this->stored = []; $this->stored = [];
foreach ($pageTreeState as $identifier => $isExpanded) { foreach ($pageTreeState as $identifier => $isExpanded) {
list($bank, $pageId) = explode('_', $identifier); [$bank, $pageId] = explode('_', $identifier);
$this->stored[$bank][$pageId] = $isExpanded; $this->stored[$bank][$pageId] = $isExpanded;
} }
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment