@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | } |
| 111 | 111 | } catch (AppPathNotFoundException) { |
| 112 | 112 | $this->logger->error('Could not find resource {resource} to load', [ |
| 113 | - 'resource' => $app . '/' . $script . '.js', |
|
| 113 | + 'resource' => $app.'/'.$script.'.js', |
|
| 114 | 114 | 'app' => 'jsresourceloader', |
| 115 | 115 | ]); |
| 116 | 116 | } |
@@ -127,8 +127,8 @@ discard block |
||
| 127 | 127 | * @see appendIfExist() |
| 128 | 128 | */ |
| 129 | 129 | protected function appendScriptIfExist(string $root, string $file, string $webRoot = null) { |
| 130 | - if (!$this->appendIfExist($root, $file . '.mjs', $webRoot)) { |
|
| 131 | - return $this->appendIfExist($root, $file . '.js', $webRoot); |
|
| 130 | + if (!$this->appendIfExist($root, $file.'.mjs', $webRoot)) { |
|
| 131 | + return $this->appendIfExist($root, $file.'.js', $webRoot); |
|
| 132 | 132 | } |
| 133 | 133 | return true; |
| 134 | 134 | } |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | function emit_css_tag($href, $opts = '') { |
| 48 | 48 | $s = '<link rel="stylesheet"'; |
| 49 | 49 | if (!empty($href)) { |
| 50 | - $s .= ' href="' . $href .'"'; |
|
| 50 | + $s .= ' href="'.$href.'"'; |
|
| 51 | 51 | } |
| 52 | 52 | if (!empty($opts)) { |
| 53 | 53 | $s .= ' '.$opts; |
@@ -78,12 +78,12 @@ discard block |
||
| 78 | 78 | $nonceManager = \OC::$server->get(\OC\Security\CSP\ContentSecurityPolicyNonceManager::class); |
| 79 | 79 | |
| 80 | 80 | $defer_str = ' defer'; |
| 81 | - $type = $content_type !== '' ? ' type="' . $content_type . '"' : ''; |
|
| 81 | + $type = $content_type !== '' ? ' type="'.$content_type.'"' : ''; |
|
| 82 | 82 | |
| 83 | - $s = '<script nonce="' . $nonceManager->getNonce() . '"'; |
|
| 83 | + $s = '<script nonce="'.$nonceManager->getNonce().'"'; |
|
| 84 | 84 | if (!empty($src)) { |
| 85 | 85 | // emit script tag for deferred loading from $src |
| 86 | - $s .= $defer_str.' src="' . $src .'"' . $type . '>'; |
|
| 86 | + $s .= $defer_str.' src="'.$src.'"'.$type.'>'; |
|
| 87 | 87 | } elseif ($script_content !== '') { |
| 88 | 88 | // emit script tag for inline script from $script_content without defer (see MDN) |
| 89 | 89 | $s .= ">\n".$script_content."\n"; |
@@ -206,11 +206,11 @@ discard block |
||
| 206 | 206 | function component($app, $file) { |
| 207 | 207 | if (is_array($file)) { |
| 208 | 208 | foreach ($file as $f) { |
| 209 | - $url = link_to($app, 'component/' . $f . '.html'); |
|
| 209 | + $url = link_to($app, 'component/'.$f.'.html'); |
|
| 210 | 210 | OC_Util::addHeader('link', ['rel' => 'import', 'href' => $url]); |
| 211 | 211 | } |
| 212 | 212 | } else { |
| 213 | - $url = link_to($app, 'component/' . $file . '.html'); |
|
| 213 | + $url = link_to($app, 'component/'.$file.'.html'); |
|
| 214 | 214 | OC_Util::addHeader('link', ['rel' => 'import', 'href' => $url]); |
| 215 | 215 | } |
| 216 | 216 | } |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | function strip_time($timestamp) { |
| 296 | 296 | $date = new \DateTime("@{$timestamp}"); |
| 297 | 297 | $date->setTime(0, 0, 0); |
| 298 | - return (int)$date->format('U'); |
|
| 298 | + return (int) $date->format('U'); |
|
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | /** |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | $label = $label[$label_name]; |
| 340 | 340 | } |
| 341 | 341 | $select = in_array($value, $selected) ? ' selected="selected"' : ''; |
| 342 | - $html .= '<option value="' . \OCP\Util::sanitizeHTML($value) . '"' . $select . '>' . \OCP\Util::sanitizeHTML($label) . '</option>'."\n"; |
|
| 342 | + $html .= '<option value="'.\OCP\Util::sanitizeHTML($value).'"'.$select.'>'.\OCP\Util::sanitizeHTML($label).'</option>'."\n"; |
|
| 343 | 343 | } |
| 344 | 344 | return $html; |
| 345 | 345 | } |