Completed
Push — master ( e5204d...1b0b82 )
by Megh
04:17
created
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.