Passed
Pull Request — master (#77)
by Daniel
02:12
created
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/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/Service/WebsitesService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -297,6 +297,6 @@
 block discarded – undo
297 297
 	 */
298 298
 	public function getLinkMode(): int
299 299
 	{
300
-		return (int) $this->configService->getAppValue(ConfigService::LINK_MODE);
300
+		return (int)$this->configService->getAppValue(ConfigService::LINK_MODE);
301 301
 	}
302 302
 }
Please login to merge, or discard this patch.
lib/Files/AbstractNode.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 */
116 116
 	public function isReadable(): bool
117 117
 	{
118
-		return ($this->getPermissions() & Constants::PERMISSION_READ) === Constants::PERMISSION_READ;
118
+		return ($this->getPermissions()&Constants::PERMISSION_READ) === Constants::PERMISSION_READ;
119 119
 	}
120 120
 
121 121
 	/**
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 	 */
124 124
 	public function isUpdateable(): bool
125 125
 	{
126
-		return ($this->getPermissions() & Constants::PERMISSION_UPDATE) === Constants::PERMISSION_UPDATE;
126
+		return ($this->getPermissions()&Constants::PERMISSION_UPDATE) === Constants::PERMISSION_UPDATE;
127 127
 	}
128 128
 
129 129
 	/**
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	 */
132 132
 	public function isDeletable(): bool
133 133
 	{
134
-		return ($this->getPermissions() & Constants::PERMISSION_DELETE) === Constants::PERMISSION_DELETE;
134
+		return ($this->getPermissions()&Constants::PERMISSION_DELETE) === Constants::PERMISSION_DELETE;
135 135
 	}
136 136
 
137 137
 	/**
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 	 */
142 142
 	protected function assertValidFileName(string $name)
143 143
 	{
144
-		if (in_array($name, [ '', '.', '..' ], true)) {
144
+		if (in_array($name, ['', '.', '..'], true)) {
145 145
 			throw new InvalidPathException();
146 146
 		}
147 147
 		if ((strpos($name, '/') !== false) || (strpos($name, '\\') !== false)) {
Please login to merge, or discard this patch.
lib/Settings/Admin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 		$exampleProxyUrl = $this->urlGenerator->getBaseUrl() . '/sites/' . urlencode($exampleSite);
62 62
 		$exampleFullUrl = $this->urlGenerator->linkToRouteAbsolute(
63 63
 			Application::APP_NAME . '.Pico.getPage',
64
-			[ 'site' => $exampleSite, 'page' => '' ]
64
+			['site' => $exampleSite, 'page' => '']
65 65
 		);
66 66
 
67 67
 		$internalBaseUrl = $this->urlGenerator->getBaseUrl() . '/index.php/apps/' . Application::APP_NAME;
Please login to merge, or discard this patch.
lib/Http/InternalServerErrorResponse.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, '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.