Test Failed
Branch master (fee893)
by René
03:21
created
templates/create.tmpl.php 1 patch
Braces   +68 added lines, -20 removed lines patch added patch discarded remove patch
@@ -78,8 +78,11 @@  discard block
 block discarded – undo
78 78
                         <span>
79 79
                         <?php if ($isUpdate): ?>
80 80
                             <?php p($l->t('Edit poll') . ' ' . $poll->getTitle()); ?>
81
-                        <?php else: ?>
82
-                          <?php p($l->t('Create new poll')); ?>
81
+                        <?php else {
82
+    : ?>
83
+                          <?php p($l->t('Create new poll'));
84
+}
85
+?>
83 86
                         <?php endif; ?>
84 87
                         </span>
85 88
                     </div>
@@ -89,11 +92,20 @@  discard block
 block discarded – undo
89 92
 <?php if ($isUpdate): ?>
90 93
 <form name="finish_poll" action="<?php p($urlGenerator->linkToRoute('polls.page.update_poll')); ?>" method="POST">
91 94
     <input type="hidden" name="pollId" value="<?php p($poll->getId()); ?>" />
92
-<?php else: ?>
93
-<form name="finish_poll" action="<?php p($urlGenerator->linkToRoute('polls.page.insert_poll')); ?>" method="POST">
95
+<?php else {
96
+    : ?>
97
+<form name="finish_poll" action="<?php p($urlGenerator->linkToRoute('polls.page.insert_poll'));
98
+}
99
+?>" method="POST">
94 100
 <?php endif; ?>
95
-    <input type="hidden" name="chosenDates" id="chosenDates" value="<?php if (isset($chosen)) p($chosen); ?>" />
96
-    <input type="hidden" name="expireTs" id="expireTs" value="<?php if (isset($expireTs)) p($expireTs); ?>" />
101
+    <input type="hidden" name="chosenDates" id="chosenDates" value="<?php if (isset($chosen)) {
102
+    p($chosen);
103
+}
104
+?>" />
105
+    <input type="hidden" name="expireTs" id="expireTs" value="<?php if (isset($expireTs)) {
106
+    p($expireTs);
107
+}
108
+?>" />
97 109
     <input type="hidden" name="userId" id="userId" value="<?php p($userId); ?>" />
98 110
 
99 111
     <header class="row">
@@ -102,22 +114,40 @@  discard block
 block discarded – undo
102 114
     <div class="new_poll row">
103 115
         <div class="col-50">
104 116
             <label for="pollTitle" class="input_title"><?php p($l->t('Title')); ?></label>
105
-            <input type="text" class="input_field" id="pollTitle" name="pollTitle" value="<?php if (isset($title)) p($title); ?>" />
117
+            <input type="text" class="input_field" id="pollTitle" name="pollTitle" value="<?php if (isset($title)) {
118
+    p($title);
119
+}
120
+?>" />
106 121
             <label for="pollDesc" class="input_title"><?php p($l->t('Description')); ?></label>
107
-            <textarea class="input_field" id="pollDesc" name="pollDesc"><?php if (isset($desc)) p($desc); ?></textarea>
122
+            <textarea class="input_field" id="pollDesc" name="pollDesc"><?php if (isset($desc)) {
123
+    p($desc);
124
+}
125
+?></textarea>
108 126
 
109 127
             <label class="input_title"><?php p($l->t('Access')); ?></label>
110 128
 
111
-            <input type="radio" name="accessType" id="private" value="registered" class="radio" <?php if (!$isUpdate || $access === 'registered') print_unescaped('checked'); ?> />
129
+            <input type="radio" name="accessType" id="private" value="registered" class="radio" <?php if (!$isUpdate || $access === 'registered') {
130
+    print_unescaped('checked');
131
+}
132
+?> />
112 133
             <label for="private"><?php p($l->t('Registered users only')); ?></label>
113 134
 
114
-            <input type="radio" name="accessType" id="hidden" value="hidden" class="radio" <?php if ($isUpdate && $access === 'hidden') print_unescaped('checked'); ?> />
135
+            <input type="radio" name="accessType" id="hidden" value="hidden" class="radio" <?php if ($isUpdate && $access === 'hidden') {
136
+    print_unescaped('checked');
137
+}
138
+?> />
115 139
             <label for="hidden"><?php p($l->t('hidden')); ?></label>
116 140
 
117
-            <input type="radio" name="accessType" id="public" value="public" class="radio" <?php if ($isUpdate && $access === 'public') print_unescaped('checked'); ?> />
141
+            <input type="radio" name="accessType" id="public" value="public" class="radio" <?php if ($isUpdate && $access === 'public') {
142
+    print_unescaped('checked');
143
+}
144
+?> />
118 145
             <label for="public"><?php p($l->t('Public access')); ?></label>
