diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-14 17:32:49 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-14 17:32:49 +0200 |
commit | 160a0dfebaeb21cc75d7166dfbac6d0ef1a51460 (patch) | |
tree | 28e2555c97462d60356ef933d5c71c5326649747 /config | |
parent | acc2df1251a1c1b9ec5ede13bdf46d516dc64b0d (diff) |
convert array() to []
Diffstat (limited to 'config')
-rw-r--r-- | config/appconfig.php | 20 |
1 files changed, 10 insertions, 10 deletions
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('/^(?<operator><|<=|>=|>|<>)?(?<version>.*)$/', $version, $matches); if($matches['operator'] !== '') { - $required = array( + $required = [ 'version' => $matches['version'], 'operator' => $matches['operator'], - ); + ]; } else { - $required = array( + $required = [ 'version' => $matches['version'], 'operator' => '==', - ); + ]; } $result[] = $required; } |