Completed
Push — master ( e5204d...1b0b82 )
by Megh
04:17
created
src/app/views/contest/ttt_workshop.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2
-$text_input = function ($name, $large_text=false) use ($errors) {
2
+$text_input = function($name, $large_text = false) use ($errors) {
3 3
 ?>
4 4
     <?php if ($large_text): ?>
5 5
         <textarea name="<?= $name ?>" class="pure-input-1" required=""><?= isset($_POST[$name]) ? $_POST[$name] : '' ?></textarea>
6
-    <?php else: ?>
6
+    <?php else : ?>
7 7
         <input
8 8
             name="<?= $name ?>"
9 9
             value="<?= isset($_POST[$name]) ? $_POST[$name] : '' ?>"
Please login to merge, or discard this patch.
src/app/views/contest/futsal.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-$text_input = function ($name, $required=true) use ($errors) {
2
+$text_input = function($name, $required = true) use ($errors) {
3 3
 ?>
4 4
     <input
5 5
         name="<?= $name ?>"
Please login to merge, or discard this patch.
src/app/views/contest/visualizeit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-$text_input = function ($name, $type="text") use ($errors) {
2
+$text_input = function($name, $type = "text") use ($errors) {
3 3
 ?>
4 4
     <input
5 5
         name="<?= $name ?>"
Please login to merge, or discard this patch.
src/app/views/contest/riderofstorms.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2
-$text_input = function ($name, $large_text=false, $required=true) use ($errors) {
2
+$text_input = function($name, $large_text = false, $required = true) use ($errors) {
3 3
 ?>
4 4
     <?php if ($large_text): ?>
5 5
         <textarea name="<?= $name ?>" class="pure-input-1" <?php if ($required): ?>required=""<?php endif; ?> ><?= isset($_POST[$name]) ? $_POST[$name] : '' ?></textarea>
6
-    <?php else: ?>
6
+    <?php else : ?>
7 7
         <input
8 8
             name="<?= $name ?>"
9 9
             value="<?= isset($_POST[$name]) ? $_POST[$name] : '' ?>"
Please login to merge, or discard this patch.
src/app/views/contest/breakin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
                 You're registered for the event
12 12
                 <?php if ($team_info['nick2']): ?>
13 13
                     as a team with <?= $team_info['nick2'] == $user_nick ? $team_info['nick1'] : $team_info['nick2'] ?>.
14
-                <?php else: ?>
14
+                <?php else : ?>
15 15
                     as individual.
16 16
                 <?php endif; ?>
17 17
                 <?php if ($team_info['team_name']): ?>
Please login to merge, or discard this patch.
src/app/views/templates/category/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@
 block discarded – undo
8 8
 $events_to_display = [];
9 9
 
10 10
 foreach ($events_data as $event) {
11
-    if ( substr($event['path'], 1, $len) == $page_slug && $event['template'] == 'event' ) {
11
+    if (substr($event['path'], 1, $len) == $page_slug && $event['template'] == 'event') {
12 12
         $events_to_display[] = $event;
13 13
     }
14 14
 }
15
-usort($events_to_display, function ($e1, $e2) {
15
+usort($events_to_display, function($e1, $e2) {
16 16
     if (!$e2['data']['start_time']) {
17 17
         return -1;
18 18
     }
Please login to merge, or discard this patch.
src/app/views/templates/schedule/index.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php $this->load_fragment('skeleton_template/header', ['title' => __('Events')]); ?>
2 2
 <?php
3
-    $events_list = array_filter($events_data, function ($event) {
3
+    $events_list = array_filter($events_data, function($event) {
4 4
         return $event['template'] == 'event';
5 5
     });
6 6
     usort($events_list, function($a, $b) {
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
         $b_date = $b['data']['start_time'];
15 15
         $a_enddate = $a['data']['end_time'];
16 16
         $b_enddate = $b['data']['end_time'];
17
-        $now=@date('Y-m-d H:i');
17
+        $now = @date('Y-m-d H:i');
18 18
         if ($a_enddate >= $now xor $b_enddate >= $now) {
19 19
             if ($a_enddate >= $now) {
20 20
                 return -1;
@@ -34,10 +34,10 @@  discard block
 block discarded – undo
34 34
         $evref['path'] = substr($evref['path'], 1);
35 35
         $evref['type'] = substr($evref['path'], 0, - (strlen($evref['slug']) + 2));
36 36
         $cur = date_parse($evref['data']['start_time']);
37
-        array_push($dates, $cur['month']."-".$cur['day']);
37
+        array_push($dates, $cur['month'] . "-" . $cur['day']);
38 38
     }
39 39
     $is_imp = function($date) use ($dates) {
40
-        if ( in_array($date, $dates) ) {
40
+        if (in_array($date, $dates)) {
41 41
             echo " class='has-event'";
42 42
         }
43 43
     };
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 <div id = "categoriesnav" class="linkholder">
53 53
     <div class="categories">
54 54
         <?php
55
-        foreach ($events_list as $event){
56
-            $cat[$event['type']]=1;
55
+        foreach ($events_list as $event) {
56
+            $cat[$event['type']] = 1;
57 57
         }
58 58
         foreach ($cat as $key => $value):
59 59
 ?>
Please login to merge, or discard this patch.
src/app/views/sap/mission.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         <?php if (isset($mission['description'])): ?>
22 22
             <p><?= linkify(nl2br(htmlspecialchars($mission['description']))) ?></p>
23 23
         <?php endif; ?>
24
-        <?php if(!$mission['published']): ?>
24
+        <?php if (!$mission['published']): ?>
25 25
             <p>This mission is unpublished.</p>
26 26
             <form method="post" action="./publish">
27 27
                 <button type="submit" class="btn btn-red">Publish mission</button>
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             </strong>
41 41
         </p>
42 42
         <?php if ($is_admin): ?>
43
-            <?php if(!$mission['published']): ?>
43
+            <?php if (!$mission['published']): ?>
44 44
                 <a href="./createtask/" class="btn btn-green">Create new task</a>
45 45
             <?php endif; ?>
46 46
             <a href="../../review/mission/<?= $mission['id'] ?>/" class="btn btn-blue">
Please login to merge, or discard this patch.
src/app/views/sap/leaderboard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
             foreach ($user_scores as $user_score) {
23 23
                 $name = $user_score['name'];
24 24
                 $score = $user_score['score'];
25
-                if ($score_prev > $score){
25
+                if ($score_prev > $score) {
26 26
                     $score_prev = $score;
27 27
                     $rank += 1;
28 28
                 }
Please login to merge, or discard this patch.