@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | $fm->define('OCA\Polls\Db\Comment')->setDefinitions([ |
30 | 30 | 'userId' => Faker::firstNameMale(), |
31 | - 'dt' => function () { |
|
31 | + 'dt' => function() { |
|
32 | 32 | $date = new DateTime('today'); |
33 | 33 | return $date->format('Y-m-d H:i:s'); |
34 | 34 | }, |
@@ -31,12 +31,12 @@ |
||
31 | 31 | 'title' => Faker::sentence(10), |
32 | 32 | 'description' => Faker::text(255), |
33 | 33 | 'owner' => Faker::firstNameMale(), |
34 | - 'created' => function () { |
|
34 | + 'created' => function() { |
|
35 | 35 | $date = new DateTime('today'); |
36 | 36 | return $date->format('Y-m-d H:i:s'); |
37 | 37 | }, |
38 | 38 | 'access' => 'registered', |
39 | - 'expire' => function () { |
|
39 | + 'expire' => function() { |
|
40 | 40 | $date = new DateTime('tomorrow'); |
41 | 41 | return $date->format('Y-m-d H:i:s'); |
42 | 42 | }, |
@@ -60,14 +60,17 @@ discard block |
||
60 | 60 | <div class="icon-polls"></div> |
61 | 61 | <h2><?php p($l->t('No existing polls.')); ?></h2> |
62 | 62 | </div> |
63 | - <?php else : ?> |
|
63 | + <?php else { |
|
64 | + : ?> |
|
64 | 65 | <div class="table main-container has-controls"> |
65 | 66 | <div class ="table-row table-header"> |
66 | 67 | |
67 | 68 | <div class="wrapper group-master"> |
68 | 69 | <div class="wrapper group-1"> |
69 | 70 | <div class="wrapper group-1-1"> |
70 | - <div class="flex-column name"> <?php p($l->t('Title')); ?></div> |
|
71 | + <div class="flex-column name"> <?php p($l->t('Title')); |
|
72 | +} |
|
73 | +?></div> |
|
71 | 74 | </div> |
72 | 75 | <div class="wrapper group-1-2"> |
73 | 76 | <div class="flex-column actions"></div> |
@@ -265,8 +268,7 @@ discard block |
||
265 | 268 | return true; |
266 | 269 | } |
267 | 270 | } |
268 | - } |
|
269 | - else if (strpos($item, 'user_') === 0) { |
|
271 | + } else if (strpos($item, 'user_') === 0) { |
|
270 | 272 | $usr = substr($item, 5); |
271 | 273 | if ($usr === $userId) { |
272 | 274 | return true; |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | <div class="table-row table-body"> |
152 | 152 | <div class="wrapper group-master"> |
153 | 153 | <div class="wrapper group-1"> |
154 | - <div class="thumbnail <?php p($expiry_style . ' ' . $commented_class. ' ' . $participated_class); ?>"></div><!-- Image to display the status or type of poll --> |
|
154 | + <div class="thumbnail <?php p($expiry_style . ' ' . $commented_class . ' ' . $participated_class); ?>"></div><!-- Image to display the status or type of poll --> |
|
155 | 155 | <a href="<?php p($pollUrl); ?>" class="wrapper group-1-1"> |
156 | 156 | <div class="flex-column name"> <?php p($poll->getTitle()); ?></div> |
157 | 157 | <div class="flex-column description"> <?php p($poll->getDescription()); ?></div> |
@@ -193,10 +193,10 @@ discard block |
||
193 | 193 | </div> |
194 | 194 | <div class="wrapper group-2-1"> |
195 | 195 | <div class="flex-column access"><?php p($l->t($poll->getAccess())); ?></div> |
196 | - <div class="flex-column created has-tooltip live-relative-timestamp" data-timestamp="<?php p(strtotime($poll->getCreated())*1000); ?>" data-value="<?php p($poll->getCreated()); ?>"><?php p(\OCP\Template::relative_modified_date(strtotime($poll->getCreated()))); ?></div> |
|
196 | + <div class="flex-column created has-tooltip live-relative-timestamp" data-timestamp="<?php p(strtotime($poll->getCreated()) * 1000); ?>" data-value="<?php p($poll->getCreated()); ?>"><?php p(\OCP\Template::relative_modified_date(strtotime($poll->getCreated()))); ?></div> |
|
197 | 197 | </div> |
198 | 198 | <div class="wrapper group-2-2"> |
199 | - <div class="flex-column has-tooltip expiry<?php p($expiry_style . $timestamp_style); ?>" data-timestamp="<?php p(strtotime($poll->getExpire())*1000); ?>" data-value="<?php p($poll->getExpire()); ?>"> <?php p($expiry_date); ?></div> |
|
199 | + <div class="flex-column has-tooltip expiry<?php p($expiry_style . $timestamp_style); ?>" data-timestamp="<?php p(strtotime($poll->getExpire()) * 1000); ?>" data-value="<?php p($poll->getExpire()); ?>"> <?php p($expiry_date); ?></div> |
|
200 | 200 | <div class="flex-column participants"> |
201 | 201 | <div class="symbol alt-tooltip partic_voted icon-<?php p($participated_class); ?>" title="<?php p($participated_title); ?>"></div> |
202 | 202 | <div class="symbol alt-tooltip partic_commented icon-<?php p($commented_class); ?>" title="<?php p($commented_title); ?>"></div> |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | } |
229 | 229 | // Nextcloud >= 12 |
230 | 230 | $groups = \OC::$server->getGroupManager()->getUserGroups(\OC::$server->getUserSession()->getUser()); |
231 | - return array_map(function ($group) { |
|
231 | + return array_map(function($group) { |
|
232 | 232 | return $group->getGID(); |
233 | 233 | }, $groups); |
234 | 234 | } |
@@ -118,9 +118,12 @@ discard block |
||
118 | 118 | <span class="symbol icon-settings"></span> |
119 | 119 | <?php if (count($comments)) : ?> |
120 | 120 | <div id="comment-counter" class="badge"><?php p(count($comments)) ?></div> |
121 | - <?php else: ?> |
|
121 | + <?php else { |
|
122 | + : ?> |
|
122 | 123 | <div id="comment-counter" class="badge no-comments"><?php p(count($comments)) ?></div> |
123 | - <?php endif; ?> |
|
124 | + <?php endif; |
|
125 | +} |
|
126 | +?> |
|
124 | 127 | </a> |
125 | 128 | </div> |
126 | 129 | |
@@ -333,7 +336,10 @@ discard block |
||
333 | 336 | </div> |
334 | 337 | <?php if (User::isLoggedIn()) : ?> |
335 | 338 | <div class="notification"> |
336 | - <input type="checkbox" id="check_notif" class="checkbox" <?php if ($notification !== null) print_unescaped(' checked'); ?> /> |
|
339 | + <input type="checkbox" id="check_notif" class="checkbox" <?php if ($notification !== null) { |
|
340 | + print_unescaped(' checked'); |
|
341 | +} |
|
342 | +?> /> |
|
337 | 343 | <label for="check_notif"><?php p($l->t('Receive notification email on activity')); ?></label> |
338 | 344 | </div> |
339 | 345 | <?php endif; ?> |
@@ -431,8 +437,11 @@ discard block |
||
431 | 437 | <div class="author"><?php p($userMgr->get($userId)->getDisplayName()) ?></div> |
432 | 438 | </div> |
433 | 439 | |
434 | - <?php else: ?> |
|
435 | - <a href="<?php p($urlGenerator->linkToRouteAbsolute('core.login.showLoginForm')); ?>"><?php p($l->t('Login or ...')); ?></a> |
|
440 | + <?php else { |
|
441 | + : ?> |
|
442 | + <a href="<?php p($urlGenerator->linkToRouteAbsolute('core.login.showLoginForm')); |
|
443 | +} |
|
444 | +?>"><?php p($l->t('Login or ...')); ?></a> |
|
436 | 445 | <div class="authorRow user-cell flex-row"> |
437 | 446 | <div class="avatar has-tooltip" title="?"></div> |
438 | 447 | <div id="id_ac_detected" class="author flex-column external"> |
@@ -453,9 +462,12 @@ discard block |
||
453 | 462 | |
454 | 463 | <?php if ($comments == null) : ?> |
455 | 464 | <li id="no-comments" class="emptycontent"> |
456 | - <?php else : ?> |
|
465 | + <?php else { |
|
466 | + : ?> |
|
457 | 467 | <li id="no-comments" class="emptycontent hidden"> |
458 | - <?php endif; ?> |
|
468 | + <?php endif; |
|
469 | +} |
|
470 | +?> |
|
459 | 471 | |
460 | 472 | <div class="icon-comment"></div> |
461 | 473 | <p><?php p($l->t('No comments yet. Be the first.')); ?></p> |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | |
272 | 272 | if ($class === 'unvoted') { |
273 | 273 | $dataUnvoted = $l->t('New option!'); |
274 | - $updatedPoll=true; |
|
274 | + $updatedPoll = true; |
|
275 | 275 | } |
276 | 276 | |
277 | 277 | print_unescaped('<li id="voteid_' . $optionElement->getId() . '" class="flex-column active poll-cell ' . $class . '" data-value="' . $optionElement->getPollOptionText() . '" data-unvoted="' . $dataUnvoted . '"></li>'); |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | </div> |
287 | 287 | <?php if ($updatedPoll) : ?> |
288 | 288 | <div class="updated-poll alert"> |
289 | - <p> <?php p($l->t('This poll was updated since your last visit. Please check your votes.'));?></p> |
|
289 | + <p> <?php p($l->t('This poll was updated since your last visit. Please check your votes.')); ?></p> |
|
290 | 290 | </div> |
291 | 291 | <?php endif; ?> |
292 | 292 |
@@ -171,7 +171,7 @@ |
||
171 | 171 | <table id="selected-dates-table" class="choices"> |
172 | 172 | </table> |
173 | 173 | </div> |
174 | - <div id="text-select-container" <?php if(!$isUpdate || $poll->getType() === 0) print_unescaped('style="display:none;"'); ?> > |
|
174 | + <div id="text-select-container" <?php if (!$isUpdate || $poll->getType() === 0) print_unescaped('style="display:none;"'); ?> > |
|
175 | 175 | <label for="text-title" class="input_title"><?php p($l->t('Text item')); ?></label> |
176 | 176 | <div class="input-group"> |
177 | 177 | <input type="text" id="text-title" placeholder="<?php print_unescaped('Insert text...'); ?>" /> |
@@ -85,8 +85,11 @@ discard block |
||
85 | 85 | <span> |
86 | 86 | <?php if ($isUpdate): ?> |
87 | 87 | <?php p($l->t('Edit poll') . ' ' . $poll->getTitle()); ?> |
88 | - <?php else: ?> |
|
89 | - <?php p($l->t('Create new poll')); ?> |
|
88 | + <?php else { |
|
89 | + : ?> |
|
90 | + <?php p($l->t('Create new poll')); |
|
91 | +} |
|
92 | +?> |
|
90 | 93 | <?php endif; ?> |
91 | 94 | </span> |
92 | 95 | </div> |
@@ -96,11 +99,20 @@ discard block |
||
96 | 99 | <?php if ($isUpdate): ?> |
97 | 100 | <form name="finish_poll" action="<?php p($urlGenerator->linkToRoute('polls.page.update_poll')); ?>" method="POST"> |
98 | 101 | <input type="hidden" name="pollId" value="<?php p($poll->getId()); ?>" /> |
99 | - <?php else: ?> |
|
100 | - <form name="finish_poll" action="<?php p($urlGenerator->linkToRoute('polls.page.insert_poll')); ?>" method="POST"> |
|
102 | + <?php else { |
|
103 | + : ?> |
|
104 | + <form name="finish_poll" action="<?php p($urlGenerator->linkToRoute('polls.page.insert_poll')); |
|
105 | +} |
|
106 | +?>" method="POST"> |
|
101 | 107 | <?php endif; ?> |
102 | - <input type="hidden" name="chosenOptions" id="chosenOptions" value="<?php if (isset($chosen)) p($chosen); ?>" /> |
|
103 | - <input type="hidden" name="expireTs" id="expireTs" value="<?php if (isset($expireTs)) p($expireTs); ?>" /> |
|
108 | + <input type="hidden" name="chosenOptions" id="chosenOptions" value="<?php if (isset($chosen)) { |
|
109 | + p($chosen); |
|
110 | +} |
|
111 | +?>" /> |
|
112 | + <input type="hidden" name="expireTs" id="expireTs" value="<?php if (isset($expireTs)) { |
|
113 | + p($expireTs); |
|
114 | +} |
|
115 | +?>" /> |
|
104 | 116 | <input type="hidden" name="userId" id="userId" value="<?php p($userId); ?>" /> |
105 | 117 | |
106 | 118 | <header class="row"> |
@@ -109,22 +121,40 @@ discard block |
||
109 | 121 | <div class="new_poll row"> |
110 | 122 | <div class="col-50"> |
111 | 123 | <label for="pollTitle" class="input_title"><?php p($l->t('Title')); ?></label> |
112 | - <input type="text" class="input_field" id="pollTitle" name="pollTitle" value="<?php if (isset($title)) p($title); ?>" /> |
|
124 | + <input type="text" class="input_field" id="pollTitle" name="pollTitle" value="<?php if (isset($title)) { |
|
125 | + p($title); |
|
126 | +} |
|
127 | +?>" /> |
|
113 | 128 | <label for="pollDesc" class="input_title"><?php p($l->t('Description')); ?></label> |
114 | - <textarea class="input_field" id="pollDesc" name="pollDesc"><?php if (isset($desc)) p($desc); ?></textarea> |
|
129 | + <textarea class="input_field" id="pollDesc" name="pollDesc"><?php if (isset($desc)) { |
|
130 | + p($desc); |
|
131 | +} |
|
132 | +?></textarea> |
|
115 | 133 | |
116 | 134 | <label class="input_title"><?php p($l->t('Access')); ?></label> |
117 | 135 | |
118 | - <input type="radio" name="accessType" id="private" value="registered" class="radio" <?php if (!$isUpdate || $access === 'registered') print_unescaped('checked'); ?> /> |
|
136 | + <input type="radio" name="accessType" id="private" value="registered" class="radio" <?php if (!$isUpdate || $access === 'registered') { |
|
137 | + print_unescaped('checked'); |
|
138 | +} |
|
139 | +?> /> |
|
119 | 140 | <label for="private"><?php p($l->t('Registered users only')); ?></label> |
120 | 141 | |
121 | - <input type="radio" name="accessType" id="hidden" value="hidden" class="radio" <?php if ($isUpdate && $access === 'hidden') print_unescaped('checked'); ?> /> |
|
142 | + <input type="radio" name="accessType" id="hidden" value="hidden" class="radio" <?php if ($isUpdate && $access === 'hidden') { |
|
143 | + print_unescaped('checked'); |
|
144 | +} |
|
145 | +?> /> |
|
122 | 146 | <label for="hidden"><?php p($l->t('hidden')); ?></label> |
123 | 147 | |
124 | - <input type="radio" name="accessType" id="public" value="public" class="radio" <?php if ($isUpdate && $access === 'public') print_unescaped('checked'); ?> /> |
|
148 | + <input type="radio" name="accessType" id="public" value="public" class="radio" <?php if ($isUpdate && $access === 'public') { |
|
149 | + print_unescaped('checked'); |
|
150 | +} |
|
151 | +?> /> |
|
125 | 152 | <label for="public"><?php p($l->t('Public access')); ?></label> |
126 | 153 | |
127 | - <input type="radio" name="accessType" id="select" value="select" class="radio" <?php if ($isUpdate && $access === 'select') print_unescaped('checked'); ?>> |
|
154 | + <input type="radio" name="accessType" id="select" value="select" class="radio" <?php if ($isUpdate && $access === 'select') { |
|
155 | + print_unescaped('checked'); |
|
156 | +} |
|
157 | +?>> |
|
128 | 158 | <label for="select"><?php p($l->t('Select')); ?></label> |
129 | 159 | <span id="id_label_select">...</span> |
130 | 160 | |
@@ -140,9 +170,12 @@ discard block |
||
140 | 170 | </div> |
141 | 171 | </div> |
142 | 172 | |
143 | - <input type="hidden" name="accessValues" id="accessValues" value="<?php if ($isUpdate && $access === 'select') p($accessTypes) ?>" /> |
|
173 | + <input type="hidden" name="accessValues" id="accessValues" value="<?php if ($isUpdate && $access === 'select') { |
|
174 | + p($accessTypes) ?>" /> |
|
144 | 175 | |
145 | - <input id="isAnonymous" name="isAnonymous" type="checkbox" class="checkbox" <?php $isAnonymous ? print_unescaped('value="true" checked') : print_unescaped('value="false"'); ?> /> |
|
176 | + <input id="isAnonymous" name="isAnonymous" type="checkbox" class="checkbox" <?php $isAnonymous ? print_unescaped('value="true" checked') : print_unescaped('value="false"'); |
|
177 | +} |
|
178 | +?> /> |
|
146 | 179 | <label for="isAnonymous" class="input_title"><?php p($l->t('Anonymous')) ?></label> |
147 | 180 | |
148 | 181 | <div id="anonOptions" style="display:none;"> |
@@ -158,20 +191,32 @@ discard block |
||
158 | 191 | </div> |
159 | 192 | <div class="col-50"> |
160 | 193 | |
161 | - <input type="radio" name="pollType" id="event" value="event" class="radio" <?php if (!$isUpdate || $poll->getType() === 0) print_unescaped('checked'); ?> /> |
|
194 | + <input type="radio" name="pollType" id="event" value="event" class="radio" <?php if (!$isUpdate || $poll->getType() === 0) { |
|
195 | + print_unescaped('checked'); |
|
196 | +} |
|
197 | +?> /> |
|
162 | 198 | <label for="event"><?php p($l->t('Event schedule')); ?></label> |
163 | 199 | |
164 | 200 | <!-- TODO texts to db --> |
165 | - <input type="radio" name="pollType" id="text" value="text" class="radio" <?php if ($isUpdate && $poll->getType() === 1) print_unescaped('checked'); ?>> |
|
201 | + <input type="radio" name="pollType" id="text" value="text" class="radio" <?php if ($isUpdate && $poll->getType() === 1) { |
|
202 | + print_unescaped('checked'); |
|
203 | +} |
|
204 | +?>> |
|
166 | 205 | <label for="text"><?php p($l->t('Text based')); ?></label> |
167 | 206 | |
168 | - <div id="date-select-container" <?php if ($isUpdate && $poll->getType() === 1) print_unescaped('style="display:none;"'); ?> > |
|
207 | + <div id="date-select-container" <?php if ($isUpdate && $poll->getType() === 1) { |
|
208 | + print_unescaped('style="display:none;"'); |
|
209 | +} |
|
210 | +?> > |
|
169 | 211 | <label for="datetimepicker" class="input_title"><?php p($l->t('Dates')); ?></label> |
170 | 212 | <input id="datetimepicker" type="text" /> |
171 | 213 | <table id="selected-dates-table" class="choices"> |
172 | 214 | </table> |
173 | 215 | </div> |
174 | - <div id="text-select-container" <?php if(!$isUpdate || $poll->getType() === 0) print_unescaped('style="display:none;"'); ?> > |
|
216 | + <div id="text-select-container" <?php if(!$isUpdate || $poll->getType() === 0) { |
|
217 | + print_unescaped('style="display:none;"'); |
|
218 | +} |
|
219 | +?> > |
|
175 | 220 | <label for="text-title" class="input_title"><?php p($l->t('Text item')); ?></label> |
176 | 221 | <div class="input-group"> |
177 | 222 | <input type="text" id="text-title" placeholder="<?php print_unescaped('Insert text...'); ?>" /> |
@@ -187,8 +232,11 @@ discard block |
||
187 | 232 | <div class="form-actions"> |
188 | 233 | <?php if ($isUpdate): ?> |
189 | 234 | <input type="submit" id="submit_finish_poll" class="button btn primary" value="<?php p($l->t('Update poll')); ?>" /> |
190 | - <?php else: ?> |
|
191 | - <input type="submit" id="submit_finish_poll" class="button btn primary" value="<?php p($l->t('Create poll')); ?>" /> |
|
235 | + <?php else { |
|
236 | + : ?> |
|
237 | + <input type="submit" id="submit_finish_poll" class="button btn primary" value="<?php p($l->t('Create poll')); |
|
238 | +} |
|
239 | +?>" /> |
|
192 | 240 | <?php endif; ?> |
193 | 241 | <a href="<?php p($urlGenerator->linkToRoute('polls.page.index')); ?>" id="submit_cancel_poll" class="button"><?php p($l->t('Cancel')); ?></a> |
194 | 242 | </div> |
@@ -703,7 +703,7 @@ |
||
703 | 703 | } |
704 | 704 | // Nextcloud >= 12 |
705 | 705 | $groups = $this->groupManager->getUserGroups(\OC::$server->getUserSession()->getUser()); |
706 | - return array_map(function ($group) { |
|
706 | + return array_map(function($group) { |
|
707 | 707 | return $group->getGID(); |
708 | 708 | }, $groups); |
709 | 709 | } |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | } |
220 | 220 | |
221 | 221 | /** |
222 | - * Copy date options |
|
222 | + * Copy date options |
|
223 | 223 | */ |
224 | 224 | protected function copyDateOptions() { |
225 | 225 | $insert = $this->connection->getQueryBuilder(); |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | } |
247 | 247 | |
248 | 248 | /** |
249 | - * Copy text options |
|
249 | + * Copy text options |
|
250 | 250 | */ |
251 | 251 | protected function copyTextOptions() { |
252 | 252 | $insert = $this->connection->getQueryBuilder(); |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | } |
274 | 274 | |
275 | 275 | /** |
276 | - * Copy date votes |
|
276 | + * Copy date votes |
|
277 | 277 | */ |
278 | 278 | protected function copyDateVotes() { |
279 | 279 | $insert = $this->connection->getQueryBuilder(); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | 'notnull' => false, |
122 | 122 | ]); |
123 | 123 | $table->addColumn('poll_option_text', Type::STRING, [ |
124 | - 'notnull' => false, // maybe true? |
|
124 | + 'notnull' => false, // maybe true? |
|
125 | 125 | 'length' => 256, |
126 | 126 | ]); |
127 | 127 | $table->setPrimaryKey(['id']); |
@@ -351,8 +351,8 @@ discard block |
||
351 | 351 | ->from('polls_options') |
352 | 352 | // ->where($queryFind->expr()->eq('poll_id', $pollId)) |
353 | 353 | // ->andWhere($queryFind->expr()->eq('poll_option', $text)); |
354 | - ->where('poll_id = "'. $pollId .'"') |
|
355 | - ->andWhere('poll_option_text ="' .$text .'"'); |
|
354 | + ->where('poll_id = "' . $pollId . '"') |
|
355 | + ->andWhere('poll_option_text ="' . $text . '"'); |
|
356 | 356 | |
357 | 357 | $resultFind = $queryFind->execute(); |
358 | 358 | $row = $resultFind->fetch(); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | /** |
48 | 48 | * Controllers |
49 | 49 | */ |
50 | - $container->registerService('PageController', function (IContainer $c) { |
|
50 | + $container->registerService('PageController', function(IContainer $c) { |
|
51 | 51 | return new PageController( |
52 | 52 | $c->query('AppName'), |
53 | 53 | $c->query('Request'), |
@@ -66,51 +66,51 @@ discard block |
||
66 | 66 | ); |
67 | 67 | }); |
68 | 68 | |
69 | - $container->registerService('UserManager', function (IContainer $c) { |
|
69 | + $container->registerService('UserManager', function(IContainer $c) { |
|
70 | 70 | return $c->query('ServerContainer')->getUserManager(); |
71 | 71 | }); |
72 | 72 | |
73 | - $container->registerService('GroupManager', function (IContainer $c) { |
|
73 | + $container->registerService('GroupManager', function(IContainer $c) { |
|
74 | 74 | return $c->query('ServerContainer')->getGroupManager(); |
75 | 75 | }); |
76 | 76 | |
77 | - $container->registerService('AvatarManager', function (IContainer $c) { |
|
77 | + $container->registerService('AvatarManager', function(IContainer $c) { |
|
78 | 78 | return $c->query('ServerContainer')->getAvatarManager(); |
79 | 79 | }); |
80 | 80 | |
81 | - $container->registerService('Logger', function (IContainer $c) { |
|
81 | + $container->registerService('Logger', function(IContainer $c) { |
|
82 | 82 | return $c->query('ServerContainer')->getLogger(); |
83 | 83 | }); |
84 | 84 | |
85 | - $container->registerService('L10N', function (IContainer $c) { |
|
85 | + $container->registerService('L10N', function(IContainer $c) { |
|
86 | 86 | return $c->query('ServerContainer')->getL10N($c->query('AppName')); |
87 | 87 | }); |
88 | 88 | |
89 | - $container->registerService('CommentMapper', function (IContainer $c) use ($server) { |
|
89 | + $container->registerService('CommentMapper', function(IContainer $c) use ($server) { |
|
90 | 90 | return new CommentMapper( |
91 | 91 | $server->getDatabaseConnection() |
92 | 92 | ); |
93 | 93 | }); |
94 | 94 | |
95 | - $container->registerService('OptionsMapper', function (IContainer $c) use ($server) { |
|
95 | + $container->registerService('OptionsMapper', function(IContainer $c) use ($server) { |
|
96 | 96 | return new OptionsMapper( |
97 | 97 | $server->getDatabaseConnection() |
98 | 98 | ); |
99 | 99 | }); |
100 | 100 | |
101 | - $container->registerService('EventMapper', function (IContainer $c) use ($server) { |
|
101 | + $container->registerService('EventMapper', function(IContainer $c) use ($server) { |
|
102 | 102 | return new EventMapper( |
103 | 103 | $server->getDatabaseConnection() |
104 | 104 | ); |
105 | 105 | }); |
106 | 106 | |
107 | - $container->registerService('NotificationMapper', function (IContainer $c) use ($server) { |
|
107 | + $container->registerService('NotificationMapper', function(IContainer $c) use ($server) { |
|
108 | 108 | return new NotificationMapper( |
109 | 109 | $server->getDatabaseConnection() |
110 | 110 | ); |
111 | 111 | }); |
112 | 112 | |
113 | - $container->registerService('VotesMapper', function (IContainer $c) use ($server) { |
|
113 | + $container->registerService('VotesMapper', function(IContainer $c) use ($server) { |
|
114 | 114 | return new VotesMapper( |
115 | 115 | $server->getDatabaseConnection() |
116 | 116 | ); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | */ |
123 | 123 | public function registerNavigationEntry() { |
124 | 124 | $container = $this->getContainer(); |
125 | - $container->query('OCP\INavigationManager')->add(function () use ($container) { |
|
125 | + $container->query('OCP\INavigationManager')->add(function() use ($container) { |
|
126 | 126 | $urlGenerator = $container->query('OCP\IURLGenerator'); |
127 | 127 | $l10n = $container->query('OCP\IL10N'); |
128 | 128 | return [ |