Completed
Push — master ( 9adb71...d88391 )
by Dimas
681:19 queued 665:54
created
assets/mdb-dashboard/js/modules/fullcalendar-3.10.0/demos/php/utils.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
 
25 25
   // Constructs an Event object from the given array of key=>values.
26 26
   // You can optionally force the timezone of the parsed dates.
27
-  public function __construct($array, $timezone=null) {
27
+  public function __construct($array, $timezone = null) {
28 28
 
29 29
     $this->title = $array['title'];
30 30
 
31 31
     if (isset($array['allDay'])) {
32 32
       // allDay has been explicitly specified
33
-      $this->allDay = (bool)$array['allDay'];
33
+      $this->allDay = (bool) $array['allDay'];
34 34
     }
35 35
     else {
36 36
       // Guess allDay based off of ISO8601 date strings
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
 
110 110
 // Parses a string into a DateTime object, optionally forced into the given timezone.
111
-function parseDateTime($string, $timezone=null) {
111
+function parseDateTime($string, $timezone = null) {
112 112
   $date = new DateTime(
113 113
     $string,
114 114
     $timezone ? $timezone : new DateTimeZone('UTC')
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,8 +31,7 @@  discard block
 block discarded – undo
31 31
     if (isset($array['allDay'])) {
32 32
       // allDay has been explicitly specified
33 33
       $this->allDay = (bool)$array['allDay'];
34
-    }
35
-    else {
34
+    } else {
36 35
       // Guess allDay based off of ISO8601 date strings
37 36
       $this->allDay = preg_match(self::ALL_DAY_REGEX, $array['start']) &&
38 37
         (!isset($array['end']) || preg_match(self::ALL_DAY_REGEX, $array['end']));
@@ -65,8 +64,7 @@  discard block
 block discarded – undo
65 64
 
66 65
     if (isset($this->end)) {
67 66
       $eventEnd = stripTime($this->end); // normalize
68
-    }
69
-    else {
67
+    } else {
70 68
       $eventEnd = $eventStart; // consider this a zero-duration event
71 69
     }
72 70
 
@@ -86,8 +84,7 @@  discard block
 block discarded – undo
86 84
     // Figure out the date format. This essentially encodes allDay into the date string.
87 85
     if ($this->allDay) {
88 86
       $format = 'Y-m-d'; // output like "2013-12-29"
89
-    }
90
-    else {
87
+    } else {
91 88
       $format = 'c'; // full ISO8601 output, like "2013-12-29T09:00:00+08:00"
92 89
     }
93 90
 
Please login to merge, or discard this patch.