Completed
Branch master (a049c8)
by Christopher
12:07
created
api-classes/Database.php 1 patch
Doc Comments   +11 added lines patch added patch discarded remove patch
@@ -148,6 +148,12 @@  discard block
 block discarded – undo
148 148
         return $statement->fetchAll(PDO::FETCH_CLASS, $returnClass);
149 149
     }
150 150
 
151
+    /**
152
+     * @param string $returnClass
153
+     * @param string $table
154
+     * @param string[] $columns
155
+     * @param string[] $where
156
+     */
151 157
     public function selectSingle($returnClass, $table, $columns, $where = null)
152 158
     {
153 159
         $statement = $this->selectStatement($table, $columns, $where);
@@ -215,6 +221,8 @@  discard block
 block discarded – undo
215 221
 
216 222
   /**
217 223
    * Use with caution: it is often better to archive items to prevent creating null references.
224
+   * @param string $table
225
+   * @param string[] $where
218 226
    */
219 227
   public function delete($table, $where)
220 228
   {
@@ -253,6 +261,9 @@  discard block
 block discarded – undo
253 261
         return $table;
254 262
     }
255 263
 
264
+    /**
265
+     * @param string $table
266
+     */
256 267
     private function tableExists($table)
257 268
     {
258 269
         // todo: implement table check
Please login to merge, or discard this patch.
generated-classes/TechWilk/Rota/User.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@
 block discarded – undo
196 196
     /**
197 197
      * Determine if the user is marked as available for an event.
198 198
      *
199
-     * @return bool if user is available
199
+     * @return null|boolean if user is available
200 200
      */
201 201
     public function isAvailableForEvent(Event $event)
202 202
     {
Please login to merge, or discard this patch.
src/classes/Authentication.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -119,6 +119,9 @@
 block discarded – undo
119 119
         return true;
120 120
     }
121 121
 
122
+    /**
123
+     * @param EmailAddress $username
124
+     */
122 125
     private function numberOfLoginAttemptsIsOk($username)
123 126
     {
124 127
         $numberOfAllowedAttempts = 8;
Please login to merge, or discard this patch.
public/api/v1/index.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -419,7 +419,9 @@
 block discarded – undo
419 419
 // End of very very very basic auth
420 420
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
421 421
 
422
-else:
422
+else {
423
+    :
423 424
 http_response_code(401);
425
+}
424 426
 
425 427
 endif;
Please login to merge, or discard this patch.
public/old/overview.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,8 +114,10 @@
 block discarded – undo
114 114
 			</form>
115 115
 
116 116
 		  <?php
117
-            else:
117
+            else {
118
+                :
118 119
                 echo '<div class="box-body">'.$sentSuccess.'</div>';
120
+            }
119 121
             endif;
120 122
             ?>
121 123
 				</div>
Please login to merge, or discard this patch.
public/old/swap.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -271,14 +271,17 @@
 block discarded – undo
271 271
 
272 272
         <?php endforeach; ?>
273 273
       
274
-      <?php else: ?>
274
+      <?php else {
275
+    : ?>
275 276
       <?php // event has no roles the user can cover?>
276 277
       
277 278
       <div class="alert alert-warning">
278 279
         <h4><i class="icon fa fa-info"></i>There are no roles in the event you are skilled to cover.</h4>
279 280
         <p>If you need adding to the rota, speak to an admin.</p>
280 281
       </div>
281
-      <?php endif; ?>
282
+      <?php endif;
283
+}
284
+?>
282 285
 
283 286
 
284 287
 <?php include 'includes/footer.php'; ?>
Please login to merge, or discard this patch.
public/old/createEvent.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -567,7 +567,8 @@  discard block
 block discarded – undo
567 567
 											<?php if (!$userRole->getReserve()): ?>
568 568
 											<?php $isInEvent = in_array($userRole->getId(), $usersInEvent) ?>
569 569
 											<option value="<?php echo $userRole->getId() ?>" <?php echo $isInEvent ? 'selected="selected"' : '' ?>><?php echo $userRole->getUser()->getFirstName().' '.$userRole->getUser()->getLastName() ?></option>
570
-											<?php else: ?>
570
+											<?php else {
571
+    : ?>
571 572
 											<?php $countReserve += 1 ?>
572 573
 											<?php endif //!userRole->getReserve?>
573 574
 										<?php endforeach //users?>
@@ -646,4 +647,6 @@  discard block
 block discarded – undo
646 647
   </div><!-- /.createSeries -->
647 648
 
648 649
 
649
-<?php include 'includes/footer.php'; ?>
650
+<?php include 'includes/footer.php';
651
+}
652
+?>
Please login to merge, or discard this patch.
public/old/events.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -435,8 +435,10 @@
 block discarded – undo
435 435
 
436 436
                             echo '</li>';
437 437
                         }
438
-        echo '</ul>'; else:
438
+        echo '</ul>'; else {
439
+            :
439 440
                         echo '<p>No roles assigned to this event.';
441
+        }
440 442
         endif; ?>
441 443
 			</div><!-- /.user-roles -->
442 444
 		</div><!-- /.box-body -->
Please login to merge, or discard this patch.
public/old/includes/functions.mail.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -266,8 +266,10 @@  discard block
 block discarded – undo
266 266
     if (is_array($rotaoutput)):
267 267
         foreach ($rotaoutput as $key => $skill):
268 268
             $skillfinal = $skillfinal.$skill.' ';
269
-    endforeach; else:
269
+    endforeach; else {
270
+        :
270 271
         $skillfinal = $rotaoutput;
272
+    }
271 273
     endif;
272 274
     $message = str_replace('[rotaoutput]', $skillfinal, $message);
273 275
     $message = str_replace('[siteurl]', $siteurl, $message);
@@ -445,8 +447,10 @@  discard block
 block discarded – undo
445 447
             $roles = [];
446 448
             while ($roleRow = mysqli_fetch_array($roleResult, MYSQLI_ASSOC)) {
447 449
                 if (($roleRow['name'] == '') || ($roleRow['name'] == $roleRow['description'])):
448
-                    $roles[] = $roleRow['description']; else:
450
+                    $roles[] = $roleRow['description']; else {
451
+                        :
449 452
                     $roles[] = $roleRow['description'].' - '.$roleRow['name'];
453
+                    }
450 454
                 endif;
451 455
             }
452 456
 
Please login to merge, or discard this patch.