Passed
Branch main (24508e)
by Muhammad Dyas
04:26 queued 01:48
created
Category
src/DynamicBuilder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -110,12 +110,12 @@  discard block
 block discarded – undo
110 110
     public function get($columns = ['*'])
111 111
     {
112 112
 
113
-        if ($this->model !== null && !empty( $this->dynamicColumns)) {
113
+        if ($this->model !== null && !empty($this->dynamicColumns)) {
114 114
             $i = 0;
115 115
             foreach ($this->wheres as $where) {
116 116
                 if (strpos($where['column'], '->')) {
117 117
                     $parts = explode('->', $where['column'], 2);
118
-                    if (in_array($parts[0],  $this->dynamicColumns)) {
118
+                    if (in_array($parts[0], $this->dynamicColumns)) {
119 119
                         $this->wheres[$i]['column'] = DB::raw("COLUMN_GET(`$parts[0]`, '$parts[1]' as char)");
120 120
                     }
121 121
                 }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         return collect(
128 128
             $this->onceWithColumns(
129 129
                 Arr::wrap($columns),
130
-                function () {
130
+                function() {
131 131
                     return $this->processor->processSelect($this, $this->runSelect());
132 132
                 }
133 133
             )
Please login to merge, or discard this patch.
src/HasDynamicColumn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     {
16 16
         static::addGlobalScope(new DynamicScope());
17 17
         static::saving(
18
-            function ($model) {
18
+            function($model) {
19 19
                 foreach ($model->getCasts() as $column => $cast) {
20 20
                     if ($cast == 'Halalsoft\LaravelDynamicColumn\Dynamic') {
21 21
                         $model->$column = $model->$column;
Please login to merge, or discard this patch.