Completed
Push — master ( 274f99...dca8df )
by Yaro
01:38
created
src/Jarboe/Table/Fields/Checkbox.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
             return null;
20 20
         }
21 21
 
22
-        return (bool) $value;
22
+        return (bool)$value;
23 23
     }
24 24
 
25 25
     public function getListValue($model)
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     {
35 35
         $template = $this->isReadonly() ? 'readonly' : 'edit';
36 36
 
37
-        return view('jarboe::crud.fields.checkbox.'. $template, [
37
+        return view('jarboe::crud.fields.checkbox.'.$template, [
38 38
             'model' => $model,
39 39
             'field' => $this,
40 40
         ])->render();
Please login to merge, or discard this patch.
src/Jarboe/Table/Fields/Date.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
     {
66 66
         $template = $this->isReadonly() ? 'readonly' : 'edit';
67 67
 
68
-        return view('jarboe::crud.fields.date.'. $template, [
68
+        return view('jarboe::crud.fields.date.'.$template, [
69 69
             'model' => $model,
70 70
             'field' => $this,
71 71
         ])->render();
Please login to merge, or discard this patch.
src/Jarboe/Table/Fields/Markdown.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
     public function value(Request $request)
13 13
     {
14
-        return (string) parent::value($request);
14
+        return (string)parent::value($request);
15 15
     }
16 16
 
17 17
     public function getListValue($model)
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     {
27 27
         $template = $this->isReadonly() ? 'readonly' : 'edit';
28 28
 
29
-        return view('jarboe::crud.fields.markdown.'. $template, [
29
+        return view('jarboe::crud.fields.markdown.'.$template, [
30 30
             'model' => $model,
31 31
             'field' => $this,
32 32
         ])->render();
Please login to merge, or discard this patch.
src/Jarboe/Table/Fields/Image.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         if (!$this->isCrop()) {
57 57
             if ($this->isEncode()) {
58 58
                 $image = InterventionImage::make($file->getRealPath());
59
-                return (string) $image->encode('data-url');
59
+                return (string)$image->encode('data-url');
60 60
             }
61 61
             return $file->storeAs($this->getPath(), $filename, $this->getDisk());
62 62
         }
@@ -74,11 +74,11 @@  discard block
 block discarded – undo
74 74
         }
75 75
 
76 76
         if ($this->isEncode()) {
77
-            return (string) $image->encode('data-url');
77
+            return (string)$image->encode('data-url');
78 78
         }
79 79
 
80
-        $path = trim($this->getPath() .'/'. $filename, '/');
81
-        IlluminateStorage::disk($this->getDisk())->put($path, (string) $image->encode());
80
+        $path = trim($this->getPath().'/'.$filename, '/');
81
+        IlluminateStorage::disk($this->getDisk())->put($path, (string)$image->encode());
82 82
 
83 83
         return $path;
84 84
     }
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     {
150 150
         $template = $this->isReadonly() ? 'readonly' : 'edit';
151 151
 
152
-        return view('jarboe::crud.fields.image.'. $template, [
152
+        return view('jarboe::crud.fields.image.'.$template, [
153 153
             'model' => $model,
154 154
             'field' => $this,
155 155
         ])->render();
Please login to merge, or discard this patch.
src/Jarboe/Table/Fields/Text.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
             return null;
31 31
         }
32 32
 
33
-        return is_array($value) ? $value : (string) $value;
33
+        return is_array($value) ? $value : (string)$value;
34 34
     }
35 35
 
36 36
     public function getListValue($model)
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             $template .= '_translatable';
41 41
         }
42 42
 
43
-        return view('jarboe::crud.fields.text.'. $template, [
43
+        return view('jarboe::crud.fields.text.'.$template, [
44 44
             'model' => $model,
45 45
             'field' => $this,
46 46
         ])->render();
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     {
51 51
         $template = $this->isReadonly() ? 'readonly' : 'edit';
52 52
 
53
-        return view('jarboe::crud.fields.text.'. $template, [
53
+        return view('jarboe::crud.fields.text.'.$template, [
54 54
             'model' => $model,
55 55
             'field' => $this,
56 56
         ])->render();
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     {
61 61
         $template = 'create';
62 62
 
63
-        return view('jarboe::crud.fields.text.'. $template, [
63
+        return view('jarboe::crud.fields.text.'.$template, [
64 64
             'field' => $this,
65 65
         ])->render();
66 66
     }
Please login to merge, or discard this patch.
src/Jarboe/Table/Fields/Hidden.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
     public function value(Request $request)
23 23
     {
24
-        return (string) parent::value($request);
24
+        return (string)parent::value($request);
25 25
     }
26 26
 
27 27
     public function getListValue($model)
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     {
37 37
         $template = $this->isReadonly() ? 'readonly' : 'edit';
38 38
 
39
-        return view('jarboe::crud.fields.hidden.'. $template, [
39
+        return view('jarboe::crud.fields.hidden.'.$template, [
40 40
             'model' => $model,
41 41
             'field' => $this,
42 42
         ])->render();
Please login to merge, or discard this patch.
src/Jarboe/Table/Fields/IconPicker.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
     public function value(Request $request)
14 14
     {
15
-        return (string) parent::value($request);
15
+        return (string)parent::value($request);
16 16
     }
17 17
 
18 18
     public function getListValue($model)
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     {
28 28
         $template = $this->isReadonly() ? 'readonly' : 'edit';
29 29
 
30
-        return view('jarboe::crud.fields.icon-picker.'. $template, [
30
+        return view('jarboe::crud.fields.icon-picker.'.$template, [
31 31
             'model' => $model,
32 32
             'field' => $this,
33 33
         ])->render();
Please login to merge, or discard this patch.
src/Jarboe/Table/Fields/Traits/Tooltip.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
     public function hasTooltip()
26 26
     {
27
-        return (bool) $this->tooltip;
27
+        return (bool)$this->tooltip;
28 28
     }
29 29
 
30 30
 }
Please login to merge, or discard this patch.
src/Jarboe/Table/Fields/Traits/Relations.php 3 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,10 +150,12 @@
 block discarded – undo
150 150
                     $model->{$this->getRelationMethod($index)}()->saveMany($relatedList);
151 151
                     break;
152 152
                 case MorphToMany::class:
153
-                    if ($relation['group']) { // is morphedByMany
153
+                    if ($relation['group']) {
154
+// is morphedByMany
154 155
                         $ids = $this->filterValuesForMorphToManyRelation($ids, crc32($relation['group']));
155 156
                         $model->{$this->getRelationMethod($index)}()->sync($ids);
156
-                    } else { // is morphToMany
157
+                    } else {
158
+// is morphToMany
157 159
                         $model->{$this->getRelationMethod($index)}()->update([
158 160
                             $model->{$this->getRelationMethod($index)}()->getMorphType() => null,
159 161
                             $model->{$this->getRelationMethod($index)}()->getForeignPivotKeyName() => null,
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -254,6 +254,9 @@
 block discarded – undo
254 254
         return $this;
255 255
     }
256 256
 
257
+    /**
258
+     * @return integer
259
+     */
257 260
     abstract public function getModel();
258 261
     abstract public function isMultiple();
259 262
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,12 +29,12 @@  discard block
 block discarded – undo
29 29
 
30 30
     public function getRelationMethod($relationIndex = 0)
31 31
     {
32
-        return Arr::get($this->relations, $relationIndex .'.method');
32
+        return Arr::get($this->relations, $relationIndex.'.method');
33 33
     }
34 34
 
35 35
     public function getRelationTitleField($relationIndex = 0)
36 36
     {
37
-        return Arr::get($this->relations, $relationIndex .'.title');
37
+        return Arr::get($this->relations, $relationIndex.'.title');
38 38
     }
39 39
 
40 40
     public function relation(string $method, string $titleField, string $groupTitle = '')
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 
235 235
     public function isRelationField()
236 236
     {
237
-        return (bool) $this->relations;
237
+        return (bool)$this->relations;
238 238
     }
239 239
 
240 240
     public function setRelationSearchUrl($url)
Please login to merge, or discard this patch.