Passed
Push — master ( 75b208...ba00c7 )
by Sebastian
09:12
created
src/Microtime/ParseResult.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
     public function __construct(string $datetime, DateTimeZone $timeZone)
42 42
     {
43
-        if(stripos($datetime, 'T') !== false) {
43
+        if (stripos($datetime, 'T') !== false) {
44 44
             $datetime = $this->parseISO8601($datetime);
45 45
         }
46 46
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     {
53 53
         preg_match('/([0-9]{4}-[0-9]{2}-[0-9]{2})T([0-9]{2}:[0-9]{2}:[0-9]{2})\.([0-9]+)Z/', $datetime, $matches);
54 54
 
55
-        if(!empty($matches[0])) {
55
+        if (!empty($matches[0])) {
56 56
             return sprintf(
57 57
                 '%s %s.%s',
58 58
                 $matches[1],
Please login to merge, or discard this patch.
src/Microtime.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
      * @see Microtime::createFromString()
52 52
      * @see Microtime::createNow()
53 53
      */
54
-    public function __construct($datetime=self::DATETIME_NOW, ?DateTimeZone $timeZone=null)
54
+    public function __construct($datetime = self::DATETIME_NOW, ?DateTimeZone $timeZone = null)
55 55
     {
56
-        if($datetime instanceof Microtime_ParseResult)
56
+        if ($datetime instanceof Microtime_ParseResult)
57 57
         {
58 58
             $parsed = $datetime;
59 59
         }
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
      * @return Microtime_ParseResult
87 87
      * @throws Microtime_Exception
88 88
      */
89
-    private function parseDate($datetime, ?DateTimeZone $timeZone=null) : Microtime_ParseResult
89
+    private function parseDate($datetime, ?DateTimeZone $timeZone = null) : Microtime_ParseResult
90 90
     {
91
-        if($datetime instanceof self)
91
+        if ($datetime instanceof self)
92 92
         {
93 93
             return new Microtime_ParseResult(
94 94
                 $datetime->getISODate(),
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             );
97 97
         }
98 98
 
99
-        if($datetime instanceof DateTime)
99
+        if ($datetime instanceof DateTime)
100 100
         {
101 101
             return new Microtime_ParseResult(
102 102
                 $datetime->format(self::FORMAT_ISO),
@@ -104,17 +104,17 @@  discard block
 block discarded – undo
104 104
             );
105 105
         }
106 106
 
107
-        if($timeZone === null)
107
+        if ($timeZone === null)
108 108
         {
109 109
             $timeZone = new DateTimeZone(date_default_timezone_get());
110 110
         }
111 111
 
112
-        if(empty($datetime) || $datetime === self::DATETIME_NOW)
112
+        if (empty($datetime) || $datetime === self::DATETIME_NOW)
113 113
         {
114 114
             return self::parseNow($timeZone);
115 115
         }
116 116
 
117
-        if(is_string($datetime))
117
+        if (is_string($datetime))
118 118
         {
119 119
             return new Microtime_ParseResult(
120 120
                 $datetime,
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     {
142 142
         $dateObj = DateTime::createFromFormat('0.u00 U', microtime(), new DateTimeZone('America/Denver'));
143 143
 
144
-        if($dateObj !== false)
144
+        if ($dateObj !== false)
145 145
         {
146 146
             $dateObj->setTimezone($timeZone);
147 147
 
@@ -165,9 +165,9 @@  discard block
 block discarded – undo
165 165
      * @return Microtime
166 166
      * @throws Microtime_Exception
167 167
      */
168
-    public static function createNow(?DateTimeZone $timeZone=null) : Microtime
168
+    public static function createNow(?DateTimeZone $timeZone = null) : Microtime
169 169
     {
170
-        if($timeZone === null)
170
+        if ($timeZone === null)
171 171
         {
172 172
             $timeZone = new DateTimeZone(date_default_timezone_get());
173 173
         }
@@ -184,9 +184,9 @@  discard block
 block discarded – undo
184 184
      * @return Microtime
185 185
      * @throws Microtime_Exception
186 186
      */
187
-    public static function createFromString(string $date, ?DateTimeZone $timeZone=null) : Microtime
187
+    public static function createFromString(string $date, ?DateTimeZone $timeZone = null) : Microtime
188 188
     {
189
-        if($timeZone === null)
189
+        if ($timeZone === null)
190 190
         {
191 191
             $timeZone = new DateTimeZone(date_default_timezone_get());
192 192
         }
Please login to merge, or discard this patch.