Passed
Push — master ( fce6df...8e01ff )
by Georg
14:04 queued 11s
created
apps/user_status/lib/Service/StatusService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	 * @return UserStatus[]
91 91
 	 */
92 92
 	public function findAll(?int $limit = null, ?int $offset = null): array {
93
-		return array_map(function ($status) {
93
+		return array_map(function($status) {
94 94
 			return $this->processStatus($status);
95 95
 		}, $this->mapper->findAll($limit, $offset));
96 96
 	}
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
 		// Check if status-type is valid
127 127
 		if (!\in_array($status, $this->allowedStatusTypes, true)) {
128
-			throw new InvalidStatusTypeException('Status-type "' . $status . '" is not supported');
128
+			throw new InvalidStatusTypeException('Status-type "'.$status.'" is not supported');
129 129
 		}
130 130
 		if ($statusTimestamp === null) {
131 131
 			$statusTimestamp = $this->timeFactory->getTime();
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 		}
165 165
 
166 166
 		if (!$this->predefinedStatusService->isValidId($messageId)) {
167
-			throw new InvalidMessageIdException('Message-Id "' . $messageId . '" is not supported');
167
+			throw new InvalidMessageIdException('Message-Id "'.$messageId.'" is not supported');
168 168
 		}
169 169
 
170 170
 		// Check that clearAt is in the future
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 		}
215 215
 		// Check for maximum length of custom message
216 216
 		if (\mb_strlen($message) > $this->maximumMessageLength) {
217
-			throw new StatusMessageTooLongException('Message is longer than supported length of ' . $this->maximumMessageLength . ' characters');
217
+			throw new StatusMessageTooLongException('Message is longer than supported length of '.$this->maximumMessageLength.' characters');
218 218
 		}
219 219
 		// Check that clearAt is in the future
220 220
 		if ($clearAt !== null && $clearAt < $this->timeFactory->getTime()) {
Please login to merge, or discard this patch.
apps/user_status/lib/Controller/StatusesController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,10 +59,10 @@
 block discarded – undo
59 59
 	 * @param int|null $offset
60 60
 	 * @return DataResponse
61 61
 	 */
62
-	public function findAll(?int $limit=null, ?int $offset=null): DataResponse {
62
+	public function findAll(?int $limit = null, ?int $offset = null): DataResponse {
63 63
 		$allStatuses = $this->service->findAll($limit, $offset);
64 64
 
65
-		return new DataResponse(array_map(function ($userStatus) {
65
+		return new DataResponse(array_map(function($userStatus) {
66 66
 			return $this->formatStatus($userStatus);
67 67
 		}, $allStatuses));
68 68
 	}
Please login to merge, or discard this patch.
apps/user_status/lib/Controller/UserStatusController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 			$status = $this->service->setStatus($this->userId, $statusType, null, true);
99 99
 			return new DataResponse($this->formatStatus($status));
100 100
 		} catch (InvalidStatusTypeException $ex) {
101
-			$this->logger->debug('New user-status for "' . $this->userId . '" was rejected due to an invalid status type "' . $statusType . '"');
101
+			$this->logger->debug('New user-status for "'.$this->userId.'" was rejected due to an invalid status type "'.$statusType.'"');
102 102
 			throw new OCSBadRequestException($ex->getMessage(), $ex);
103 103
 		}
104 104
 	}
@@ -117,10 +117,10 @@  discard block
 block discarded – undo
117 117
 			$status = $this->service->setPredefinedMessage($this->userId, $messageId, $clearAt);
118 118
 			return new DataResponse($this->formatStatus($status));
119 119
 		} catch (InvalidClearAtException $ex) {
120
-			$this->logger->debug('New user-status for "' . $this->userId . '" was rejected due to an invalid clearAt value "' . $clearAt . '"');
120
+			$this->logger->debug('New user-status for "'.$this->userId.'" was rejected due to an invalid clearAt value "'.$clearAt.'"');
121 121
 			throw new OCSBadRequestException($ex->getMessage(), $ex);
122 122
 		} catch (InvalidMessageIdException $ex) {
123
-			$this->logger->debug('New user-status for "' . $this->userId . '" was rejected due to an invalid message-id "' . $messageId . '"');
123
+			$this->logger->debug('New user-status for "'.$this->userId.'" was rejected due to an invalid message-id "'.$messageId.'"');
124 124
 			throw new OCSBadRequestException($ex->getMessage(), $ex);
125 125
 		}
126 126
 	}
@@ -141,13 +141,13 @@  discard block
 block discarded – undo
141 141
 			$status = $this->service->setCustomMessage($this->userId, $statusIcon, $message, $clearAt);
142 142
 			return new DataResponse($this->formatStatus($status));
143 143
 		} catch (InvalidClearAtException $ex) {
144
-			$this->logger->debug('New user-status for "' . $this->userId . '" was rejected due to an invalid clearAt value "' . $clearAt . '"');
144
+			$this->logger->debug('New user-status for "'.$this->userId.'" was rejected due to an invalid clearAt value "'.$clearAt.'"');
145 145
 			throw new OCSBadRequestException($ex->getMessage(), $ex);
146 146
 		} catch (InvalidStatusIconException $ex) {
147
-			$this->logger->debug('New user-status for "' . $this->userId . '" was rejected due to an invalid icon value "' . $statusIcon . '"');
147
+			$this->logger->debug('New user-status for "'.$this->userId.'" was rejected due to an invalid icon value "'.$statusIcon.'"');
148 148
 			throw new OCSBadRequestException($ex->getMessage(), $ex);
149 149
 		} catch (StatusMessageTooLongException $ex) {
150
-			$this->logger->debug('New user-status for "' . $this->userId . '" was rejected due to a too long status message.');
150
+			$this->logger->debug('New user-status for "'.$this->userId.'" was rejected due to a too long status message.');
151 151
 			throw new OCSBadRequestException($ex->getMessage(), $ex);
152 152
 		}
153 153
 	}