119 146
 
120
-            <input type="radio" name="accessType" id="select" value="select" class="radio" <?php if ($isUpdate && $access === 'select') print_unescaped('checked'); ?>>
147
+            <input type="radio" name="accessType" id="select" value="select" class="radio" <?php if ($isUpdate && $access === 'select') {
148
+    print_unescaped('checked');
149
+}
150
+?>>
121 151
             <label for="select"><?php p($l->t('Select')); ?></label>
122 152
             <span id="id_label_select">...</span>
123 153
 
@@ -133,9 +163,12 @@  discard block
 block discarded – undo
133 163
                 </div>
134 164
             </div>
135 165
 
136
-            <input type="hidden" name="accessValues" id="accessValues" value="<?php if ($isUpdate && $access === 'select') p($accessTypes) ?>" />
166
+            <input type="hidden" name="accessValues" id="accessValues" value="<?php if ($isUpdate && $access === 'select') {
167
+    p($accessTypes) ?>" />
137 168
 
138
-            <input id="isAnonymous" name="isAnonymous" type="checkbox" class="checkbox" <?php $isAnonymous ? print_unescaped('value="true" checked') : print_unescaped('value="false"'); ?> />
169
+            <input id="isAnonymous" name="isAnonymous" type="checkbox" class="checkbox" <?php $isAnonymous ? print_unescaped('value="true" checked') : print_unescaped('value="false"');
170
+}
171
+?> />
139 172
             <label for="isAnonymous" class="input_title"><?php p($l->t('Anonymous')) ?></label>
140 173
 
141 174
             <div id="anonOptions" style="display:none;">
@@ -151,20 +184,32 @@  discard block
 block discarded – undo
151 184
         </div>
152 185
         <div class="col-50">
153 186
 
154
-            <input type="radio" name="pollType" id="event" value="event" class="radio" <?php if (!$isUpdate || $poll->getType() == '0') print_unescaped('checked'); ?> />
187
+            <input type="radio" name="pollType" id="event" value="event" class="radio" <?php if (!$isUpdate || $poll->getType() == '0') {
188
+    print_unescaped('checked');
189
+}
190
+?> />
155 191
             <label for="event"><?php p($l->t('Event schedule')); ?></label>
156 192
 
157 193
             <!-- TODO texts to db -->
158
-            <input type="radio" name="pollType" id="text" value="text" class="radio" <?php if ($isUpdate && $poll->getType() == '1') print_unescaped('checked'); ?>>
194
+            <input type="radio" name="pollType" id="text" value="text" class="radio" <?php if ($isUpdate && $poll->getType() == '1') {
195
+    print_unescaped('checked');
196
+}
197
+?>>
159 198
             <label for="text"><?php p($l->t('Text based')); ?></label>
160 199
 
161
-            <div id="date-select-container" <?php if ($isUpdate && $poll->getType() == '1') print_unescaped('style="display:none;"'); ?> >
200
+            <div id="date-select-container" <?php if ($isUpdate && $poll->getType() == '1') {
201
+    print_unescaped('style="display:none;"');
202
+}
203
+?> >
162 204
                 <label for="datetimepicker" class="input_title"><?php p($l->t('Dates')); ?></label>
163 205
                 <input id="datetimepicker" type="text" />
164 206
                 <table id="selected-dates-table" class="choices">
165 207
                 </table>
166 208
             </div>
167
-            <div id="text-select-container" <?php if(!$isUpdate || $poll->getType() == '0') print_unescaped('style="display:none;"'); ?> >
209
+            <div id="text-select-container" <?php if(!$isUpdate || $poll->getType() == '0') {
210
+    print_unescaped('style="display:none;"');
211
+}
212
+?> >
168 213
                 <label for="text-title" class="input_title"><?php p($l->t('Text item')); ?></label>
169 214
                 <div class="input-group">
170 215
                     <input type="text" id="text-title" placeholder="<?php print_unescaped('Insert text...'); ?>" />
@@ -180,8 +225,11 @@  discard block
 block discarded – undo
180 225
     <div class="form-actions">
181 226
         <?php if ($isUpdate): ?>
182 227
             <input type="submit" id="submit_finish_poll" class="button btn primary" value="<?php p($l->t('Update poll')); ?>" />
183
-        <?php else: ?>
184
-            <input type="submit" id="submit_finish_poll" class="button btn primary" value="<?php p($l->t('Create poll')); ?>" />
228
+        <?php else {
229
+    : ?>
230
+            <input type="submit" id="submit_finish_poll" class="button btn primary" value="<?php p($l->t('Create poll'));
231
+}
232
+?>" />
185 233
         <?php endif; ?>
186 234
         <a href="<?php p($urlGenerator->linkToRoute('polls.page.index')); ?>" id="submit_cancel_poll" class="button"><?php p($l->t('Cancel')); ?></a>
