@@ -87,14 +87,14 @@ discard block |
||
87 | 87 | * @return array |
88 | 88 | */ |
89 | 89 | protected function normalizeDatabaseData(array $data) { |
90 | - $data['id'] = (string)$data['id']; |
|
91 | - $data['parent_id'] = (string)$data['parent_id']; |
|
92 | - $data['topmost_parent_id'] = (string)$data['topmost_parent_id']; |
|
90 | + $data['id'] = (string) $data['id']; |
|
91 | + $data['parent_id'] = (string) $data['parent_id']; |
|
92 | + $data['topmost_parent_id'] = (string) $data['topmost_parent_id']; |
|
93 | 93 | $data['creation_timestamp'] = new \DateTime($data['creation_timestamp']); |
94 | 94 | if (!is_null($data['latest_child_timestamp'])) { |
95 | 95 | $data['latest_child_timestamp'] = new \DateTime($data['latest_child_timestamp']); |
96 | 96 | } |
97 | - $data['children_count'] = (int)$data['children_count']; |
|
97 | + $data['children_count'] = (int) $data['children_count']; |
|
98 | 98 | return $data; |
99 | 99 | } |
100 | 100 | |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $resultStatement = $query->execute(); |
172 | 172 | $data = $resultStatement->fetch(\PDO::FETCH_NUM); |
173 | 173 | $resultStatement->closeCursor(); |
174 | - $children = (int)$data[0]; |
|
174 | + $children = (int) $data[0]; |
|
175 | 175 | |
176 | 176 | $comment = $this->get($id); |
177 | 177 | $comment->setChildrenCount($children); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | !is_string($type) || empty($type) |
194 | 194 | || !is_string($id) || empty($id) |
195 | 195 | ) { |
196 | - throw new \InvalidArgumentException($role . ' parameters must be string and not empty'); |
|
196 | + throw new \InvalidArgumentException($role.' parameters must be string and not empty'); |
|
197 | 197 | } |
198 | 198 | } |
199 | 199 | |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | if (empty($id)) { |
208 | 208 | return; |
209 | 209 | } |
210 | - $this->commentsCache[(string)$id] = $comment; |
|
210 | + $this->commentsCache[(string) $id] = $comment; |
|
211 | 211 | } |
212 | 212 | |
213 | 213 | /** |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | * @param mixed $id the comment's id |
217 | 217 | */ |
218 | 218 | protected function uncache($id) { |
219 | - $id = (string)$id; |
|
219 | + $id = (string) $id; |
|
220 | 220 | if (isset($this->commentsCache[$id])) { |
221 | 221 | unset($this->commentsCache[$id]); |
222 | 222 | } |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | * @since 9.0.0 |
233 | 233 | */ |
234 | 234 | public function get($id) { |
235 | - if ((int)$id === 0) { |
|
235 | + if ((int) $id === 0) { |
|
236 | 236 | throw new \InvalidArgumentException('IDs must be translatable to a number in this implementation.'); |
237 | 237 | } |
238 | 238 | |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | $query->select('*') |
392 | 392 | ->from('comments') |
393 | 393 | ->where($query->expr()->iLike('message', $query->createNamedParameter( |
394 | - '%' . $this->dbConn->escapeLikeParameter($search). '%' |
|
394 | + '%'.$this->dbConn->escapeLikeParameter($search).'%' |
|
395 | 395 | ))) |
396 | 396 | ->orderBy('creation_timestamp', 'DESC') |
397 | 397 | ->addOrderBy('id', 'DESC'); |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | $resultStatement = $query->execute(); |
445 | 445 | $data = $resultStatement->fetch(\PDO::FETCH_NUM); |
446 | 446 | $resultStatement->closeCursor(); |
447 | - return (int)$data[0]; |
|
447 | + return (int) $data[0]; |
|
448 | 448 | } |
449 | 449 | |
450 | 450 | /** |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | $qb = $this->dbConn->getQueryBuilder(); |
459 | 459 | $query = $qb->select('f.fileid') |
460 | 460 | ->selectAlias( |
461 | - $qb->createFunction('COUNT(' . $qb->getColumnName('c.id') . ')'), |
|
461 | + $qb->createFunction('COUNT('.$qb->getColumnName('c.id').')'), |
|
462 | 462 | 'num_ids' |
463 | 463 | ) |
464 | 464 | ->from('comments', 'c') |
@@ -611,7 +611,7 @@ discard block |
||
611 | 611 | ->execute(); |
612 | 612 | |
613 | 613 | if ($affectedRows > 0) { |
614 | - $comment->setId((string)$qb->getLastInsertId()); |
|
614 | + $comment->setId((string) $qb->getLastInsertId()); |
|
615 | 615 | $this->sendEvent(CommentsEvent::EVENT_ADD, $comment); |
616 | 616 | } |
617 | 617 | |
@@ -891,7 +891,7 @@ discard block |
||
891 | 891 | if (!isset($this->displayNameResolvers[$type])) { |
892 | 892 | throw new \OutOfBoundsException('No Displayname resolver for this type registered'); |
893 | 893 | } |
894 | - return (string)$this->displayNameResolvers[$type]($id); |
|
894 | + return (string) $this->displayNameResolvers[$type]($id); |
|
895 | 895 | } |
896 | 896 | |
897 | 897 | /** |
@@ -106,7 +106,7 @@ |
||
106 | 106 | $suffix = '…'; |
107 | 107 | } |
108 | 108 | |
109 | - return $prefix . substr($message, $start, $end - $start) . $suffix; |
|
109 | + return $prefix.substr($message, $start, $end - $start).$suffix; |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | } |
@@ -6,39 +6,39 @@ |
||
6 | 6 | |
7 | 7 | class ComposerStaticInitComments |
8 | 8 | { |
9 | - public static $prefixLengthsPsr4 = array ( |
|
9 | + public static $prefixLengthsPsr4 = array( |
|
10 | 10 | 'O' => |
11 | - array ( |
|
11 | + array( |
|
12 | 12 | 'OCA\\Comments\\' => 13, |
13 | 13 | ), |
14 | 14 | ); |
15 | 15 | |
16 | - public static $prefixDirsPsr4 = array ( |
|
16 | + public static $prefixDirsPsr4 = array( |
|
17 | 17 | 'OCA\\Comments\\' => |
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\\Comments\\Activity\\Filter' => __DIR__ . '/..' . '/../lib/Activity/Filter.php', |
|
25 | - 'OCA\\Comments\\Activity\\Listener' => __DIR__ . '/..' . '/../lib/Activity/Listener.php', |
|
26 | - 'OCA\\Comments\\Activity\\Provider' => __DIR__ . '/..' . '/../lib/Activity/Provider.php', |
|
27 | - 'OCA\\Comments\\Activity\\Setting' => __DIR__ . '/..' . '/../lib/Activity/Setting.php', |
|
28 | - 'OCA\\Comments\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
29 | - 'OCA\\Comments\\Collaboration\\CommentersSorter' => __DIR__ . '/..' . '/../lib/Collaboration/CommentersSorter.php', |
|
30 | - 'OCA\\Comments\\Controller\\Notifications' => __DIR__ . '/..' . '/../lib/Controller/Notifications.php', |
|
31 | - 'OCA\\Comments\\EventHandler' => __DIR__ . '/..' . '/../lib/EventHandler.php', |
|
32 | - 'OCA\\Comments\\JSSettingsHelper' => __DIR__ . '/..' . '/../lib/JSSettingsHelper.php', |
|
33 | - 'OCA\\Comments\\Notification\\Listener' => __DIR__ . '/..' . '/../lib/Notification/Listener.php', |
|
34 | - 'OCA\\Comments\\Notification\\Notifier' => __DIR__ . '/..' . '/../lib/Notification/Notifier.php', |
|
35 | - 'OCA\\Comments\\Search\\CommentSearchResult' => __DIR__ . '/..' . '/../lib/Search/CommentSearchResult.php', |
|
36 | - 'OCA\\Comments\\Search\\Provider' => __DIR__ . '/..' . '/../lib/Search/Provider.php', |
|
23 | + public static $classMap = array( |
|
24 | + 'OCA\\Comments\\Activity\\Filter' => __DIR__.'/..'.'/../lib/Activity/Filter.php', |
|
25 | + 'OCA\\Comments\\Activity\\Listener' => __DIR__.'/..'.'/../lib/Activity/Listener.php', |
|
26 | + 'OCA\\Comments\\Activity\\Provider' => __DIR__.'/..'.'/../lib/Activity/Provider.php', |
|
27 | + 'OCA\\Comments\\Activity\\Setting' => __DIR__.'/..'.'/../lib/Activity/Setting.php', |
|
28 | + 'OCA\\Comments\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
29 | + 'OCA\\Comments\\Collaboration\\CommentersSorter' => __DIR__.'/..'.'/../lib/Collaboration/CommentersSorter.php', |
|
30 | + 'OCA\\Comments\\Controller\\Notifications' => __DIR__.'/..'.'/../lib/Controller/Notifications.php', |
|
31 | + 'OCA\\Comments\\EventHandler' => __DIR__.'/..'.'/../lib/EventHandler.php', |
|
32 | + 'OCA\\Comments\\JSSettingsHelper' => __DIR__.'/..'.'/../lib/JSSettingsHelper.php', |
|
33 | + 'OCA\\Comments\\Notification\\Listener' => __DIR__.'/..'.'/../lib/Notification/Listener.php', |
|
34 | + 'OCA\\Comments\\Notification\\Notifier' => __DIR__.'/..'.'/../lib/Notification/Notifier.php', |
|
35 | + 'OCA\\Comments\\Search\\CommentSearchResult' => __DIR__.'/..'.'/../lib/Search/CommentSearchResult.php', |
|
36 | + 'OCA\\Comments\\Search\\Provider' => __DIR__.'/..'.'/../lib/Search/Provider.php', |
|
37 | 37 | ); |
38 | 38 | |
39 | 39 | public static function getInitializer(ClassLoader $loader) |
40 | 40 | { |
41 | - return \Closure::bind(function () use ($loader) { |
|
41 | + return \Closure::bind(function() use ($loader) { |
|
42 | 42 | $loader->prefixLengthsPsr4 = ComposerStaticInitComments::$prefixLengthsPsr4; |
43 | 43 | $loader->prefixDirsPsr4 = ComposerStaticInitComments::$prefixDirsPsr4; |
44 | 44 | $loader->classMap = ComposerStaticInitComments::$classMap; |
@@ -6,17 +6,17 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'OCA\\Comments\\Activity\\Filter' => $baseDir . '/../lib/Activity/Filter.php', |
|
10 | - 'OCA\\Comments\\Activity\\Listener' => $baseDir . '/../lib/Activity/Listener.php', |
|
11 | - 'OCA\\Comments\\Activity\\Provider' => $baseDir . '/../lib/Activity/Provider.php', |
|
12 | - 'OCA\\Comments\\Activity\\Setting' => $baseDir . '/../lib/Activity/Setting.php', |
|
13 | - 'OCA\\Comments\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
14 | - 'OCA\\Comments\\Collaboration\\CommentersSorter' => $baseDir . '/../lib/Collaboration/CommentersSorter.php', |
|
15 | - 'OCA\\Comments\\Controller\\Notifications' => $baseDir . '/../lib/Controller/Notifications.php', |
|
16 | - 'OCA\\Comments\\EventHandler' => $baseDir . '/../lib/EventHandler.php', |
|
17 | - 'OCA\\Comments\\JSSettingsHelper' => $baseDir . '/../lib/JSSettingsHelper.php', |
|
18 | - 'OCA\\Comments\\Notification\\Listener' => $baseDir . '/../lib/Notification/Listener.php', |
|
19 | - 'OCA\\Comments\\Notification\\Notifier' => $baseDir . '/../lib/Notification/Notifier.php', |
|
20 | - 'OCA\\Comments\\Search\\CommentSearchResult' => $baseDir . '/../lib/Search/CommentSearchResult.php', |
|
21 | - 'OCA\\Comments\\Search\\Provider' => $baseDir . '/../lib/Search/Provider.php', |
|
9 | + 'OCA\\Comments\\Activity\\Filter' => $baseDir.'/../lib/Activity/Filter.php', |
|
10 | + 'OCA\\Comments\\Activity\\Listener' => $baseDir.'/../lib/Activity/Listener.php', |
|
11 | + 'OCA\\Comments\\Activity\\Provider' => $baseDir.'/../lib/Activity/Provider.php', |
|
12 | + 'OCA\\Comments\\Activity\\Setting' => $baseDir.'/../lib/Activity/Setting.php', |
|
13 | + 'OCA\\Comments\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
14 | + 'OCA\\Comments\\Collaboration\\CommentersSorter' => $baseDir.'/../lib/Collaboration/CommentersSorter.php', |
|
15 | + 'OCA\\Comments\\Controller\\Notifications' => $baseDir.'/../lib/Controller/Notifications.php', |
|
16 | + 'OCA\\Comments\\EventHandler' => $baseDir.'/../lib/EventHandler.php', |
|
17 | + 'OCA\\Comments\\JSSettingsHelper' => $baseDir.'/../lib/JSSettingsHelper.php', |
|
18 | + 'OCA\\Comments\\Notification\\Listener' => $baseDir.'/../lib/Notification/Listener.php', |
|
19 | + 'OCA\\Comments\\Notification\\Notifier' => $baseDir.'/../lib/Notification/Notifier.php', |
|
20 | + 'OCA\\Comments\\Search\\CommentSearchResult' => $baseDir.'/../lib/Search/CommentSearchResult.php', |
|
21 | + 'OCA\\Comments\\Search\\Provider' => $baseDir.'/../lib/Search/Provider.php', |
|
22 | 22 | ); |