Please login to merge, or discard this patch.
apps/user_status/lib/Listener/BeforeTemplateRenderedListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
 			return;
66 66
 		}
67 67
 
68
-		$this->initialState->provideLazyInitialState(Application::APP_ID, 'status', function () {
68
+		$this->initialState->provideLazyInitialState(Application::APP_ID, 'status', function() {
69 69
 			return $this->jsDataService;
70 70
 		});
71 71
 
Please login to merge, or discard this patch.
apps/user_status/composer/autoload.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,6 +2,6 @@
 block discarded – undo
2 2
 
3 3
 // autoload.php @generated by Composer
4 4
 
5
-require_once __DIR__ . '/composer/autoload_real.php';
5
+require_once __DIR__.'/composer/autoload_real.php';
6 6
 
7 7
 return ComposerAutoloaderInitUserStatus::getLoader();
Please login to merge, or discard this patch.
apps/user_status/composer/composer/autoload_psr4.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,5 +6,5 @@
 block discarded – undo
6 6
 $baseDir = $vendorDir;
7 7
 
8 8
 return array(
9
-    'OCA\\UserStatus\\' => array($baseDir . '/../lib'),
9
+    'OCA\\UserStatus\\' => array($baseDir.'/../lib'),
10 10
 );
Please login to merge, or discard this patch.
apps/user_status/composer/composer/autoload_static.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -6,48 +6,48 @@
 block discarded – undo
6 6
 
7 7
 class ComposerStaticInitUserStatus
8 8
 {
9
-    public static $prefixLengthsPsr4 = array (
9
+    public static $prefixLengthsPsr4 = array(
10 10
         'O' => 
11
-        array (
11
+        array(
12 12
             'OCA\\UserStatus\\' => 15,
13 13
         ),
14 14
     );
15 15
 
16
-    public static $prefixDirsPsr4 = array (
16
+    public static $prefixDirsPsr4 = array(
17 17
         'OCA\\UserStatus\\' => 
18
-        array (
19
-            0 => __DIR__ . '/..' . '/../lib',
18
+        array(
19
+            0 => __DIR__.'/..'.'/../lib',
20 20
         ),
21 21
     );
22 22
 
23
-    public static $classMap = array (
24
-        'OCA\\UserStatus\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
25
-        'OCA\\UserStatus\\BackgroundJob\\ClearOldStatusesBackgroundJob' => __DIR__ . '/..' . '/../lib/BackgroundJob/ClearOldStatusesBackgroundJob.php',
26
-        'OCA\\UserStatus\\Capabilities' => __DIR__ . '/..' . '/../lib/Capabilities.php',
27
-        'OCA\\UserStatus\\Controller\\HeartbeatController' => __DIR__ . '/..' . '/../lib/Controller/HeartbeatController.php',
28
-        'OCA\\UserStatus\\Controller\\PredefinedStatusController' => __DIR__ . '/..' . '/../lib/Controller/PredefinedStatusController.php',
29
-        'OCA\\UserStatus\\Controller\\StatusesController' => __DIR__ . '/..' . '/../lib/Controller/StatusesController.php',
30
-        'OCA\\UserStatus\\Controller\\UserStatusController' => __DIR__ . '/..' . '/../lib/Controller/UserStatusController.php',
31
-        'OCA\\UserStatus\\Db\\UserStatus' => __DIR__ . '/..' . '/../lib/Db/UserStatus.php',
32
-        'OCA\\UserStatus\\Db\\UserStatusMapper' => __DIR__ . '/..' . '/../lib/Db/UserStatusMapper.php',
33
-        'OCA\\UserStatus\\Exception\\InvalidClearAtException' => __DIR__ . '/..' . '/../lib/Exception/InvalidClearAtException.php',
34
-        'OCA\\UserStatus\\Exception\\InvalidMessageIdException' => __DIR__ . '/..' . '/../lib/Exception/InvalidMessageIdException.php',
35
-        'OCA\\UserStatus\\Exception\\InvalidStatusIconException' => __DIR__ . '/..' . '/../lib/Exception/InvalidStatusIconException.php',
36
-        'OCA\\UserStatus\\Exception\\InvalidStatusTypeException' => __DIR__ . '/..' . '/../lib/Exception/InvalidStatusTypeException.php',
37
-        'OCA\\UserStatus\\Exception\\StatusMessageTooLongException' => __DIR__ . '/..' . '/../lib/Exception/StatusMessageTooLongException.php',
38
-        'OCA\\UserStatus\\Listener\\BeforeTemplateRenderedListener' => __DIR__ . '/..' . '/../lib/Listener/BeforeTemplateRenderedListener.php',
39
-        'OCA\\UserStatus\\Listener\\UserDeletedListener' => __DIR__ . '/..' . '/../lib/Listener/UserDeletedListener.php',
40
-        'OCA\\UserStatus\\Listener\\UserLiveStatusListener' => __DIR__ . '/..' . '/../lib/Listener/UserLiveStatusListener.php',
41
-        'OCA\\UserStatus\\Migration\\Version0001Date20200602134824' => __DIR__ . '/..' . '/../lib/Migration/Version0001Date20200602134824.php',
42
-        'OCA\\UserStatus\\Service\\EmojiService' => __DIR__ . '/..' . '/../lib/Service/EmojiService.php',
43
-        'OCA\\UserStatus\\Service\\JSDataService' => __DIR__ . '/..' . '/../lib/Service/JSDataService.php',
44
-        'OCA\\UserStatus\\Service\\PredefinedStatusService' => __DIR__ . '/..' . '/../lib/Service/PredefinedStatusService.php',
45
-        'OCA\\UserStatus\\Service\\StatusService' => __DIR__ . '/..' . '/../lib/Service/StatusService.php',
23
+    public static $classMap = array(
24
+        'OCA\\UserStatus\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php',
25
+        'OCA\\UserStatus\\BackgroundJob\\ClearOldStatusesBackgroundJob' => __DIR__.'/..'.'/../lib/BackgroundJob/ClearOldStatusesBackgroundJob.php',
26
+        'OCA\\UserStatus\\Capabilities' => __DIR__.'/..'.'/../lib/Capabilities.php',
27
+        'OCA\\UserStatus\\Controller\\HeartbeatController' => __DIR__.'/..'.'/../lib/Controller/HeartbeatController.php',
28
+        'OCA\\UserStatus\\Controller\\PredefinedStatusController' => __DIR__.'/..'.'/../lib/Controller/PredefinedStatusController.php',
29
+        'OCA\\UserStatus\\Controller\\StatusesController' => __DIR__.'/..'.'/../lib/Controller/StatusesController.php',
30
+        'OCA\\UserStatus\\Controller\\UserStatusController' => __DIR__.'/..'.'/../lib/Controller/UserStatusController.php',
31
+        'OCA\\UserStatus\\Db\\UserStatus' => __DIR__.'/..'.'/../lib/Db/UserStatus.php',
32
+        'OCA\\UserStatus\\Db\\UserStatusMapper' => __DIR__.'/..'.'/../lib/Db/UserStatusMapper.php',
33
+        'OCA\\UserStatus\\Exception\\InvalidClearAtException' => __DIR__.'/..'.'/../lib/Exception/InvalidClearAtException.php',
34
+        'OCA\\UserStatus\\Exception\\InvalidMessageIdException' => __DIR__.'/..'.'/../lib/Exception/InvalidMessageIdException.php',
35
+        'OCA\\UserStatus\\Exception\\InvalidStatusIconException' => __DIR__.'/..'.'/../lib/Exception/InvalidStatusIconException.php',
36
+        'OCA\\UserStatus\\Exception\\InvalidStatusTypeException' => __DIR__.'/..'.'/../lib/Exception/InvalidStatusTypeException.php',
37
+        'OCA\\UserStatus\\Exception\\StatusMessageTooLongException' => __DIR__.'/..'.'/../lib/Exception/StatusMessageTooLongException.php',
38
+        'OCA\\UserStatus\\Listener\\BeforeTemplateRenderedListener' => __DIR__.'/..'.'/../lib/Listener/BeforeTemplateRenderedListener.php',
39
+        'OCA\\UserStatus\\Listener\\UserDeletedListener' => __DIR__.'/..'.'/../lib/Listener/UserDeletedListener.php',
40
+        'OCA\\UserStatus\\Listener\\UserLiveStatusListener' => __DIR__.'/..'.'/../lib/Listener/UserLiveStatusListener.php',
41
+        'OCA\\UserStatus\\Migration\\Version0001Date20200602134824' => __DIR__.'/..'.'/../lib/Migration/Version0001Date20200602134824.php',
42
+        'OCA\\UserStatus\\Service\\EmojiService' => __DIR__.'/..'.'/../lib/Service/EmojiService.php',
43
+        'OCA\\UserStatus\\Service\\JSDataService' => __DIR__.'/..'.'/../lib/Service/JSDataService.php',
44
+        'OCA\\UserStatus\\Service\\PredefinedStatusService' => __DIR__.'/..'.'/../lib/Service/PredefinedStatusService.php',
45
+        'OCA\\UserStatus\\Service\\StatusService' => __DIR__.'/..'.'/../lib/Service/StatusService.php',
46 46
     );
47 47
 
48 48
     public static function getInitializer(ClassLoader $loader)
49 49
     {
50
-        return \Closure::bind(function () use ($loader) {
50
+        return \Closure::bind(function() use ($loader) {
51 51
             $loader->prefixLengthsPsr4 = ComposerStaticInitUserStatus::$prefixLengthsPsr4;
52 52
             $loader->prefixDirsPsr4 = ComposerStaticInitUserStatus::$prefixDirsPsr4;
53 53
             $loader->classMap = ComposerStaticInitUserStatus::$classMap;
Please login to merge, or discard this patch.
apps/user_status/composer/composer/autoload_real.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
     public static function loadClassLoader($class)
10 10
     {
11 11
         if ('Composer\Autoload\ClassLoader' === $class) {
12
-            require __DIR__ . '/ClassLoader.php';
12
+            require __DIR__.'/ClassLoader.php';
13 13
         }
14 14
     }
15 15
 
@@ -28,11 +28,11 @@  discard block
 block discarded – undo
28 28
 
29 29
         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30 30
         if ($useStaticLoader) {
31
-            require_once __DIR__ . '/autoload_static.php';
31
+            require_once __DIR__.'/autoload_static.php';
32 32
 
33 33
             call_user_func(\Composer\Autoload\ComposerStaticInitUserStatus::getInitializer($loader));
34 34
         } else {
35
-            $classMap = require __DIR__ . '/autoload_classmap.php';
35
+            $classMap = require __DIR__.'/autoload_classmap.php';
36 36
             if ($classMap) {
37 37
                 $loader->addClassMap($classMap);
38 38
             }
Please login to merge, or discard this patch.
apps/user_status/composer/composer/ClassLoader.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -370,18 +370,18 @@  discard block
 block discarded – undo
370 370
     private function findFileWithExtension($class, $ext)
371 371
     {
372 372
         // PSR-4 lookup
373
-        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
373
+        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR).$ext;
374 374
 
375 375
         $first = $class[0];
376 376
         if (isset($this->prefixLengthsPsr4[$first])) {
377 377
             $subPath = $class;
378 378
             while (false !== $lastPos = strrpos($subPath, '\\')) {
379 379
                 $subPath = substr($subPath, 0, $lastPos);
380
-                $search = $subPath . '\\';
380
+                $search = $subPath.'\\';
381 381
                 if (isset($this->prefixDirsPsr4[$search])) {
382
-                    $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
382
+                    $pathEnd = DIRECTORY_SEPARATOR.substr($logicalPathPsr4, $lastPos + 1);
383 383
                     foreach ($this->prefixDirsPsr4[$search] as $dir) {
384
-                        if (file_exists($file = $dir . $pathEnd)) {
384
+                        if (file_exists($file = $dir.$pathEnd)) {
385 385
                             return $file;
386 386
                         }
387 387
                     }
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 
392 392
         // PSR-4 fallback dirs
393 393
         foreach ($this->fallbackDirsPsr4 as $dir) {
394
-            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
394
+            if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr4)) {
395 395
                 return $file;
396 396
             }
397 397
         }
@@ -403,14 +403,14 @@  discard block
 block discarded – undo
403 403
                 . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
404 404
         } else {
405 405
             // PEAR-like class name
406
-            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
406
+            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR).$ext;
407 407
         }
408 408
 
409 409
         if (isset($this->prefixesPsr0[$first])) {
410 410
             foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
411 411
                 if (0 === strpos($class, $prefix)) {
412 412
                     foreach ($dirs as $dir) {
413
-                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
413
+                        if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) {
414 414
                             return $file;
415 415
                         }
416 416
                     }
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 
421 421
         // PSR-0 fallback dirs
422 422
         foreach ($this->fallbackDirsPsr0 as $dir) {
423
-            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
423
+            if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) {
424 424
                 return $file;
425 425
             }
426 426
         }
Please login to merge, or discard this patch.