@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | return; |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | - $includeClosure = static function (string $pluginFile) { |
|
| 114 | + $includeClosure = static function(string $pluginFile) { |
|
| 115 | 115 | /** @noinspection PhpIncludeInspection */ |
| 116 | 116 | require($pluginFile); |
| 117 | 117 | }; |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | throw new PluginNotCompatibleException( |
| 122 | 122 | $this->getName(), |
| 123 | 123 | 'Incompatible plugin: Plugin file "{file}" not found.', |
| 124 | - [ 'file' => $this->getName() . '/' . $this->getName() . '.php' ] |
|
| 124 | + ['file' => $this->getName() . '/' . $this->getName() . '.php'] |
|
| 125 | 125 | ); |
| 126 | 126 | } |
| 127 | 127 | |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | throw new PluginNotCompatibleException( |
| 133 | 133 | $this->getName(), |
| 134 | 134 | 'Incompatible plugin: Plugin class "{class}" not found.', |
| 135 | - [ 'class' => $className ] |
|
| 135 | + ['class' => $className] |
|
| 136 | 136 | ); |
| 137 | 137 | } |
| 138 | 138 | |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | $this->getName(), |
| 148 | 148 | 'Incompatible plugin: Plugins for Pico CMS for Nextcloud must use API version {minApiVersion} ' |
| 149 | 149 | . 'or later, but this plugin uses API version {apiVersion}.', |
| 150 | - [ 'minApiVersion' => \Pico::API_VERSION, 'apiVersion' => $apiVersion ] |
|
| 150 | + ['minApiVersion' => \Pico::API_VERSION, 'apiVersion' => $apiVersion] |
|
| 151 | 151 | ); |
| 152 | 152 | } |
| 153 | 153 | |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | */ |
| 51 | 51 | private function init() |
| 52 | 52 | { |
| 53 | - $this->folders = [ $this->folder ]; |
|
| 53 | + $this->folders = [$this->folder]; |
|
| 54 | 54 | $this->current = $this->folder; |
| 55 | 55 | $this->depth = 0; |
| 56 | 56 | |
@@ -127,7 +127,7 @@ |
||
| 127 | 127 | */ |
| 128 | 128 | public function getPermissions(): int |
| 129 | 129 | { |
| 130 | - return Constants::PERMISSION_READ | Constants::PERMISSION_DELETE; |
|
| 130 | + return Constants::PERMISSION_READ|Constants::PERMISSION_DELETE; |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | /** |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | |
| 161 | 161 | /** @var OCFolder $viewerOCFolder */ |
| 162 | 162 | $viewerOCFolder = \OC::$server->getUserFolder($this->getViewer()); |
| 163 | - $viewerAccessClosure = function (OCNode $node) use ($viewerOCFolder) { |
|
| 163 | + $viewerAccessClosure = function(OCNode $node) use ($viewerOCFolder) { |
|
| 164 | 164 | $nodeId = $node->getId(); |
| 165 | 165 | |
| 166 | 166 | $viewerNodes = $viewerOCFolder->getById($nodeId); |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | { |
| 358 | 358 | if (!$this->getProxyRequest()) { |
| 359 | 359 | $route = Application::APP_NAME . '.Pico.getPage'; |
| 360 | - $parameters = [ 'site' => $this->getSite(), 'page' => '' ]; |
|
| 360 | + $parameters = ['site' => $this->getSite(), 'page' => '']; |
|
| 361 | 361 | return $this->urlGenerator->linkToRoute($route, $parameters) . '/'; |
| 362 | 362 | } else { |
| 363 | 363 | return \OC::$WEBROOT . '/sites/' . urlencode($this->getSite()) . '/'; |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | throw $e; |
| 156 | 156 | } catch (\Exception $e) { |
| 157 | 157 | $exception = new PicoRuntimeException($e); |
| 158 | - $this->logger->logException($exception, [ 'app' => Application::APP_NAME ]); |
|
| 158 | + $this->logger->logException($exception, ['app' => Application::APP_NAME]); |
|
| 159 | 159 | throw $exception; |
| 160 | 160 | } |
| 161 | 161 | |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | */ |
| 211 | 211 | private function loadPicoPlugins(Pico $pico) |
| 212 | 212 | { |
| 213 | - $includeClosure = static function (string $pluginFile) { |
|
| 213 | + $includeClosure = static function(string $pluginFile) { |
|
| 214 | 214 | /** @noinspection PhpIncludeInspection */ |
| 215 | 215 | require($pluginFile); |
| 216 | 216 | }; |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | } |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | - return [ $folder, rtrim($basePath, '/'), $relativePath ]; |
|
| 278 | + return [$folder, rtrim($basePath, '/'), $relativePath]; |
|
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | /** |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | |
| 26 | 26 | /** @var $_ array */ |
| 27 | 27 | /** @var $l \OCP\IL10N */ |
| 28 | -script(Application::APP_NAME, [ 'pico', 'personal' ]); |
|
| 28 | +script(Application::APP_NAME, ['pico', 'personal']); |
|
| 29 | 29 | style(Application::APP_NAME, 'pico'); |
| 30 | 30 | |
| 31 | 31 | ?> |
@@ -31,6 +31,6 @@ |
||
| 31 | 31 | <h2><?php p($l->t('Internal Server Error')); ?></h2> |
| 32 | 32 | <p class="infogroup"><?php p($_['message'] ?? ''); ?></p> |
| 33 | 33 | <p><a class="button primary" href="<?php p(\OC::$server->getURLGenerator()->linkTo('', 'index.php')); ?>"> |
| 34 | - <?php p($l->t('Back to %s', [ $theme->getName() ])); ?> |
|
| 34 | + <?php p($l->t('Back to %s', [$theme->getName()])); ?> |
|
| 35 | 35 | </a></p> |
| 36 | 36 | </div> |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | |
| 26 | 26 | /** @var $_ array */ |
| 27 | 27 | /** @var $l \OCP\IL10N */ |
| 28 | -script(Application::APP_NAME, [ 'pico', 'admin' ]); |
|
| 28 | +script(Application::APP_NAME, ['pico', 'admin']); |
|
| 29 | 29 | style(Application::APP_NAME, 'pico'); |
| 30 | 30 | |
| 31 | 31 | ?> |
@@ -31,6 +31,6 @@ |
||
| 31 | 31 | <h2><?php p($l->t('Not found')); ?></h2> |
| 32 | 32 | <p class="infogroup"><?php p($_['message'] ?? ''); ?></p> |
| 33 | 33 | <p><a class="button primary" href="<?php p(\OC::$server->getURLGenerator()->linkTo('', 'index.php')); ?>"> |
| 34 | - <?php p($l->t('Back to %s', [ $theme->getName() ])); ?> |
|
| 34 | + <?php p($l->t('Back to %s', [$theme->getName()])); ?> |
|
| 35 | 35 | </a></p> |
| 36 | 36 | </div> |