Passed
Pull Request — master (#77)
by Daniel
02:37
created
lib/Files/MemoryFile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,6 +125,6 @@
 block discarded – undo
125 125
 	 */
126 126
 	public function getPermissions(): int
127 127
 	{
128
-		return Constants::PERMISSION_READ | Constants::PERMISSION_UPDATE | Constants::PERMISSION_DELETE;
128
+		return Constants::PERMISSION_READ|Constants::PERMISSION_UPDATE|Constants::PERMISSION_DELETE;
129 129
 	}
130 130
 }
Please login to merge, or discard this patch.
lib/Files/LocalFolder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
 		if (!@rmdir($this->getLocalPath())) {
71 71
 			$files = @scandir($this->getLocalPath());
72
-			if (($files === false) || ($files === [ '.', '..' ])) {
72
+			if (($files === false) || ($files === ['.', '..'])) {
73 73
 				throw new GenericFileException();
74 74
 			} else {
75 75
 				throw new NotPermittedException();
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 	 */
204 204
 	public function isCreatable(): bool
205 205
 	{
206
-		return ($this->getPermissions() & Constants::PERMISSION_CREATE) === Constants::PERMISSION_CREATE;
206
+		return ($this->getPermissions()&Constants::PERMISSION_CREATE) === Constants::PERMISSION_CREATE;
207 207
 	}
208 208
 
209 209
 	/**
Please login to merge, or discard this patch.
lib/Model/WebsiteCore.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 	 */
189 189
 	public function setType(int $type): self
190 190
 	{
191
-		if (!in_array($type, [ self::TYPE_PUBLIC, self::TYPE_PRIVATE ], true)) {
191
+		if (!in_array($type, [self::TYPE_PUBLIC, self::TYPE_PRIVATE], true)) {
192 192
 			throw new \UnexpectedValueException();
193 193
 		}
194 194
 
@@ -411,15 +411,15 @@  discard block
 block discarded – undo
411 411
 
412 412
 		$creation = 0;
413 413
 		if (!empty($data['creation'])) {
414
-			$creation = is_numeric($data['creation']) ? (int) $data['creation'] : strtotime($data['creation']);
414
+			$creation = is_numeric($data['creation']) ? (int)$data['creation'] : strtotime($data['creation']);
415 415
 		}
416 416
 
417
-		$this->setId(isset($data['id']) ? (int) $data['id'] : 0)
417
+		$this->setId(isset($data['id']) ? (int)$data['id'] : 0)
418 418
 			->setUserId($data['user_id'])
419 419
 			->setName($data['name'])
420 420
 			->setSite($data['site'])
421 421
 			->setTheme($data['theme'] ?? 'default')
422
-			->setType(isset($data['type']) ? (int) $data['type'] : self::TYPE_PUBLIC)
422
+			->setType(isset($data['type']) ? (int)$data['type'] : self::TYPE_PUBLIC)
423 423
 			->setOptions($options)
424 424
 			->setPath($data['path'])
425 425
 			->setCreation($creation)
Please login to merge, or discard this patch.
lib/Http/NotFoundResponse.php 1 patch
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, '404', [ 'message' => $message ], 'guest');
40
+		parent::__construct(Application::APP_NAME, '404', ['message' => $message], 'guest');
41 41
 		$this->setStatus(Http::STATUS_NOT_FOUND);
42 42
 	}
43 43
 }
Please login to merge, or discard this patch.
lib/Http/NotPermittedResponse.php 1 patch
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, '403', [ 'message' => $message ], 'guest');
40
+		parent::__construct(Application::APP_NAME, '403', ['message' => $message], 'guest');
41 41
 		$this->setStatus(Http::STATUS_FORBIDDEN);
42 42
 	}
43 43
 }
Please login to merge, or discard this patch.
lib/Pico.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@
 block discarded – undo
178 178
 		if ($this->htmlPurifier === null) {
179 179
 			$this->htmlPurifier = new HTMLPurifier(HTMLPurifier_Config::createDefault());
180 180
 
181
-			$this->triggerEvent('onHtmlPurifier', [ &$this->htmlPurifier ]);
181
+			$this->triggerEvent('onHtmlPurifier', [&$this->htmlPurifier]);
182 182
 		}
183 183
 
184 184
 		return $this->htmlPurifier;
Please login to merge, or discard this patch.
lib/Service/TemplatesService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@
 block discarded – undo
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()) {
Please login to merge, or discard this patch.
lib/Migration/AppDataRepairStep.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -237,7 +237,7 @@
 block discarded – undo
237 237
 	 */
238 238
 	private function log(string $message, int $level = ILogger::DEBUG)
239 239
 	{
240
-		$this->logger->log($level, $message, [ 'app' => Application::APP_NAME ]);
240
+		$this->logger->log($level, $message, ['app' => Application::APP_NAME]);
241 241
 	}
242 242
 
243 243
 	/**
Please login to merge, or discard this patch.
lib/Model/Plugin.php 1 patch
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 = static function (string $pluginFile) {
114
+		$includeClosure = static function(string $pluginFile) {
115 115
 			require($pluginFile);
116 116
 		};
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.