From 160a0dfebaeb21cc75d7166dfbac6d0ef1a51460 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Wed, 14 May 2014 17:32:49 +0200 Subject: convert array() to [] --- config/appconfig.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'config/appconfig.php') diff --git a/config/appconfig.php b/config/appconfig.php index b42301209..4315569d6 100644 --- a/config/appconfig.php +++ b/config/appconfig.php @@ -55,7 +55,7 @@ class AppConfig { $this->installedApps = $installedApps; $this->installedExtensions = $installedExtensions; $this->databaseType = $databaseType; - $this->config = array(); + $this->config = []; } @@ -75,13 +75,13 @@ class AppConfig { $nav =& $this->config['navigation']; // add defaults - $defaults = array( + $defaults = [ 'id' => $this->config['id'], 'route' => $this->config['id'] . '.page.index', 'order' => 10, 'icon' => 'app.svg', 'name' => $this->config['name'] - ); + ]; foreach($defaults as $key => $value) { if(!array_key_exists($key, $nav)) { @@ -113,10 +113,10 @@ class AppConfig { if(array_key_exists('navigation', $this->config)) { $nav =& $this->config['navigation']; - $navConfig = array( + $navConfig = [ 'id' => $nav['id'], 'order' => $nav['order'] - ); + ]; $navConfig['name'] = $this->l10n->t($nav['name']); $navConfig['href'] = $this->urlGenerator->linkToRoute($nav['route']); @@ -252,21 +252,21 @@ class AppConfig { * @return array of arrays with key=version value=operator */ private function splitVersions($versions) { - $result = array(); + $result = []; $versions = explode(',', $versions); foreach($versions as $version) { preg_match('/^(?<|<=|>=|>|<>)?(?.*)$/', $version, $matches); if($matches['operator'] !== '') { - $required = array( + $required = [ 'version' => $matches['version'], 'operator' => $matches['operator'], - ); + ]; } else { - $required = array( + $required = [ 'version' => $matches['version'], 'operator' => '==', - ); + ]; } $result[] = $required; } -- cgit v1.2.3