Passed
Pull Request — master (#77)
by Daniel
02:30
created
lib/Files/AbstractStorageNode.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@
 block discarded – undo
29 29
 use OCP\Files\InvalidPathException;
30 30
 use OCP\Files\Node as OCNode;
31 31
 
32
-abstract class AbstractStorageNode extends AbstractNode implements NodeInterface
33
-{
32
+abstract class AbstractStorageNode extends AbstractNode implements NodeInterface {
34 33
 	/** @var OCNode */
35 34
 	protected $node;
36 35
 
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
@@ -31,8 +31,7 @@
 block discarded – undo
31 31
 use OCP\Files\InvalidPathException;
32 32
 use OCP\Files\NotFoundException;
33 33
 
34
-class PluginsService
35
-{
34
+class PluginsService {
36 35
 	/** @var ConfigService */
37 36
 	private $configService;
38 37
 
Please login to merge, or discard this patch.
appinfo/routes.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -27,21 +27,21 @@  discard block
 block discarded – undo
27 27
 			'name' => 'Pico#getAsset',
28 28
 			'url' => '/pico/{site}/assets/{asset}',
29 29
 			'verb' => 'GET',
30
-			'requirements' => [ 'asset' => '.+' ]
30
+			'requirements' => ['asset' => '.+']
31 31
 		],
32 32
 		[
33 33
 			'name' => 'Pico#getAsset',
34 34
 			'postfix' => 'ETag',
35 35
 			'url' => '/pico/{site}/assets_{assetsETag}/{asset}',
36 36
 			'verb' => 'GET',
37
-			'requirements' => [ 'asset' => '.+' ]
37
+			'requirements' => ['asset' => '.+']
38 38
 		],
39 39
 		[
40 40
 			'name' => 'Pico#getPage',
41 41
 			'url' => '/pico/{site}/{page}',
42 42
 			'verb' => 'GET',
43
-			'defaults' => [ 'page' => '' ],
44
-			'requirements' => [ 'page' => '.*' ]
43
+			'defaults' => ['page' => ''],
44
+			'requirements' => ['page' => '.*']
45 45
 		],
46 46
 
47 47
 		[
@@ -49,44 +49,44 @@  discard block
 block discarded – undo
49 49
 			'postfix' => 'Proxy',
50 50
 			'url' => '/pico_proxy/{site}/assets/{asset}',
51 51
 			'verb' => 'GET',
52
-			'requirements' => [ 'asset' => '.+' ]
52
+			'requirements' => ['asset' => '.+']
53 53
 		],
54 54
 		[
55 55
 			'name' => 'Pico#getAsset',
56 56
 			'postfix' => 'ProxyETag',
57 57
 			'url' => '/pico_proxy/{site}/assets_{assetsETag}/{asset}',
58 58
 			'verb' => 'GET',
59
-			'requirements' => [ 'asset' => '.+' ]
59
+			'requirements' => ['asset' => '.+']
60 60
 		],
61 61
 		[
62 62
 			'name' => 'Pico#getPage',
63 63
 			'postfix' => 'Proxy',
64 64
 			'url' => '/pico_proxy/{site}/{page}',
65 65
 			'verb' => 'GET',
66
-			'defaults' => [ 'page' => '', 'proxyRequest' => true ],
67
-			'requirements' => [ 'page' => '.*' ]
66
+			'defaults' => ['page' => '', 'proxyRequest' => true],
67
+			'requirements' => ['page' => '.*']
68 68
 		],
69 69
 
70
-		[ 'name' => 'Settings#getPersonalWebsites', 'url' => '/personal/websites', 'verb' => 'GET' ],
71
-		[ 'name' => 'Settings#createPersonalWebsite', 'url' => '/personal/websites', 'verb' => 'POST' ],
72
-		[ 'name' => 'Settings#updatePersonalWebsite', 'url' => '/personal/websites/{siteId}', 'verb' => 'POST' ],
73
-		[ 'name' => 'Settings#removePersonalWebsite', 'url' => '/personal/websites/{siteId}', 'verb' => 'DELETE' ],
70
+		['name' => 'Settings#getPersonalWebsites', 'url' => '/personal/websites', 'verb' => 'GET'],
71
+		['name' => 'Settings#createPersonalWebsite', 'url' => '/personal/websites', 'verb' => 'POST'],
72
+		['name' => 'Settings#updatePersonalWebsite', 'url' => '/personal/websites/{siteId}', 'verb' => 'POST'],
73
+		['name' => 'Settings#removePersonalWebsite', 'url' => '/personal/websites/{siteId}', 'verb' => 'DELETE'],
74 74
 
75
-		[ 'name' => 'Settings#getTemplates', 'url' => '/admin/templates', 'verb' => 'GET' ],
76
-		[ 'name' => 'Settings#addCustomTemplate', 'url' => '/admin/templates', 'verb' => 'POST' ],
77
-		[ 'name' => 'Settings#removeCustomTemplate', 'url' => '/admin/templates/{item}', 'verb' => 'DELETE' ],
75
+		['name' => 'Settings#getTemplates', 'url' => '/admin/templates', 'verb' => 'GET'],
76
+		['name' => 'Settings#addCustomTemplate', 'url' => '/admin/templates', 'verb' => 'POST'],
77
+		['name' => 'Settings#removeCustomTemplate', 'url' => '/admin/templates/{item}', 'verb' => 'DELETE'],
78 78
 
79
-		[ 'name' => 'Settings#getThemes', 'url' => '/admin/themes', 'verb' => 'GET' ],
80
-		[ 'name' => 'Settings#addCustomTheme', 'url' => '/admin/themes', 'verb' => 'POST' ],
81
-		[ 'name' => 'Settings#updateCustomTheme', 'url' => '/admin/themes/{item}', 'verb' => 'POST' ],
82
-		[ 'name' => 'Settings#removeCustomTheme', 'url' => '/admin/themes/{item}', 'verb' => 'DELETE' ],
79
+		['name' => 'Settings#getThemes', 'url' => '/admin/themes', 'verb' => 'GET'],
80
+		['name' => 'Settings#addCustomTheme', 'url' => '/admin/themes', 'verb' => 'POST'],
81
+		['name' => 'Settings#updateCustomTheme', 'url' => '/admin/themes/{item}', 'verb' => 'POST'],
82
+		['name' => 'Settings#removeCustomTheme', 'url' => '/admin/themes/{item}', 'verb' => 'DELETE'],
83 83
 
84
-		[ 'name' => 'Settings#getPlugins', 'url' => '/admin/plugins', 'verb' => 'GET' ],
85
-		[ 'name' => 'Settings#addCustomPlugin', 'url' => '/admin/plugins', 'verb' => 'POST' ],
86
-		[ 'name' => 'Settings#updateCustomPlugin', 'url' => '/admin/plugins/{item}', 'verb' => 'POST' ],
87
-		[ 'name' => 'Settings#removeCustomPlugin', 'url' => '/admin/plugins/{item}', 'verb' => 'DELETE' ],
84
+		['name' => 'Settings#getPlugins', 'url' => '/admin/plugins', 'verb' => 'GET'],
85
+		['name' => 'Settings#addCustomPlugin', 'url' => '/admin/plugins', 'verb' => 'POST'],
86
+		['name' => 'Settings#updateCustomPlugin', 'url' => '/admin/plugins/{item}', 'verb' => 'POST'],
87
+		['name' => 'Settings#removeCustomPlugin', 'url' => '/admin/plugins/{item}', 'verb' => 'DELETE'],
88 88
 
89
-		[ 'name' => 'Settings#setLinkMode', 'url' => '/admin/link_mode', 'verb' => 'POST' ],
89
+		['name' => 'Settings#setLinkMode', 'url' => '/admin/link_mode', 'verb' => 'POST'],
90 90
 	]
91 91
 ];
92 92
 
Please login to merge, or discard this patch.
lib/Db/WebsitesRequestBuilder.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@
 block discarded – undo
28 28
 use OCA\CMSPico\Model\Website;
29 29
 use OCP\DB\QueryBuilder\IQueryBuilder;
30 30
 
31
-class WebsitesRequestBuilder extends CoreRequestBuilder
32
-{
31
+class WebsitesRequestBuilder extends CoreRequestBuilder {
33 32
 	/**
34 33
 	 * @return IQueryBuilder
35 34
 	 */
Please login to merge, or discard this patch.
lib/Migration/Version010000.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -143,11 +143,11 @@  discard block
 block discarded – undo
143 143
 		}
144 144
 
145 145
 		if (!$table->hasIndex('user_id')) {
146
-			$table->addIndex([ 'user_id' ], 'user_id');
146
+			$table->addIndex(['user_id'], 'user_id');
147 147
 		}
148 148
 
149 149
 		if (!$table->hasIndex('site')) {
150
-			$table->addIndex([ 'site' ], 'site');
150
+			$table->addIndex(['site'], 'site');
151 151
 		}
152 152
 
153 153
 		return $schema;
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 		$qbUpdate
177 177
 			->update(CoreRequestBuilder::TABLE_WEBSITES, 'w')
178 178
 			->set('w.type', $qbUpdate->createParameter('type'))
179
-			->set('w.options',$qbUpdate->createParameter('options'))
179
+			->set('w.options', $qbUpdate->createParameter('options'))
180 180
 			->where($qbUpdate->expr()->eq('w.id', $qbUpdate->createParameter('id')));
181 181
 
182 182
 		$selectCursor = $this->databaseConnection->getQueryBuilder()
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,7 @@
 block discarded – undo
45 45
 use OCP\Migration\IOutput;
46 46
 use OCP\Migration\SimpleMigrationStep;
47 47
 
48
-class Version010000 extends SimpleMigrationStep
49
-{
48
+class Version010000 extends SimpleMigrationStep {
50 49
 	/** @var IDBConnection */
51 50
 	private $databaseConnection;
52 51
 
Please login to merge, or discard this patch.
lib/Http/InternalServerErrorResponse.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 	 */
38 38
 	public function __construct(string $message = null)
39 39
 	{
40
-		parent::__construct(Application::APP_NAME, '500', [ 'message' => $message ], 'guest');
40
+		parent::__construct(Application::APP_NAME, '500', ['message' => $message], 'guest');
41 41
 		$this->setStatus(Http::STATUS_INTERNAL_SERVER_ERROR);
42 42
 	}
43 43
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@
 block discarded – undo
28 28
 use OCP\AppFramework\Http;
29 29
 use OCP\AppFramework\Http\TemplateResponse;
30 30
 
31
-class InternalServerErrorResponse extends TemplateResponse
32
-{
31
+class InternalServerErrorResponse extends TemplateResponse {
33 32
 	/**
34 33
 	 * InternalServerErrorResponse constructor.
35 34
 	 *
Please login to merge, or discard this patch.
lib/Exceptions/ThemeNotCompatibleException.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 		}
70 70
 
71 71
 		$reasonData = $this->reasonData;
72
-		$replaceCallback = function (array $matches) use ($reasonData) {
72
+		$replaceCallback = function(array $matches) use ($reasonData) {
73 73
 			return $reasonData[$matches[1]] ?? '';
74 74
 		};
75 75
 
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 ThemeNotCompatibleException extends \Exception
28
-{
27
+class ThemeNotCompatibleException extends \Exception {
29 28
 	/** @var string */
30 29
 	private $themeName;
31 30
 
Please login to merge, or discard this patch.
lib/Model/Theme.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@
 block discarded – undo
116 116
 				throw new ThemeNotCompatibleException(
117 117
 					$this->getName(),
118 118
 					'Incompatible theme: Twig template "{file}" not found.',
119
-					[ 'file' => $this->getName() . '/index.twig' ]
119
+					['file' => $this->getName() . '/index.twig']
120 120
 				);
121 121
 			}
122 122
 
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\ThemeNotCompatibleException;
28 28
 use OCA\CMSPico\Files\LocalFolder;
29 29
 
30
-class Theme implements \JsonSerializable
31
-{
30
+class Theme implements \JsonSerializable {
32 31
 	/** @var int */
33 32
 	const THEME_TYPE_SYSTEM = 1;
34 33
 
Please login to merge, or discard this patch.
lib/Service/ThemesService.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,8 +35,7 @@
 block discarded – undo
35 35
 use OCP\Files\InvalidPathException;
36 36
 use OCP\Files\NotFoundException;
37 37
 
38
-class ThemesService
39
-{
38
+class ThemesService {
40 39
 	/** @var ConfigService */
41 40
 	private $configService;
42 41
 
Please login to merge, or discard this patch.