Completed
Push — master ( 4505eb...71992a )
by Jared
06:03
created
src/ACLModel.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
         // check the if the requester has the `create`
111 111
         // permission before creating
112
-        static::creating(function (ModelEvent $event) {
112
+        static::creating(function(ModelEvent $event) {
113 113
             $model = $event->getModel();
114 114
 
115 115
             if (!$model->can('create', ACLModel::getRequester())) {
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
         // check the if the requester has the `edit`
123 123
         // permission before updating
124
-        static::updating(function (ModelEvent $event) {
124
+        static::updating(function(ModelEvent $event) {
125 125
             $model = $event->getModel();
126 126
 
127 127
             if (!$model->can('edit', ACLModel::getRequester())) {
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
         // check the if the requester has the `delete`
135 135
         // permission before deleting
136
-        static::deleting(function (ModelEvent $event) {
136
+        static::deleting(function(ModelEvent $event) {
137 137
             $model = $event->getModel();
138 138
 
139 139
             if (!$model->can('delete', ACLModel::getRequester())) {
Please login to merge, or discard this patch.
src/Model.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -180,13 +180,13 @@
 block discarded – undo
180 180
             static::$casts['updated_at'] = self::TYPE_DATE;
181 181
         }
182 182
 
183
-        self::creating(function (ModelEvent $event) {
183
+        self::creating(function(ModelEvent $event) {
184 184
             $model = $event->getModel();
185 185
             $model->created_at = time();
186 186
             $model->updated_at = time();
187 187
         });
188 188
 
189
-        self::updating(function (ModelEvent $event) {
189
+        self::updating(function(ModelEvent $event) {
190 190
             $event->getModel()->updated_at = time();
191 191
         });
192 192
     }
Please login to merge, or discard this patch.
Switch Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -523,46 +523,46 @@
 block discarded – undo
523 523
         }
524 524
 
525 525
         switch ($type) {
526
-        case self::TYPE_STRING:
527
-            return (string) $value;
526
+            case self::TYPE_STRING:
527
+                return (string) $value;
528 528
 
529
-        case self::TYPE_INTEGER:
530
-            return (int) $value;
529
+            case self::TYPE_INTEGER:
530
+                return (int) $value;
531 531
 
532
-        case self::TYPE_FLOAT:
533
-            return (float) $value;
532
+            case self::TYPE_FLOAT:
533
+                return (float) $value;
534 534
 
535
-        case self::TYPE_BOOLEAN:
536
-            return filter_var($value, FILTER_VALIDATE_BOOLEAN);
535
+            case self::TYPE_BOOLEAN:
536
+                return filter_var($value, FILTER_VALIDATE_BOOLEAN);
537 537
 
538
-        case self::TYPE_DATE:
539
-            // cast dates into Carbon objects
540
-            if ($value instanceof Carbon) {
541
-                return $value;
542
-            } else {
543
-                $format = self::DEFAULT_DATE_FORMAT;
538
+            case self::TYPE_DATE:
539
+                // cast dates into Carbon objects
540
+                if ($value instanceof Carbon) {
541
+                    return $value;
542
+                } else {
543
+                    $format = self::DEFAULT_DATE_FORMAT;
544 544
 
545
-                return Carbon::createFromFormat($format, $value);
546
-            }
545
+                    return Carbon::createFromFormat($format, $value);
546
+                }
547 547
 
548
-        case self::TYPE_ARRAY:
549
-            // decode JSON into an array
550
-            if (is_string($value)) {
551
-                return json_decode($value, true);
552
-            } else {
553
-                return (array) $value;
554
-            }
548
+            case self::TYPE_ARRAY:
549
+                // decode JSON into an array
550
+                if (is_string($value)) {
551
+                    return json_decode($value, true);
552
+                } else {
553
+                    return (array) $value;
554
+                }
555 555
 
556
-        case self::TYPE_OBJECT:
557
-            // decode JSON into an object
558
-            if (is_string($value)) {
559
-                return (object) json_decode($value);
560
-            } else {
561
-                return (object) $value;
562
-            }
556
+            case self::TYPE_OBJECT:
557
+                // decode JSON into an object
558
+                if (is_string($value)) {
559
+                    return (object) json_decode($value);
560
+                } else {
561
+                    return (object) $value;
562
+                }
563 563
 
564
-        default:
565
-            return $value;
564
+            default:
565
+                return $value;
566 566
         }
567 567
     }
568 568
 
Please login to merge, or discard this patch.