187 235
     </div>
Please login to merge, or discard this patch.
templates/main.tmpl.php 1 patch
Braces   +15 added lines, -7 removed lines patch added patch discarded remove patch
@@ -53,14 +53,17 @@  discard block
 block discarded – undo
53 53
             <div class="icon-polls"></div>
54 54
             <h2><?php p($l->t('No existing polls.')); ?></h2>
55 55
         </div>
56
-    <?php else : ?>
56
+    <?php else {
57
+    : ?>
57 58
             <div class="table has-controls">
58 59
                 <div class ="row table-header">
59 60
 
60 61
                     <div class="wrapper group-master">
61 62
                         <div class="wrapper group-1">
62 63
                             <div class="wrapper group-1-1">
63
-                                <div class="column name">        <?php p($l->t('Title')); ?></div>
64
+                                <div class="column name">        <?php p($l->t('Title'));
65
+}
66
+?></div>
64 67
                                 <div class="column description"></div>
65 68
                             </div>
66 69
                             <div class="wrapper group-1-2">
@@ -83,7 +86,9 @@  discard block
 block discarded – undo
83 86
 
84 87
                 <?php foreach ($_['polls'] as $poll) : ?>
85 88
                     <?php
86
-                        if (!userHasAccess($poll, $userId)) continue;
89
+                        if (!userHasAccess($poll, $userId)) {
90
+                            continue;
91
+                        }
87 92
                         // direct url to poll
88 93
                         $pollUrl = $urlGenerator->linkToRouteAbsolute('polls.page.goto_poll', array('hash' => $poll->getHash()));
89 94
                         $owner = $poll->getOwner();
@@ -250,12 +255,15 @@  discard block
 block discarded – undo
250 255
         if (strpos($item, 'group_') === 0) {
251 256
             $grp = substr($item, 6);
252 257
             foreach ($user_groups as $user_group) {
253
-                if ($user_group === $grp) return true;
258
+                if ($user_group === $grp) {
259
+                    return true;
260
+                }
254 261
             }
255
-        }
256
-        else if (strpos($item, 'user_') === 0) {
262
+        } else if (strpos($item, 'user_') === 0) {
257 263
             $usr = substr($item, 5);
258
-            if ($usr === $userId) return true;
264
+            if ($usr === $userId) {
265
+                return true;
266
+            }
259 267
         }
260 268
     }
261 269
     return false;
Please login to merge, or discard this patch.
templates/goto.tmpl.php 1 patch
Braces   +14 added lines, -5 removed lines patch added patch discarded remove patch
@@ -319,7 +319,10 @@  discard block
 block discarded – undo
319 319
                         </form>
320 320
                         <?php if (User::isLoggedIn()) : ?>
321 321
                         <span class="notification">
322
-                            <input type="checkbox" id="check_notif" class="checkbox" <?php if ($notification !== null) print_unescaped(' checked'); ?> />
322
+                            <input type="checkbox" id="check_notif" class="checkbox" <?php if ($notification !== null) {
323
+    print_unescaped(' checked');
324
+}
325
+?> />
323 326
                             <label for="check_notif"><?php p($l->t('Receive notification email on activity')); ?></label>
324 327
                         </span>
325 328
                         <?php endif; ?>
@@ -351,8 +354,11 @@  discard block
 block discarded – undo
351 354
                                     <a href="<?php p($urlGenerator->linkToRouteAbsolute('core.login.showLoginForm')); ?>"><?php p($l->t('Login')); ?></a>
352 355
                                     <?php p($l->t('or')); ?>
353 356
                                     <?php print_unescaped('<th id="id_ac_detected" class="external current-user"><input type="text" name="user_name_comm" id="user_name_comm" placeholder="' . $l->t('Your name here') . '" /></th>'); ?>
354
-                                <?php else: ?>
355
-                                    <?php p($l->t('Logged in as') . ' ' . $userId); ?>
357
+                                <?php else {
358
+    : ?>
359
+                                    <?php p($l->t('Logged in as') . ' ' . $userId);
360
+}
361
+?>
356 362
                                 <?php endif; ?>
357 363
                                     <textarea id="commentBox" name="commentBox"></textarea>
358 364
                                     <p>
@@ -386,8 +392,11 @@  discard block
 block discarded – undo
386 392
                                     </div>
387 393
                                 </div>
388 394
                             <?php endforeach; ?>
389
-                        <?php else : ?>
390
-                            <?php p($l->t('No comments yet. Be the first.')); ?>
395
+                        <?php else {
396
+    : ?>
397
+                            <?php p($l->t('No comments yet. Be the first.'));
398
+}
399
+?>
391 400
                         <?php endif; ?>
392 401
                     </div>
393 402
                 </div>
Please login to merge, or discard this patch.