Passed
Pull Request — master (#77)
by Daniel
02:29
created
appinfo/routes.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Service/PluginsService.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Exceptions/PluginNotCompatibleException.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Exceptions/PluginNotFoundException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
lib/Model/Plugin.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 			return;
112 112
 		}
113 113
 
114
-		$includeClosure = \Closure::bind(function (string $pluginFile) {
114
+		$includeClosure = \Closure::bind(function(string $pluginFile) {
115 115
 			require($pluginFile);
116 116
 		}, null);
117 117
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 				throw new PluginNotCompatibleException(
121 121
 					$this->getName(),
122 122
 					'Incompatible plugin: Plugin file "{file}" not found.',
123
-					[ 'file' => $this->getName() . '/' . $this->getName() . '.php' ]
123
+					['file' => $this->getName() . '/' . $this->getName() . '.php']
124 124
 				);
125 125
 			}
126 126
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 				throw new PluginNotCompatibleException(
132 132
 					$this->getName(),
133 133
 					'Incompatible plugin: Plugin class "{class}" not found.',
134
-					[ 'class' => $className ]
134
+					['class' => $className]
135 135
 				);
136 136
 			}
137 137
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 					$this->getName(),
147 147
 					'Incompatible plugin: Plugins for Pico CMS for Nextcloud must use API version {minApiVersion} '
148 148
 							. 'or later, but this plugin uses API version {apiVersion}.',
149
-					[ 'minApiVersion' => \Pico::API_VERSION, 'apiVersion' => $apiVersion ]
149
+					['minApiVersion' => \Pico::API_VERSION, 'apiVersion' => $apiVersion]
150 150
 				);
151 151
 			}
152 152
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@
 block discarded – undo
27 27
 use OCA\CMSPico\Exceptions\PluginNotCompatibleException;
28 28
 use OCA\CMSPico\Files\LocalFolder;
29 29
 
30
-class Plugin implements \JsonSerializable
31
-{
30
+class Plugin implements \JsonSerializable {
32 31
 	/** @var int */
33 32
 	const PLUGIN_TYPE_SYSTEM = 1;
34 33
 
Please login to merge, or discard this patch.