diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 09:30:18 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 16:34:56 +0100 |
commit | b80ebc96748b45fd2e0ba9323308657c4b00b7ec (patch) | |
tree | ec20e0ffa2f86b9b54939a83a785407319f94559 /lib/private/legacy/template/functions.php | |
parent | 62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff) | |
download | nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.tar.gz nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.zip |
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/legacy/template/functions.php')
-rw-r--r-- | lib/private/legacy/template/functions.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/legacy/template/functions.php b/lib/private/legacy/template/functions.php index d931e4d129f..9184da21bdb 100644 --- a/lib/private/legacy/template/functions.php +++ b/lib/private/legacy/template/functions.php @@ -196,11 +196,11 @@ function component($app, $file) { if(is_array($file)) { foreach($file as $f) { $url = link_to($app, 'component/' . $f . '.html'); - OC_Util::addHeader('link', array('rel' => 'import', 'href' => $url)); + OC_Util::addHeader('link', ['rel' => 'import', 'href' => $url]); } } else { $url = link_to($app, 'component/' . $file . '.html'); - OC_Util::addHeader('link', array('rel' => 'import', 'href' => $url)); + OC_Util::addHeader('link', ['rel' => 'import', 'href' => $url]); } } @@ -213,7 +213,7 @@ function component($app, $file) { * * For further information have a look at \OCP\IURLGenerator::linkTo */ -function link_to( $app, $file, $args = array() ) { +function link_to( $app, $file, $args = [] ) { return \OC::$server->getURLGenerator()->linkTo($app, $file, $args); } @@ -305,9 +305,9 @@ function relative_modified_date($timestamp, $fromTime = null, $dateOnly = false) return $formatter->formatTimeSpan($timestamp, $fromTime); } -function html_select_options($options, $selected, $params=array()) { +function html_select_options($options, $selected, $params=[]) { if (!is_array($selected)) { - $selected=array($selected); + $selected=[$selected]; } if (isset($params['combine']) && $params['combine']) { $options = array_combine($options, $options); |