diff options
Diffstat (limited to 'inc/StyleUtils.php')
-rw-r--r-- | inc/StyleUtils.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/inc/StyleUtils.php b/inc/StyleUtils.php index d5a34623a..eb078562a 100644 --- a/inc/StyleUtils.php +++ b/inc/StyleUtils.php @@ -9,7 +9,6 @@ namespace dokuwiki; */ class StyleUtils { - /** @var string current template */ protected $tpl; /** @var bool reinitialize styles config */ @@ -17,7 +16,7 @@ class StyleUtils /** @var bool $preview preview mode */ protected $preview; /** @var array default replacements to be merged with custom style configs */ - protected $defaultReplacements = array( + protected $defaultReplacements = [ '__text__' => "#000", '__background__' => "#fff", '__text_alt__' => "#999", @@ -26,8 +25,8 @@ class StyleUtils '__background_neu__' => "#ddd", '__border__' => "#ccc", '__highlight__' => "#ff9", - '__link__' => "#00f", - ); + '__link__' => "#00f" + ]; /** * StyleUtils constructor. @@ -66,7 +65,7 @@ class StyleUtils global $conf; global $config_cascade; - $stylesheets = array(); // mode, file => base + $stylesheets = []; // mode, file => base // guaranteed placeholder => value $replacements = $this->defaultReplacements; @@ -84,7 +83,7 @@ class StyleUtils $combined['stylesheets'] = []; $combined['replacements'] = []; - foreach (array('default', 'local', 'protected') as $config_group) { + foreach (['default', 'local', 'protected'] as $config_group) { if (empty($config_cascade['styleini'][$config_group])) continue; // set proper server dirs @@ -138,7 +137,7 @@ class StyleUtils { global $conf; if (!file_exists($incbase . $file)) { - list($extension, $basename) = array_map('strrev', sexplode('.', strrev($file), 2, '')); + [$extension, $basename] = array_map('strrev', sexplode('.', strrev($file), 2, '')); $newExtension = $extension === 'css' ? 'less' : 'css'; if (file_exists($incbase . $basename . '.' . $newExtension)) { $stylesheets[$mode][$incbase . $basename . '.' . $newExtension] = $webbase; |