Completed
Push — master ( f21d6d...4505eb )
by Jared
03:02
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
Switch Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -559,44 +559,44 @@
 block discarded – undo
559 559
         }
560 560
 
561 561
         switch ($type) {
562
-        case self::TYPE_STRING:
563
-            return (string) $value;
562
+            case self::TYPE_STRING:
563
+                return (string) $value;
564 564
 
565
-        case self::TYPE_INTEGER:
566
-            return (int) $value;
565
+            case self::TYPE_INTEGER:
566
+                return (int) $value;
567 567
 
568
-        case self::TYPE_FLOAT:
569
-            return (float) $value;
568
+            case self::TYPE_FLOAT:
569
+                return (float) $value;
570 570
 
571
-        case self::TYPE_BOOLEAN:
572
-            return filter_var($value, FILTER_VALIDATE_BOOLEAN);
571
+            case self::TYPE_BOOLEAN:
572
+                return filter_var($value, FILTER_VALIDATE_BOOLEAN);
573 573
 
574
-        case self::TYPE_DATE:
575
-            // cast dates as unix timestamps
576
-            if (!is_numeric($value)) {
577
-                return strtotime($value);
578
-            } else {
579
-                return $value + 0;
580
-            }
574
+            case self::TYPE_DATE:
575
+                // cast dates as unix timestamps
576
+                if (!is_numeric($value)) {
577
+                    return strtotime($value);
578
+                } else {
579
+                    return $value + 0;
580
+                }
581 581
 
582
-        case self::TYPE_ARRAY:
583
-            // decode JSON into an array
584
-            if (is_string($value)) {
585
-                return json_decode($value, true);
586
-            } else {
587
-                return (array) $value;
588
-            }
582
+            case self::TYPE_ARRAY:
583
+                // decode JSON into an array
584
+                if (is_string($value)) {
585
+                    return json_decode($value, true);
586
+                } else {
587
+                    return (array) $value;
588
+                }
589 589
 
590
-        case self::TYPE_OBJECT:
591
-            // decode JSON into an object
592
-            if (is_string($value)) {
593
-                return (object) json_decode($value);
594
-            } else {
595
-                return (object) $value;
596
-            }
590
+            case self::TYPE_OBJECT:
591
+                // decode JSON into an object
592
+                if (is_string($value)) {
593
+                    return (object) json_decode($value);
594
+                } else {
595
+                    return (object) $value;
596
+                }
597 597
 
598
-        default:
599
-            return $value;
598
+            default:
599
+                return $value;
600 600
         }
601 601
     }
602 602
 
Please login to merge, or discard this patch.
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.