Completed
Push — master ( 77228e...fd5853 )
by Jared
02:30
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 1 patch
Switch Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -579,44 +579,44 @@
 block discarded – undo
579 579
         }
580 580
 
581 581
         switch ($type) {
582
-        case self::TYPE_STRING:
583
-            return (string) $value;
584
-
585
-        case self::TYPE_INTEGER:
586
-            return (int) $value;
587
-
588
-        case self::TYPE_FLOAT:
589
-            return (float) $value;
590
-
591
-        case self::TYPE_BOOLEAN:
592
-            return filter_var($value, FILTER_VALIDATE_BOOLEAN);
593
-
594
-        case self::TYPE_DATE:
595
-            // cast dates as unix timestamps
596
-            if (!is_numeric($value)) {
597
-                return strtotime($value);
598
-            } else {
599
-                return $value + 0;
600
-            }
601
-
602
-        case self::TYPE_ARRAY:
603
-            // decode JSON into an array
604
-            if (is_string($value)) {
605
-                return json_decode($value, true);
606
-            } else {
607
-                return (array) $value;
608
-            }
609
-
610
-        case self::TYPE_OBJECT:
611
-            // decode JSON into an object
612
-            if (is_string($value)) {
613
-                return (object) json_decode($value);
614
-            } else {
615
-                return (object) $value;
616
-            }
617
-
618
-        default:
619
-            return $value;
582
+            case self::TYPE_STRING:
583
+                return (string) $value;
584
+
585
+            case self::TYPE_INTEGER:
586
+                return (int) $value;
587
+
588
+            case self::TYPE_FLOAT:
589
+                return (float) $value;
590
+
591
+            case self::TYPE_BOOLEAN:
592
+                return filter_var($value, FILTER_VALIDATE_BOOLEAN);
593
+
594
+            case self::TYPE_DATE:
595
+                // cast dates as unix timestamps
596
+                if (!is_numeric($value)) {
597
+                    return strtotime($value);
598
+                } else {
599
+                    return $value + 0;
600
+                }
601
+
602
+            case self::TYPE_ARRAY:
603
+                // decode JSON into an array
604
+                if (is_string($value)) {
605
+                    return json_decode($value, true);
606
+                } else {
607
+                    return (array) $value;
608
+                }
609
+
610
+            case self::TYPE_OBJECT:
611
+                // decode JSON into an object
612
+                if (is_string($value)) {
613
+                    return (object) json_decode($value);
614
+                } else {
615
+                    return (object) $value;
616
+                }
617
+
618
+            default:
619
+                return $value;
620 620
         }
621 621
     }
622 622
 
Please login to merge, or discard this patch.