Completed
Push — master ( 20ec0c...d1b9f0 )
by Brandon
28s
created
app/Device.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      *
32 32
      * @var array
33 33
      */
34
-    protected $hidden = ['token'];
34
+    protected $hidden = [ 'token' ];
35 35
     
36 36
     /**
37 37
      * The attributes that are mass assignable.
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      *
51 51
      * @var array
52 52
      */
53
-    protected static $ignoreChangedAttributes = ['updated_at'];
53
+    protected static $ignoreChangedAttributes = [ 'updated_at' ];
54 54
     
55 55
     /**
56 56
      * The attributes to log in the Activity Log
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function getSiteAttribute()
93 93
     {
94
-        return $this->location->site ?? (object)[];
94
+        return $this->location->site ?? (object) [ ];
95 95
     }
96 96
     
97 97
     /**
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         else
152 152
             $time = new Carbon($value, 'UTC');
153 153
         
154
-        $this->attributes['open_time'] = $time->format('H:i:s');
154
+        $this->attributes[ 'open_time' ] = $time->format('H:i:s');
155 155
     }
156 156
     
157 157
     /**
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         else
174 174
             $time = new Carbon($value, 'UTC');
175 175
         
176
-        $this->attributes['close_time'] = $time->format('H:i:s');
176
+        $this->attributes[ 'close_time' ] = $time->format('H:i:s');
177 177
     }
178 178
     
179 179
     /**
Please login to merge, or discard this patch.
Braces   +10 added lines, -8 removed lines patch added patch discarded remove patch
@@ -107,8 +107,9 @@  discard block
 block discarded – undo
107 107
         $time = new Carbon($value, 'UTC');
108 108
         
109 109
         //If the user is logged in then use there preferred timezone
110
-        if (Auth::check())
111
-            $time = $time->setTimezone(Auth::user()->timezone);
110
+        if (Auth::check()) {
111
+                    $time = $time->setTimezone(Auth::user()->timezone);
112
+        }
112 113
 
113 114
         return $time->format('H:i');
114 115
     }
@@ -126,8 +127,9 @@  discard block
 block discarded – undo
126 127
         $time = new Carbon($value, 'UTC');
127 128
     
128 129
         //If the user is logged in then use there preferred timezone
129
-        if (Auth::check())
130
-            $time = $time->setTimezone(Auth::user()->timezone);
130
+        if (Auth::check()) {
131
+                    $time = $time->setTimezone(Auth::user()->timezone);
132
+        }
131 133
         
132 134
         return $time->format('H:i');
133 135
     }
@@ -147,9 +149,9 @@  discard block
 block discarded – undo
147 149
         {
148 150
             $time = new Carbon($value, Auth::user()->timezone);
149 151
             $time = $time->setTimezone('UTC');
152
+        } else {
153
+                    $time = new Carbon($value, 'UTC');
150 154
         }
151
-        else
152
-            $time = new Carbon($value, 'UTC');
153 155
         
154 156
         $this->attributes['open_time'] = $time->format('H:i:s');
155 157
     }
@@ -169,9 +171,9 @@  discard block
 block discarded – undo
169 171
         {
170 172
             $time = new Carbon($value, Auth::user()->timezone);
171 173
             $time = $time->setTimezone('UTC');
174
+        } else {
175
+                    $time = new Carbon($value, 'UTC');
172 176
         }
173
-        else
174
-            $time = new Carbon($value, 'UTC');
175 177
         
176 178
         $this->attributes['close_time'] = $time->format('H:i:s');
177 179
     }
Please login to merge, or discard this patch.