Commit f73029ed authored by Wouter Wolters's avatar Wouter Wolters Committed by Susanne Moog
Browse files

[TASK] Migrate to short array syntax

As decided during T3ACME we will use the short
array syntax in master. The 7.6 branch will also be done
to make backporting easier.

Resolves: #77692
Releases: master,7.6
Change-Id: I37e9484b1012fc9161148257a842054c24d162ba
Reviewed-on: https://review.typo3.org/49651


Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: Susanne Moog's avatarSusanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog's avatarSusanne Moog <susanne.moog@typo3.org>
parent c7e65f96
...@@ -68,6 +68,7 @@ return Symfony\CS\Config\Config::create() ...@@ -68,6 +68,7 @@ return Symfony\CS\Config\Config::create()
'extra_empty_lines', 'extra_empty_lines',
'phpdoc_no_package', 'phpdoc_no_package',
'phpdoc_scalar', 'phpdoc_scalar',
'no_empty_lines_after_phpdocs' 'no_empty_lines_after_phpdocs',
'short_array_syntax'
]) ])
->finder($finder); ->finder($finder);
...@@ -73,7 +73,7 @@ class ModulesController extends ActionController ...@@ -73,7 +73,7 @@ class ModulesController extends ActionController
*/ */
public function indexAction() public function indexAction()
{ {
$warnings = array(); $warnings = [];
$securityWarnings = ''; $securityWarnings = '';
// Hook for additional warnings // Hook for additional warnings
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['displayWarningMessages'])) { if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['displayWarningMessages'])) {
...@@ -94,13 +94,13 @@ class ModulesController extends ActionController ...@@ -94,13 +94,13 @@ class ModulesController extends ActionController
} }
$this->view->assignMultiple( $this->view->assignMultiple(
array( [
'TYPO3Version' => TYPO3_version, 'TYPO3Version' => TYPO3_version,
'copyRightNotice' => BackendUtility::TYPO3_copyRightNotice(), 'copyRightNotice' => BackendUtility::TYPO3_copyRightNotice(),
'warningMessages' => $securityWarnings, 'warningMessages' => $securityWarnings,
'warningTitle' => $this->languageService->sL('LLL:EXT:lang/locallang_core.xlf:warning.header'), 'warningTitle' => $this->languageService->sL('LLL:EXT:lang/locallang_core.xlf:warning.header'),
'modules' => $this->getModulesData() 'modules' => $this->getModulesData()
) ]
); );
} }
...@@ -116,7 +116,7 @@ class ModulesController extends ActionController ...@@ -116,7 +116,7 @@ class ModulesController extends ActionController
$loadedModules = GeneralUtility::makeInstance(ModuleLoader::class); $loadedModules = GeneralUtility::makeInstance(ModuleLoader::class);
$loadedModules->observeWorkspaces = true; $loadedModules->observeWorkspaces = true;
$loadedModules->load($GLOBALS['TBE_MODULES']); $loadedModules->load($GLOBALS['TBE_MODULES']);
$mainModulesData = array(); $mainModulesData = [];
foreach ($loadedModules->modules as $moduleName => $moduleInfo) { foreach ($loadedModules->modules as $moduleName => $moduleInfo) {
$moduleLabels = $loadedModules->getLabelsForModule($moduleName); $moduleLabels = $loadedModules->getLabelsForModule($moduleName);
$mainModuleData = [ $mainModuleData = [
...@@ -140,10 +140,10 @@ class ModulesController extends ActionController ...@@ -140,10 +140,10 @@ class ModulesController extends ActionController
*/ */
protected function getSubModuleData(ModuleLoader $loadedModules, $moduleName) protected function getSubModuleData(ModuleLoader $loadedModules, $moduleName)
{ {
$subModulesData = array(); $subModulesData = [];
foreach ($loadedModules->modules[$moduleName]['sub'] as $subModuleName => $subModuleInfo) { foreach ($loadedModules->modules[$moduleName]['sub'] as $subModuleName => $subModuleInfo) {
$moduleLabels = $loadedModules->getLabelsForModule($moduleName . '_' . $subModuleName); $moduleLabels = $loadedModules->getLabelsForModule($moduleName . '_' . $subModuleName);
$subModuleData = array(); $subModuleData = [];
$subModuleData['name'] = $subModuleName; $subModuleData['name'] = $subModuleName;
$subModuleData['icon'] = $subModuleInfo['icon']; $subModuleData['icon'] = $subModuleInfo['icon'];
$subModuleData['iconIdentifier'] = $subModuleInfo['iconIdentifier']; $subModuleData['iconIdentifier'] = $subModuleInfo['iconIdentifier'];
......
<?php <?php
$EM_CONF[$_EXTKEY] = array( $EM_CONF[$_EXTKEY] = [
'title' => 'Help>About', 'title' => 'Help>About',
'description' => 'Shows info about TYPO3, installed extensions and a separate module for available modules.', 'description' => 'Shows info about TYPO3, installed extensions and a separate module for available modules.',
'category' => 'module', 'category' => 'module',
...@@ -10,11 +10,11 @@ $EM_CONF[$_EXTKEY] = array( ...@@ -10,11 +10,11 @@ $EM_CONF[$_EXTKEY] = array(
'author' => 'TYPO3 Core Team', 'author' => 'TYPO3 Core Team',
'author_email' => 'typo3cms@typo3.org', 'author_email' => 'typo3cms@typo3.org',
'version' => '8.3.0', 'version' => '8.3.0',
'constraints' => array( 'constraints' => [
'depends' => array( 'depends' => [
'typo3' => '8.3.0-8.3.99', 'typo3' => '8.3.0-8.3.99',
), ],
'conflicts' => array(), 'conflicts' => [],
'suggests' => array(), 'suggests' => [],
), ],
); ];
...@@ -8,12 +8,12 @@ if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) { ...@@ -8,12 +8,12 @@ if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) {
'help', 'help',
'about', 'about',
'top', 'top',
array('About' => 'index'), ['About' => 'index'],
array( [
'access' => 'user,group', 'access' => 'user,group',
'icon' => 'EXT:about/Resources/Public/Icons/module-about.svg', 'icon' => 'EXT:about/Resources/Public/Icons/module-about.svg',
'labels' => 'LLL:EXT:lang/locallang_mod_help_about.xlf' 'labels' => 'LLL:EXT:lang/locallang_mod_help_about.xlf'
) ]
); );
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
...@@ -21,13 +21,13 @@ if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) { ...@@ -21,13 +21,13 @@ if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) {
'help', 'help',
'aboutmodules', 'aboutmodules',
'after:about', 'after:about',
array( [
'Modules' => 'index' 'Modules' => 'index'
), ],
array( [
'access' => 'user,group', 'access' => 'user,group',
'icon' => 'EXT:about/Resources/Public/Icons/module-aboutmodules.svg', 'icon' => 'EXT:about/Resources/Public/Icons/module-aboutmodules.svg',
'labels' => 'LLL:EXT:about/Resources/Private/Language/Modules/aboutmodules.xlf' 'labels' => 'LLL:EXT:about/Resources/Private/Language/Modules/aboutmodules.xlf'
) ]
); );
} }
...@@ -40,7 +40,7 @@ class DefaultAvatarProvider implements AvatarProviderInterface ...@@ -40,7 +40,7 @@ class DefaultAvatarProvider implements AvatarProviderInterface
$file = ResourceFactory::getInstance()->getFileObject($fileUid); $file = ResourceFactory::getInstance()->getFileObject($fileUid);
$processedImage = $file->process( $processedImage = $file->process(
ProcessedFile::CONTEXT_IMAGECROPSCALEMASK, ProcessedFile::CONTEXT_IMAGECROPSCALEMASK,
array('width' => $size . 'c', 'height' => $size . 'c') ['width' => $size . 'c', 'height' => $size . 'c']
); );
$image = GeneralUtility::makeInstance( $image = GeneralUtility::makeInstance(
......
...@@ -30,12 +30,12 @@ class ClearCacheToolbarItem implements ToolbarItemInterface ...@@ -30,12 +30,12 @@ class ClearCacheToolbarItem implements ToolbarItemInterface
/** /**
* @var array * @var array
*/ */
protected $cacheActions = array(); protected $cacheActions = [];
/** /**
* @var array * @var array
*/ */
protected $optionValues = array(); protected $optionValues = [];
/** /**
* @var IconFactory * @var IconFactory
...@@ -57,13 +57,13 @@ class ClearCacheToolbarItem implements ToolbarItemInterface ...@@ -57,13 +57,13 @@ class ClearCacheToolbarItem implements ToolbarItemInterface
// Clear all page-related caches // Clear all page-related caches
if ($backendUser->isAdmin() || $backendUser->getTSConfigVal('options.clearCache.pages')) { if ($backendUser->isAdmin() || $backendUser->getTSConfigVal('options.clearCache.pages')) {
$this->cacheActions[] = array( $this->cacheActions[] = [
'id' => 'pages', 'id' => 'pages',
'title' => htmlspecialchars($languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushPageCachesTitle')), 'title' => htmlspecialchars($languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushPageCachesTitle')),
'description' => htmlspecialchars($languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushPageCachesDescription')), 'description' => htmlspecialchars($languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushPageCachesDescription')),
'href' => BackendUtility::getModuleUrl('tce_db', ['vC' => $backendUser->veriCode(), 'cacheCmd' => 'pages']), 'href' => BackendUtility::getModuleUrl('tce_db', ['vC' => $backendUser->veriCode(), 'cacheCmd' => 'pages']),
'icon' => $this->iconFactory->getIcon('actions-system-cache-clear-impact-low', Icon::SIZE_SMALL)->render() 'icon' => $this->iconFactory->getIcon('actions-system-cache-clear-impact-low', Icon::SIZE_SMALL)->render()
); ];
$this->optionValues[] = 'pages'; $this->optionValues[] = 'pages';
} }
...@@ -71,13 +71,13 @@ class ClearCacheToolbarItem implements ToolbarItemInterface ...@@ -71,13 +71,13 @@ class ClearCacheToolbarItem implements ToolbarItemInterface
// or if BE-User is admin and the TSconfig explicitly disables the possibility for admins. // or if BE-User is admin and the TSconfig explicitly disables the possibility for admins.
// This is useful for big production systems where admins accidentally could slow down the system. // This is useful for big production systems where admins accidentally could slow down the system.
if ($backendUser->getTSConfigVal('options.clearCache.all') || ($backendUser->isAdmin() && $backendUser->getTSConfigVal('options.clearCache.all') !== '0')) { if ($backendUser->getTSConfigVal('options.clearCache.all') || ($backendUser->isAdmin() && $backendUser->getTSConfigVal('options.clearCache.all') !== '0')) {
$this->cacheActions[] = array( $this->cacheActions[] = [
'id' => 'all', 'id' => 'all',
'title' => htmlspecialchars($languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushAllCachesTitle2')), 'title' => htmlspecialchars($languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushAllCachesTitle2')),
'description' => htmlspecialchars($languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushAllCachesDescription2')), 'description' => htmlspecialchars($languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushAllCachesDescription2')),
'href' => BackendUtility::getModuleUrl('tce_db', ['vC' => $backendUser->veriCode(), 'cacheCmd' => 'all']), 'href' => BackendUtility::getModuleUrl('tce_db', ['vC' => $backendUser->veriCode(), 'cacheCmd' => 'all']),
'icon' => $this->iconFactory->getIcon('actions-system-cache-clear-impact-high', Icon::SIZE_SMALL)->render() 'icon' => $this->iconFactory->getIcon('actions-system-cache-clear-impact-high', Icon::SIZE_SMALL)->render()
); ];
$this->optionValues[] = 'all'; $this->optionValues[] = 'all';
} }
...@@ -134,7 +134,7 @@ class ClearCacheToolbarItem implements ToolbarItemInterface ...@@ -134,7 +134,7 @@ class ClearCacheToolbarItem implements ToolbarItemInterface
*/ */
public function getDropDown() public function getDropDown()
{ {
$result = array(); $result = [];
$result[] = '<ul class="dropdown-list">'; $result[] = '<ul class="dropdown-list">';
foreach ($this->cacheActions as $cacheAction) { foreach ($this->cacheActions as $cacheAction) {
$title = $cacheAction['description'] ?: $cacheAction['title']; $title = $cacheAction['description'] ?: $cacheAction['title'];
...@@ -156,7 +156,7 @@ class ClearCacheToolbarItem implements ToolbarItemInterface ...@@ -156,7 +156,7 @@ class ClearCacheToolbarItem implements ToolbarItemInterface
*/ */
public function getAdditionalAttributes() public function getAdditionalAttributes()
{ {
return array(); return [];
} }
/** /**
......
...@@ -79,7 +79,7 @@ class HelpToolbarItem implements ToolbarItemInterface ...@@ -79,7 +79,7 @@ class HelpToolbarItem implements ToolbarItemInterface
*/ */
public function getDropDown() public function getDropDown()
{ {
$dropdown = array(); $dropdown = [];
$dropdown[] = '<ul class="dropdown-list">'; $dropdown[] = '<ul class="dropdown-list">';
foreach ($this->helpModuleMenu->getChildren() as $module) { foreach ($this->helpModuleMenu->getChildren() as $module) {
/** @var BackendModule $module */ /** @var BackendModule $module */
...@@ -109,7 +109,7 @@ class HelpToolbarItem implements ToolbarItemInterface ...@@ -109,7 +109,7 @@ class HelpToolbarItem implements ToolbarItemInterface
*/ */
public function getAdditionalAttributes() public function getAdditionalAttributes()
{ {
return array('class' => 'typo3-module-menu-group'); return ['class' => 'typo3-module-menu-group'];
} }
/** /**
......
...@@ -74,7 +74,7 @@ class LiveSearchToolbarItem implements ToolbarItemInterface ...@@ -74,7 +74,7 @@ class LiveSearchToolbarItem implements ToolbarItemInterface
*/ */
public function getAdditionalAttributes() public function getAdditionalAttributes()
{ {
return array('class' => 'dropdown'); return ['class' => 'dropdown'];
} }
/** /**
......
...@@ -91,13 +91,13 @@ class ShortcutToolbarItem implements ToolbarItemInterface ...@@ -91,13 +91,13 @@ class ShortcutToolbarItem implements ToolbarItemInterface
$this->moduleLoader->load($GLOBALS['TBE_MODULES']); $this->moduleLoader->load($GLOBALS['TBE_MODULES']);
// By default, 5 groups are set // By default, 5 groups are set
$this->shortcutGroups = array( $this->shortcutGroups = [
1 => '1', 1 => '1',
2 => '1', 2 => '1',
3 => '1', 3 => '1',
4 => '1', 4 => '1',
5 => '1' 5 => '1'
); ];
$this->shortcutGroups = $this->initShortcutGroups(); $this->shortcutGroups = $this->initShortcutGroups();
$this->shortcuts = $this->initShortcuts(); $this->shortcuts = $this->initShortcuts();
...@@ -230,7 +230,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface ...@@ -230,7 +230,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface
*/ */
public function getAdditionalAttributes() public function getAdditionalAttributes()
{ {
return array(); return [];
} }
/** /**
...@@ -253,7 +253,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface ...@@ -253,7 +253,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface
$backendUser = $this->getBackendUser(); $backendUser = $this->getBackendUser();
// Traverse shortcuts // Traverse shortcuts
$lastGroup = 0; $lastGroup = 0;
$shortcuts = array(); $shortcuts = [];
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getQueryBuilderForTable('sys_be_shortcuts'); ->getQueryBuilderForTable('sys_be_shortcuts');
$result = $queryBuilder->select('*') $result = $queryBuilder->select('*')
...@@ -272,7 +272,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface ...@@ -272,7 +272,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface
->execute(); ->execute();
while ($row = $result->fetch()) { while ($row = $result->fetch()) {
$shortcut = array('raw' => $row); $shortcut = ['raw' => $row];
list($row['module_name'], $row['M_module_name']) = explode('|', $row['module_name']); list($row['module_name'], $row['M_module_name']) = explode('|', $row['module_name']);
...@@ -389,7 +389,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface ...@@ -389,7 +389,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface
*/ */
protected function getShortcutsByGroup($groupId) protected function getShortcutsByGroup($groupId)
{ {
$shortcuts = array(); $shortcuts = [];
foreach ($this->shortcuts as $shortcut) { foreach ($this->shortcuts as $shortcut) {
if ($shortcut['group'] == $groupId) { if ($shortcut['group'] == $groupId) {
$shortcuts[] = $shortcut; $shortcuts[] = $shortcut;
...@@ -783,7 +783,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface ...@@ -783,7 +783,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface
*/ */
protected function getGlobalShortcutGroups() protected function getGlobalShortcutGroups()
{ {
$globalGroups = array(); $globalGroups = [];
foreach ($this->shortcutGroups as $groupId => $groupLabel) { foreach ($this->shortcutGroups as $groupId => $groupLabel) {
if ($groupId < 0) { if ($groupId < 0) {
$globalGroups[$groupId] = $groupLabel; $globalGroups[$groupId] = $groupLabel;
...@@ -799,7 +799,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface ...@@ -799,7 +799,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface
*/ */
protected function getGroupsFromShortcuts() protected function getGroupsFromShortcuts()
{ {
$groups = array(); $groups = [];
foreach ($this->shortcuts as $shortcut) { foreach ($this->shortcuts as $shortcut) {
$groups[$shortcut['group']] = $this->shortcutGroups[$shortcut['group']]; $groups[$shortcut['group']] = $this->shortcutGroups[$shortcut['group']];
} }
...@@ -859,7 +859,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface ...@@ -859,7 +859,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface
$icon = '<span title="' . $titleAttribute . '">' . $this->iconFactory->getIconForRecord($table, (array)$row, Icon::SIZE_SMALL)->render() . '</span>'; $icon = '<span title="' . $titleAttribute . '">' . $this->iconFactory->getIconForRecord($table, (array)$row, Icon::SIZE_SMALL)->render() . '</span>';
} elseif ($shortcut['type'] == 'new') { } elseif ($shortcut['type'] == 'new') {
$icon = '<span title="' . $titleAttribute . '">' . $this->iconFactory->getIconForRecord($table, array(), Icon::SIZE_SMALL)->render() . '</span>'; $icon = '<span title="' . $titleAttribute . '">' . $this->iconFactory->getIconForRecord($table, [], Icon::SIZE_SMALL)->render() . '</span>';
} }
break; break;
case 'file_edit': case 'file_edit':
......
...@@ -69,12 +69,12 @@ class SystemInformationToolbarItem implements ToolbarItemInterface ...@@ -69,12 +69,12 @@ class SystemInformationToolbarItem implements ToolbarItemInterface
/** /**
* @var array * @var array
*/ */
protected $systemInformation = array(); protected $systemInformation = [];
/** /**
* @var array * @var array
*/ */
protected $systemMessages = array(); protected $systemMessages = [];
/** /**
* @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher * @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher
...@@ -153,11 +153,11 @@ class SystemInformationToolbarItem implements ToolbarItemInterface ...@@ -153,11 +153,11 @@ class SystemInformationToolbarItem implements ToolbarItemInterface
*/ */
protected function getPhpVersion() protected function getPhpVersion()
{ {
$this->systemInformation[] = array( $this->systemInformation[] = [
'title' => htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo.phpversion')), 'title' => htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo.phpversion')),
'value' => PHP_VERSION, 'value' => PHP_VERSION,
'icon' => $this->iconFactory->getIcon('sysinfo-php-version', Icon::SIZE_SMALL)->render() 'icon' => $this->iconFactory->getIcon('sysinfo-php-version', Icon::SIZE_SMALL)->render()
); ];
} }
/** /**
...@@ -188,12 +188,12 @@ class SystemInformationToolbarItem implements ToolbarItemInterface ...@@ -188,12 +188,12 @@ class SystemInformationToolbarItem implements ToolbarItemInterface
protected function getApplicationContext() protected function getApplicationContext()
{ {
$applicationContext = GeneralUtility::getApplicationContext(); $applicationContext = GeneralUtility::getApplicationContext();
$this->systemInformation[] = array( $this->systemInformation[] = [
'title' => htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo.applicationcontext')), 'title' => htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo.applicationcontext')),
'value' => (string)$applicationContext, 'value' => (string)$applicationContext,
'status' => $applicationContext->isProduction() ? InformationStatus::STATUS_OK : InformationStatus::STATUS_WARNING, 'status' => $applicationContext->isProduction() ? InformationStatus::STATUS_OK : InformationStatus::STATUS_WARNING,
'icon' => $this->iconFactory->getIcon('sysinfo-application-context', Icon::SIZE_SMALL)->render() 'icon' => $this->iconFactory->getIcon('sysinfo-application-context', Icon::SIZE_SMALL)->render()
); ];
} }
/** /**
...@@ -206,11 +206,11 @@ class SystemInformationToolbarItem implements ToolbarItemInterface ...@@ -206,11 +206,11 @@ class SystemInformationToolbarItem implements ToolbarItemInterface
} }
$languageService = $this->getLanguageService(); $languageService = $this->getLanguageService();
$this->systemInformation[] = array( $this->systemInformation[] = [
'title' => htmlspecialchars($languageService->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo.composerMode')), 'title' => htmlspecialchars($languageService->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo.composerMode')),
'value' => htmlspecialchars($languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.enabled')), 'value' => htmlspecialchars($languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.enabled')),
'icon' => $this->iconFactory->getIcon('sysinfo-composer-mode', Icon::SIZE_SMALL)->render() 'icon' => $this->iconFactory->getIcon('sysinfo-composer-mode', Icon::SIZE_SMALL)->render()
); ];
} }
/** /**
...@@ -233,11 +233,11 @@ class SystemInformationToolbarItem implements ToolbarItemInterface ...@@ -233,11 +233,11 @@ class SystemInformationToolbarItem implements ToolbarItemInterface
$revision = trim(CommandUtility::exec('git rev-parse --short HEAD')); $revision = trim(CommandUtility::exec('git rev-parse --short HEAD'));
$branch = trim(CommandUtility::exec('git rev-parse --abbrev-ref HEAD')); $branch = trim(CommandUtility::exec('git rev-parse --abbrev-ref HEAD'));
if (!empty($revision) && !empty($branch)) { if (!empty($revision) && !empty($branch)) {
$this->systemInformation[] = array( $this->systemInformation[] = [
'title' => htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo.gitrevision')), 'title' => htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo.gitrevision')),
'value' => sprintf('%s [%s]', $revision, $branch), 'value' => sprintf('%s [%s]', $revision, $branch),
'icon' => $this->iconFactory->getIcon('sysinfo-git', Icon::SIZE_SMALL)->render() 'icon' => $this->iconFactory->getIcon('sysinfo-git', Icon::SIZE_SMALL)->render()
); ];
} }
} }
...@@ -259,11 +259,11 @@ class SystemInformationToolbarItem implements ToolbarItemInterface ...@@ -259,11 +259,11 @@ class SystemInformationToolbarItem implements ToolbarItemInterface
default: default:
$icon = 'windows'; $icon = 'windows';
} }
$this->systemInformation[] = array( $this->systemInformation[] = [
'title' => htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo.operatingsystem')), 'title' => htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo.operatingsystem')),
'value' => $kernelName . ' ' . php_uname('r'), 'value' => $kernelName . ' ' . php_uname('r'),
'icon' => $this->iconFactory->getIcon('sysinfo-os-' . $icon, Icon::SIZE_SMALL)->render() 'icon' => $this->iconFactory->getIcon('sysinfo-os-' . $icon, Icon::SIZE_SMALL)->render()
); ];
} }
/** /**
...@@ -271,11 +271,11 @@ class SystemInformationToolbarItem implements ToolbarItemInterface ...@@ -271,11 +271,11 @@ class SystemInformationToolbarItem implements ToolbarItemInterface
*/ */
protected function getWebServer() protected function getWebServer()
{