From b80ebc96748b45fd2e0ba9323308657c4b00b7ec Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Thu, 26 Mar 2020 09:30:18 +0100 Subject: Use the short array syntax, everywhere Signed-off-by: Christoph Wurst --- lib/private/legacy/template/functions.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/private/legacy/template') 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); -- cgit v1.2.3