@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | * @return UserStatus[] |
107 | 107 | */ |
108 | 108 | public function findAll(?int $limit = null, ?int $offset = null): array { |
109 | - return array_map(function ($status) { |
|
109 | + return array_map(function($status) { |
|
110 | 110 | return $this->processStatus($status); |
111 | 111 | }, $this->mapper->findAll($limit, $offset)); |
112 | 112 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @return array |
118 | 118 | */ |
119 | 119 | public function findAllRecentStatusChanges(?int $limit = null, ?int $offset = null): array { |
120 | - return array_map(function ($status) { |
|
120 | + return array_map(function($status) { |
|
121 | 121 | return $this->processStatus($status); |
122 | 122 | }, $this->mapper->findAllRecent($limit, $offset)); |
123 | 123 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | * @return UserStatus[] |
137 | 137 | */ |
138 | 138 | public function findByUserIds(array $userIds):array { |
139 | - return array_map(function ($status) { |
|
139 | + return array_map(function($status) { |
|
140 | 140 | return $this->processStatus($status); |
141 | 141 | }, $this->mapper->findByUserIds($userIds)); |
142 | 142 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | // Check if status-type is valid |
164 | 164 | if (!\in_array($status, self::PRIORITY_ORDERED_STATUSES, true)) { |
165 | - throw new InvalidStatusTypeException('Status-type "' . $status . '" is not supported'); |
|
165 | + throw new InvalidStatusTypeException('Status-type "'.$status.'" is not supported'); |
|
166 | 166 | } |
167 | 167 | if ($statusTimestamp === null) { |
168 | 168 | $statusTimestamp = $this->timeFactory->getTime(); |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | } |
202 | 202 | |
203 | 203 | if (!$this->predefinedStatusService->isValidId($messageId)) { |
204 | - throw new InvalidMessageIdException('Message-Id "' . $messageId . '" is not supported'); |
|
204 | + throw new InvalidMessageIdException('Message-Id "'.$messageId.'" is not supported'); |
|
205 | 205 | } |
206 | 206 | |
207 | 207 | // Check that clearAt is in the future |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | } |
252 | 252 | // Check for maximum length of custom message |
253 | 253 | if (\mb_strlen($message) > self::MAXIMUM_MESSAGE_LENGTH) { |
254 | - throw new StatusMessageTooLongException('Message is longer than supported length of ' . self::MAXIMUM_MESSAGE_LENGTH . ' characters'); |
|
254 | + throw new StatusMessageTooLongException('Message is longer than supported length of '.self::MAXIMUM_MESSAGE_LENGTH.' characters'); |
|
255 | 255 | } |
256 | 256 | // Check that clearAt is in the future |
257 | 257 | if ($clearAt !== null && $clearAt < $this->timeFactory->getTime()) { |
@@ -60,7 +60,7 @@ |
||
60 | 60 | $this->status = IUserStatus::OFFLINE; |
61 | 61 | } |
62 | 62 | if ($status->getClearAt() !== null) { |
63 | - $this->clearAt = DateTimeImmutable::createFromFormat('U', (string)$status->getClearAt()); |
|
63 | + $this->clearAt = DateTimeImmutable::createFromFormat('U', (string) $status->getClearAt()); |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 |
@@ -6,52 +6,52 @@ |
||
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\\Connector\\UserStatus' => __DIR__ . '/..' . '/../lib/Connector/UserStatus.php', |
|
28 | - 'OCA\\UserStatus\\Connector\\UserStatusProvider' => __DIR__ . '/..' . '/../lib/Connector/UserStatusProvider.php', |
|
29 | - 'OCA\\UserStatus\\Controller\\HeartbeatController' => __DIR__ . '/..' . '/../lib/Controller/HeartbeatController.php', |
|
30 | - 'OCA\\UserStatus\\Controller\\PredefinedStatusController' => __DIR__ . '/..' . '/../lib/Controller/PredefinedStatusController.php', |
|
31 | - 'OCA\\UserStatus\\Controller\\StatusesController' => __DIR__ . '/..' . '/../lib/Controller/StatusesController.php', |
|
32 | - 'OCA\\UserStatus\\Controller\\UserStatusController' => __DIR__ . '/..' . '/../lib/Controller/UserStatusController.php', |
|
33 | - 'OCA\\UserStatus\\Dashboard\\UserStatusWidget' => __DIR__ . '/..' . '/../lib/Dashboard/UserStatusWidget.php', |
|
34 | - 'OCA\\UserStatus\\Db\\UserStatus' => __DIR__ . '/..' . '/../lib/Db/UserStatus.php', |
|
35 | - 'OCA\\UserStatus\\Db\\UserStatusMapper' => __DIR__ . '/..' . '/../lib/Db/UserStatusMapper.php', |
|
36 | - 'OCA\\UserStatus\\Exception\\InvalidClearAtException' => __DIR__ . '/..' . '/../lib/Exception/InvalidClearAtException.php', |
|
37 | - 'OCA\\UserStatus\\Exception\\InvalidMessageIdException' => __DIR__ . '/..' . '/../lib/Exception/InvalidMessageIdException.php', |
|
38 | - 'OCA\\UserStatus\\Exception\\InvalidStatusIconException' => __DIR__ . '/..' . '/../lib/Exception/InvalidStatusIconException.php', |
|
39 | - 'OCA\\UserStatus\\Exception\\InvalidStatusTypeException' => __DIR__ . '/..' . '/../lib/Exception/InvalidStatusTypeException.php', |
|
40 | - 'OCA\\UserStatus\\Exception\\StatusMessageTooLongException' => __DIR__ . '/..' . '/../lib/Exception/StatusMessageTooLongException.php', |
|
41 | - 'OCA\\UserStatus\\Listener\\BeforeTemplateRenderedListener' => __DIR__ . '/..' . '/../lib/Listener/BeforeTemplateRenderedListener.php', |
|
42 | - 'OCA\\UserStatus\\Listener\\UserDeletedListener' => __DIR__ . '/..' . '/../lib/Listener/UserDeletedListener.php', |
|
43 | - 'OCA\\UserStatus\\Listener\\UserLiveStatusListener' => __DIR__ . '/..' . '/../lib/Listener/UserLiveStatusListener.php', |
|
44 | - 'OCA\\UserStatus\\Migration\\Version0001Date20200602134824' => __DIR__ . '/..' . '/../lib/Migration/Version0001Date20200602134824.php', |
|
45 | - 'OCA\\UserStatus\\Migration\\Version0002Date20200902144824' => __DIR__ . '/..' . '/../lib/Migration/Version0002Date20200902144824.php', |
|
46 | - 'OCA\\UserStatus\\Service\\EmojiService' => __DIR__ . '/..' . '/../lib/Service/EmojiService.php', |
|
47 | - 'OCA\\UserStatus\\Service\\JSDataService' => __DIR__ . '/..' . '/../lib/Service/JSDataService.php', |
|
48 | - 'OCA\\UserStatus\\Service\\PredefinedStatusService' => __DIR__ . '/..' . '/../lib/Service/PredefinedStatusService.php', |
|
49 | - '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\\Connector\\UserStatus' => __DIR__.'/..'.'/../lib/Connector/UserStatus.php', |
|
28 | + 'OCA\\UserStatus\\Connector\\UserStatusProvider' => __DIR__.'/..'.'/../lib/Connector/UserStatusProvider.php', |
|
29 | + 'OCA\\UserStatus\\Controller\\HeartbeatController' => __DIR__.'/..'.'/../lib/Controller/HeartbeatController.php', |
|
30 | + 'OCA\\UserStatus\\Controller\\PredefinedStatusController' => __DIR__.'/..'.'/../lib/Controller/PredefinedStatusController.php', |
|
31 | + 'OCA\\UserStatus\\Controller\\StatusesController' => __DIR__.'/..'.'/../lib/Controller/StatusesController.php', |
|
32 | + 'OCA\\UserStatus\\Controller\\UserStatusController' => __DIR__.'/..'.'/../lib/Controller/UserStatusController.php', |
|
33 | + 'OCA\\UserStatus\\Dashboard\\UserStatusWidget' => __DIR__.'/..'.'/../lib/Dashboard/UserStatusWidget.php', |
|
34 | + 'OCA\\UserStatus\\Db\\UserStatus' => __DIR__.'/..'.'/../lib/Db/UserStatus.php', |
|
35 | + 'OCA\\UserStatus\\Db\\UserStatusMapper' => __DIR__.'/..'.'/../lib/Db/UserStatusMapper.php', |
|
36 | + 'OCA\\UserStatus\\Exception\\InvalidClearAtException' => __DIR__.'/..'.'/../lib/Exception/InvalidClearAtException.php', |
|
37 | + 'OCA\\UserStatus\\Exception\\InvalidMessageIdException' => __DIR__.'/..'.'/../lib/Exception/InvalidMessageIdException.php', |
|
38 | + 'OCA\\UserStatus\\Exception\\InvalidStatusIconException' => __DIR__.'/..'.'/../lib/Exception/InvalidStatusIconException.php', |
|
39 | + 'OCA\\UserStatus\\Exception\\InvalidStatusTypeException' => __DIR__.'/..'.'/../lib/Exception/InvalidStatusTypeException.php', |
|
40 | + 'OCA\\UserStatus\\Exception\\StatusMessageTooLongException' => __DIR__.'/..'.'/../lib/Exception/StatusMessageTooLongException.php', |
|
41 | + 'OCA\\UserStatus\\Listener\\BeforeTemplateRenderedListener' => __DIR__.'/..'.'/../lib/Listener/BeforeTemplateRenderedListener.php', |
|
42 | + 'OCA\\UserStatus\\Listener\\UserDeletedListener' => __DIR__.'/..'.'/../lib/Listener/UserDeletedListener.php', |
|
43 | + 'OCA\\UserStatus\\Listener\\UserLiveStatusListener' => __DIR__.'/..'.'/../lib/Listener/UserLiveStatusListener.php', |
|
44 | + 'OCA\\UserStatus\\Migration\\Version0001Date20200602134824' => __DIR__.'/..'.'/../lib/Migration/Version0001Date20200602134824.php', |
|
45 | + 'OCA\\UserStatus\\Migration\\Version0002Date20200902144824' => __DIR__.'/..'.'/../lib/Migration/Version0002Date20200902144824.php', |
|
46 | + 'OCA\\UserStatus\\Service\\EmojiService' => __DIR__.'/..'.'/../lib/Service/EmojiService.php', |
|
47 | + 'OCA\\UserStatus\\Service\\JSDataService' => __DIR__.'/..'.'/../lib/Service/JSDataService.php', |
|
48 | + 'OCA\\UserStatus\\Service\\PredefinedStatusService' => __DIR__.'/..'.'/../lib/Service/PredefinedStatusService.php', |
|
49 | + 'OCA\\UserStatus\\Service\\StatusService' => __DIR__.'/..'.'/../lib/Service/StatusService.php', |
|
50 | 50 | ); |
51 | 51 | |
52 | 52 | public static function getInitializer(ClassLoader $loader) |
53 | 53 | { |
54 | - return \Closure::bind(function () use ($loader) { |
|
54 | + return \Closure::bind(function() use ($loader) { |
|
55 | 55 | $loader->prefixLengthsPsr4 = ComposerStaticInitUserStatus::$prefixLengthsPsr4; |
56 | 56 | $loader->prefixDirsPsr4 = ComposerStaticInitUserStatus::$prefixDirsPsr4; |
57 | 57 | $loader->classMap = ComposerStaticInitUserStatus::$classMap; |
@@ -6,30 +6,30 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'OCA\\UserStatus\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
10 | - 'OCA\\UserStatus\\BackgroundJob\\ClearOldStatusesBackgroundJob' => $baseDir . '/../lib/BackgroundJob/ClearOldStatusesBackgroundJob.php', |
|
11 | - 'OCA\\UserStatus\\Capabilities' => $baseDir . '/../lib/Capabilities.php', |
|
12 | - 'OCA\\UserStatus\\Connector\\UserStatus' => $baseDir . '/../lib/Connector/UserStatus.php', |
|
13 | - 'OCA\\UserStatus\\Connector\\UserStatusProvider' => $baseDir . '/../lib/Connector/UserStatusProvider.php', |
|
14 | - 'OCA\\UserStatus\\Controller\\HeartbeatController' => $baseDir . '/../lib/Controller/HeartbeatController.php', |
|
15 | - 'OCA\\UserStatus\\Controller\\PredefinedStatusController' => $baseDir . '/../lib/Controller/PredefinedStatusController.php', |
|
16 | - 'OCA\\UserStatus\\Controller\\StatusesController' => $baseDir . '/../lib/Controller/StatusesController.php', |
|
17 | - 'OCA\\UserStatus\\Controller\\UserStatusController' => $baseDir . '/../lib/Controller/UserStatusController.php', |
|
18 | - 'OCA\\UserStatus\\Dashboard\\UserStatusWidget' => $baseDir . '/../lib/Dashboard/UserStatusWidget.php', |
|
19 | - 'OCA\\UserStatus\\Db\\UserStatus' => $baseDir . '/../lib/Db/UserStatus.php', |
|
20 | - 'OCA\\UserStatus\\Db\\UserStatusMapper' => $baseDir . '/../lib/Db/UserStatusMapper.php', |
|
21 | - 'OCA\\UserStatus\\Exception\\InvalidClearAtException' => $baseDir . '/../lib/Exception/InvalidClearAtException.php', |
|
22 | - 'OCA\\UserStatus\\Exception\\InvalidMessageIdException' => $baseDir . '/../lib/Exception/InvalidMessageIdException.php', |
|
23 | - 'OCA\\UserStatus\\Exception\\InvalidStatusIconException' => $baseDir . '/../lib/Exception/InvalidStatusIconException.php', |
|
24 | - 'OCA\\UserStatus\\Exception\\InvalidStatusTypeException' => $baseDir . '/../lib/Exception/InvalidStatusTypeException.php', |
|
25 | - 'OCA\\UserStatus\\Exception\\StatusMessageTooLongException' => $baseDir . '/../lib/Exception/StatusMessageTooLongException.php', |
|
26 | - 'OCA\\UserStatus\\Listener\\BeforeTemplateRenderedListener' => $baseDir . '/../lib/Listener/BeforeTemplateRenderedListener.php', |
|
27 | - 'OCA\\UserStatus\\Listener\\UserDeletedListener' => $baseDir . '/../lib/Listener/UserDeletedListener.php', |
|
28 | - 'OCA\\UserStatus\\Listener\\UserLiveStatusListener' => $baseDir . '/../lib/Listener/UserLiveStatusListener.php', |
|
29 | - 'OCA\\UserStatus\\Migration\\Version0001Date20200602134824' => $baseDir . '/../lib/Migration/Version0001Date20200602134824.php', |
|
30 | - 'OCA\\UserStatus\\Migration\\Version0002Date20200902144824' => $baseDir . '/../lib/Migration/Version0002Date20200902144824.php', |
|
31 | - 'OCA\\UserStatus\\Service\\EmojiService' => $baseDir . '/../lib/Service/EmojiService.php', |
|
32 | - 'OCA\\UserStatus\\Service\\JSDataService' => $baseDir . '/../lib/Service/JSDataService.php', |
|
33 | - 'OCA\\UserStatus\\Service\\PredefinedStatusService' => $baseDir . '/../lib/Service/PredefinedStatusService.php', |
|
34 | - 'OCA\\UserStatus\\Service\\StatusService' => $baseDir . '/../lib/Service/StatusService.php', |
|
9 | + 'OCA\\UserStatus\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
10 | + 'OCA\\UserStatus\\BackgroundJob\\ClearOldStatusesBackgroundJob' => $baseDir.'/../lib/BackgroundJob/ClearOldStatusesBackgroundJob.php', |
|
11 | + 'OCA\\UserStatus\\Capabilities' => $baseDir.'/../lib/Capabilities.php', |
|
12 | + 'OCA\\UserStatus\\Connector\\UserStatus' => $baseDir.'/../lib/Connector/UserStatus.php', |
|
13 | + 'OCA\\UserStatus\\Connector\\UserStatusProvider' => $baseDir.'/../lib/Connector/UserStatusProvider.php', |
|
14 | + 'OCA\\UserStatus\\Controller\\HeartbeatController' => $baseDir.'/../lib/Controller/HeartbeatController.php', |
|
15 | + 'OCA\\UserStatus\\Controller\\PredefinedStatusController' => $baseDir.'/../lib/Controller/PredefinedStatusController.php', |
|
16 | + 'OCA\\UserStatus\\Controller\\StatusesController' => $baseDir.'/../lib/Controller/StatusesController.php', |
|
17 | + 'OCA\\UserStatus\\Controller\\UserStatusController' => $baseDir.'/../lib/Controller/UserStatusController.php', |
|
18 | + 'OCA\\UserStatus\\Dashboard\\UserStatusWidget' => $baseDir.'/../lib/Dashboard/UserStatusWidget.php', |
|
19 | + 'OCA\\UserStatus\\Db\\UserStatus' => $baseDir.'/../lib/Db/UserStatus.php', |
|
20 | + 'OCA\\UserStatus\\Db\\UserStatusMapper' => $baseDir.'/../lib/Db/UserStatusMapper.php', |
|
21 | + 'OCA\\UserStatus\\Exception\\InvalidClearAtException' => $baseDir.'/../lib/Exception/InvalidClearAtException.php', |
|
22 | + 'OCA\\UserStatus\\Exception\\InvalidMessageIdException' => $baseDir.'/../lib/Exception/InvalidMessageIdException.php', |
|
23 | + 'OCA\\UserStatus\\Exception\\InvalidStatusIconException' => $baseDir.'/../lib/Exception/InvalidStatusIconException.php', |
|
24 | + 'OCA\\UserStatus\\Exception\\InvalidStatusTypeException' => $baseDir.'/../lib/Exception/InvalidStatusTypeException.php', |
|
25 | + 'OCA\\UserStatus\\Exception\\StatusMessageTooLongException' => $baseDir.'/../lib/Exception/StatusMessageTooLongException.php', |
|
26 | + 'OCA\\UserStatus\\Listener\\BeforeTemplateRenderedListener' => $baseDir.'/../lib/Listener/BeforeTemplateRenderedListener.php', |
|
27 | + 'OCA\\UserStatus\\Listener\\UserDeletedListener' => $baseDir.'/../lib/Listener/UserDeletedListener.php', |
|
28 | + 'OCA\\UserStatus\\Listener\\UserLiveStatusListener' => $baseDir.'/../lib/Listener/UserLiveStatusListener.php', |
|
29 | + 'OCA\\UserStatus\\Migration\\Version0001Date20200602134824' => $baseDir.'/../lib/Migration/Version0001Date20200602134824.php', |
|
30 | + 'OCA\\UserStatus\\Migration\\Version0002Date20200902144824' => $baseDir.'/../lib/Migration/Version0002Date20200902144824.php', |
|
31 | + 'OCA\\UserStatus\\Service\\EmojiService' => $baseDir.'/../lib/Service/EmojiService.php', |
|
32 | + 'OCA\\UserStatus\\Service\\JSDataService' => $baseDir.'/../lib/Service/JSDataService.php', |
|
33 | + 'OCA\\UserStatus\\Service\\PredefinedStatusService' => $baseDir.'/../lib/Service/PredefinedStatusService.php', |
|
34 | + 'OCA\\UserStatus\\Service\\StatusService' => $baseDir.'/../lib/Service/StatusService.php', |
|
35 | 35 | ); |