@@ -41,8 +41,7 @@ |
||
41 | 41 | use OCP\Files\NotPermittedException; |
42 | 42 | use OCP\ILogger; |
43 | 43 | |
44 | -class PicoService |
|
45 | -{ |
|
44 | +class PicoService { |
|
46 | 45 | /** @var string */ |
47 | 46 | const DIR_TEMPLATES = 'templates'; |
48 | 47 |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | throw $e; |
143 | 143 | } catch (\Exception $e) { |
144 | 144 | $exception = new PicoRuntimeException($e); |
145 | - $this->logger->logException($exception, [ 'app' => Application::APP_NAME ]); |
|
145 | + $this->logger->logException($exception, ['app' => Application::APP_NAME]); |
|
146 | 146 | throw $exception; |
147 | 147 | } |
148 | 148 | |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | */ |
194 | 194 | private function loadPicoPlugins(Pico $pico) |
195 | 195 | { |
196 | - $includeClosure = static function (string $pluginFile) { |
|
196 | + $includeClosure = static function(string $pluginFile) { |
|
197 | 197 | require($pluginFile); |
198 | 198 | }; |
199 | 199 |
@@ -28,8 +28,7 @@ |
||
28 | 28 | use OCA\CMSPico\AppInfo\Application; |
29 | 29 | use OCP\IConfig; |
30 | 30 | |
31 | -class ConfigService |
|
32 | -{ |
|
31 | +class ConfigService { |
|
33 | 32 | /** @var string */ |
34 | 33 | const CUSTOM_TEMPLATES = 'custom_templates'; |
35 | 34 |
@@ -42,8 +42,7 @@ |
||
42 | 42 | * bei der Antwort cacheFor() mit sehr großen Zahlen verwendet. Damit man die in Pico aber überhaupt nutzen kann |
43 | 43 | * braucht's ein %asset_dir% und {{ asset_dir }}. Sollte auch zu Pico 2.0.5-6 backported werden... |
44 | 44 | */ |
45 | -class AssetsService |
|
46 | -{ |
|
45 | +class AssetsService { |
|
47 | 46 | /** @var IRootFolder */ |
48 | 47 | private $rootFolder; |
49 | 48 |
@@ -139,7 +139,7 @@ |
||
139 | 139 | */ |
140 | 140 | public function installTemplates(Website $website) |
141 | 141 | { |
142 | - $filesIterator = function (FolderInterface $folder, string $basePath = '') use (&$filesIterator) { |
|
142 | + $filesIterator = function(FolderInterface $folder, string $basePath = '') use (&$filesIterator) { |
|
143 | 143 | $files = []; |
144 | 144 | foreach ($folder->listing() as $node) { |
145 | 145 | if ($node->isFolder()) { |
@@ -34,8 +34,7 @@ |
||
34 | 34 | use OCP\Files\InvalidPathException; |
35 | 35 | use OCP\Files\NotFoundException; |
36 | 36 | |
37 | -class TemplatesService |
|
38 | -{ |
|
37 | +class TemplatesService { |
|
39 | 38 | /** @var ConfigService */ |
40 | 39 | private $configService; |
41 | 40 |
@@ -32,8 +32,7 @@ |
||
32 | 32 | use OCP\Files\InvalidPathException; |
33 | 33 | use OCP\Files\NotFoundException; |
34 | 34 | |
35 | -class ThemesService |
|
36 | -{ |
|
35 | +class ThemesService { |
|
37 | 36 | /** @var AppManager */ |
38 | 37 | private $appManager; |
39 | 38 |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | |
24 | 24 | return [ |
25 | 25 | 'routes' => [ |
26 | - [ 'name' => 'Pico#getRoot', 'url' => '/pico/{site}/', 'verb' => 'GET' ], |
|
26 | + ['name' => 'Pico#getRoot', 'url' => '/pico/{site}/', 'verb' => 'GET'], |
|
27 | 27 | [ |
28 | 28 | 'name' => 'Pico#getPage', |
29 | 29 | 'url' => '/pico/{site}/{page}', |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | 'requirements' => array('page' => '.+') |
32 | 32 | ], |
33 | 33 | |
34 | - [ 'name' => 'Pico#getRootProxy', 'url' => '/pico_proxy/{site}/', 'verb' => 'GET' ], |
|
34 | + ['name' => 'Pico#getRootProxy', 'url' => '/pico_proxy/{site}/', 'verb' => 'GET'], |
|
35 | 35 | [ |
36 | 36 | 'name' => 'Pico#getPageProxy', |
37 | 37 | 'url' => '/pico_proxy/{site}/{page}', |
@@ -39,24 +39,24 @@ discard block |
||
39 | 39 | 'requirements' => array('page' => '.+') |
40 | 40 | ], |
41 | 41 | |
42 | - [ 'name' => 'Settings#getPersonalWebsites', 'url' => '/personal/websites', 'verb' => 'GET' ], |
|
43 | - [ 'name' => 'Settings#createPersonalWebsite', 'url' => '/personal/websites', 'verb' => 'POST' ], |
|
44 | - [ 'name' => 'Settings#updatePersonalWebsite', 'url' => '/personal/websites/{siteId}', 'verb' => 'POST' ], |
|
45 | - [ 'name' => 'Settings#removePersonalWebsite', 'url' => '/personal/websites/{siteId}', 'verb' => 'DELETE' ], |
|
42 | + ['name' => 'Settings#getPersonalWebsites', 'url' => '/personal/websites', 'verb' => 'GET'], |
|
43 | + ['name' => 'Settings#createPersonalWebsite', 'url' => '/personal/websites', 'verb' => 'POST'], |
|
44 | + ['name' => 'Settings#updatePersonalWebsite', 'url' => '/personal/websites/{siteId}', 'verb' => 'POST'], |
|
45 | + ['name' => 'Settings#removePersonalWebsite', 'url' => '/personal/websites/{siteId}', 'verb' => 'DELETE'], |
|
46 | 46 | |
47 | - [ 'name' => 'Settings#getTemplates', 'url' => '/admin/templates', 'verb' => 'GET' ], |
|
48 | - [ 'name' => 'Settings#addCustomTemplate', 'url' => '/admin/templates', 'verb' => 'POST' ], |
|
49 | - [ 'name' => 'Settings#removeCustomTemplate', 'url' => '/admin/templates/{item}', 'verb' => 'DELETE' ], |
|
47 | + ['name' => 'Settings#getTemplates', 'url' => '/admin/templates', 'verb' => 'GET'], |
|
48 | + ['name' => 'Settings#addCustomTemplate', 'url' => '/admin/templates', 'verb' => 'POST'], |
|
49 | + ['name' => 'Settings#removeCustomTemplate', 'url' => '/admin/templates/{item}', 'verb' => 'DELETE'], |
|
50 | 50 | |
51 | - [ 'name' => 'Settings#getThemes', 'url' => '/admin/themes', 'verb' => 'GET' ], |
|
52 | - [ 'name' => 'Settings#addCustomTheme', 'url' => '/admin/themes', 'verb' => 'POST' ], |
|
53 | - [ 'name' => 'Settings#updateCustomTheme', 'url' => '/admin/themes/{item}', 'verb' => 'POST' ], |
|
54 | - [ 'name' => 'Settings#removeCustomTheme', 'url' => '/admin/themes/{item}', 'verb' => 'DELETE' ], |
|
51 | + ['name' => 'Settings#getThemes', 'url' => '/admin/themes', 'verb' => 'GET'], |
|
52 | + ['name' => 'Settings#addCustomTheme', 'url' => '/admin/themes', 'verb' => 'POST'], |
|
53 | + ['name' => 'Settings#updateCustomTheme', 'url' => '/admin/themes/{item}', 'verb' => 'POST'], |
|
54 | + ['name' => 'Settings#removeCustomTheme', 'url' => '/admin/themes/{item}', 'verb' => 'DELETE'], |
|
55 | 55 | |
56 | - [ 'name' => 'Settings#getPlugins', 'url' => '/admin/plugins', 'verb' => 'GET' ], |
|
57 | - [ 'name' => 'Settings#addCustomPlugin', 'url' => '/admin/plugins', 'verb' => 'POST' ], |
|
58 | - [ 'name' => 'Settings#updateCustomPlugin', 'url' => '/admin/plugins/{item}', 'verb' => 'POST' ], |
|
59 | - [ 'name' => 'Settings#removeCustomPlugin', 'url' => '/admin/plugins/{item}', 'verb' => 'DELETE' ], |
|
56 | + ['name' => 'Settings#getPlugins', 'url' => '/admin/plugins', 'verb' => 'GET'], |
|
57 | + ['name' => 'Settings#addCustomPlugin', 'url' => '/admin/plugins', 'verb' => 'POST'], |
|
58 | + ['name' => 'Settings#updateCustomPlugin', 'url' => '/admin/plugins/{item}', 'verb' => 'POST'], |
|
59 | + ['name' => 'Settings#removeCustomPlugin', 'url' => '/admin/plugins/{item}', 'verb' => 'DELETE'], |
|
60 | 60 | ] |
61 | 61 | ]; |
62 | 62 |
@@ -30,8 +30,7 @@ |
||
30 | 30 | use OCP\Files\InvalidPathException; |
31 | 31 | use OCP\Files\NotFoundException; |
32 | 32 | |
33 | -class PluginsService |
|
34 | -{ |
|
33 | +class PluginsService { |
|
35 | 34 | /** @var AppManager */ |
36 | 35 | private $appManager; |
37 | 36 |
@@ -65,7 +65,7 @@ |
||
65 | 65 | public function getReason(): string |
66 | 66 | { |
67 | 67 | $reasonData = $this->reasonData; |
68 | - $replaceCallback = function (array $matches) use ($reasonData) { |
|
68 | + $replaceCallback = function(array $matches) use ($reasonData) { |
|
69 | 69 | return $reasonData[$matches[1]] ?? ''; |
70 | 70 | }; |
71 | 71 |
@@ -24,8 +24,7 @@ |
||
24 | 24 | |
25 | 25 | namespace OCA\CMSPico\Exceptions; |
26 | 26 | |
27 | -class PluginNotCompatibleException extends \Exception |
|
28 | -{ |
|
27 | +class PluginNotCompatibleException extends \Exception { |
|
29 | 28 | /** @var string */ |
30 | 29 | private $pluginName; |
31 | 30 |
@@ -24,7 +24,6 @@ |
||
24 | 24 | |
25 | 25 | namespace OCA\CMSPico\Exceptions; |
26 | 26 | |
27 | -class PluginNotFoundException extends \Exception |
|
28 | -{ |
|
27 | +class PluginNotFoundException extends \Exception { |
|
29 | 28 | |
30 | 29 | } |