Completed
Push — master ( 274f99...dca8df )
by Yaro
01:38
created
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/Jarboe.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -12,22 +12,22 @@
 block discarded – undo
12 12
         $delimiter = CRUD::BASE_URL_DELIMITER;
13 13
         $uri = rtrim($uri, '/');
14 14
 
15
-        Route::get($uri, $controller .'@list');
16
-        Route::post($uri . $delimiter .'search', $controller .'@search');
17
-        Route::post($uri . $delimiter .'search/relation', $controller .'@searchRelation');
18
-        Route::post($uri . $delimiter .'inline', $controller .'@inline');
19
-        Route::get($uri . $delimiter .'reorder/switch', $controller .'@switchSortable');
20
-        Route::post($uri . $delimiter .'reorder/move/{id}', $controller .'@moveItem');
21
-        Route::get($uri . $delimiter .'per-page/{per_page}', $controller .'@perPage');
22
-        Route::get($uri . $delimiter .'order/{column}/{direction}', $controller .'@orderBy');
23
-        Route::get($uri . $delimiter .'create', $controller .'@create');
24
-        Route::post($uri . $delimiter .'create', $controller .'@store');
25
-        Route::get($uri . $delimiter .'{id}', $controller .'@edit');
26
-        Route::post($uri . $delimiter .'{id}', $controller .'@update');
27
-        Route::post($uri . $delimiter .'{id}/delete', $controller .'@delete');
28
-        Route::post($uri . $delimiter .'{id}/restore', $controller .'@restore');
29
-        Route::post($uri . $delimiter .'{id}/force-delete', $controller .'@forceDelete');
30
-        Route::any($uri . $delimiter .'toolbar/{toolbar}', $controller .'@toolbar');
15
+        Route::get($uri, $controller.'@list');
16
+        Route::post($uri.$delimiter.'search', $controller.'@search');
17
+        Route::post($uri.$delimiter.'search/relation', $controller.'@searchRelation');
18
+        Route::post($uri.$delimiter.'inline', $controller.'@inline');
19
+        Route::get($uri.$delimiter.'reorder/switch', $controller.'@switchSortable');
20
+        Route::post($uri.$delimiter.'reorder/move/{id}', $controller.'@moveItem');
21
+        Route::get($uri.$delimiter.'per-page/{per_page}', $controller.'@perPage');
22
+        Route::get($uri.$delimiter.'order/{column}/{direction}', $controller.'@orderBy');
23
+        Route::get($uri.$delimiter.'create', $controller.'@create');
24
+        Route::post($uri.$delimiter.'create', $controller.'@store');
25
+        Route::get($uri.$delimiter.'{id}', $controller.'@edit');
26
+        Route::post($uri.$delimiter.'{id}', $controller.'@update');
27
+        Route::post($uri.$delimiter.'{id}/delete', $controller.'@delete');
28
+        Route::post($uri.$delimiter.'{id}/restore', $controller.'@restore');
29
+        Route::post($uri.$delimiter.'{id}/force-delete', $controller.'@forceDelete');
30
+        Route::any($uri.$delimiter.'toolbar/{toolbar}', $controller.'@toolbar');
31 31
     }
32 32
 
33 33
     public function routeGroupOptions(bool $availableForGuest = false): array
Please login to merge, or discard this patch.
src/Jarboe/Http/Controllers/NavigationController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
         Navigation::create([
29 29
             'name' => $request->get('name'),
30 30
             'slug' => $request->get('slug'),
31
-            'icon' => (string) $request->get('icon'),
32
-            'is_active' => (bool) $request->get('is_active'),
31
+            'icon' => (string)$request->get('icon'),
32
+            'is_active' => (bool)$request->get('is_active'),
33 33
         ])->makeChildOf($root);
34 34
 
35 35
         Navigation::rebuild();
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
         Navigation::find($request->get('id'))->update([
43 43
             'name' => $request->get('name'),
44 44
             'slug' => $request->get('slug'),
45
-            'icon' => (string) $request->get('icon'),
46
-            'is_active' => (bool) $request->get('is_active'),
45
+            'icon' => (string)$request->get('icon'),
46
+            'is_active' => (bool)$request->get('is_active'),
47 47
         ]);
48 48
 
49 49
         return redirect()->back();
Please login to merge, or discard this patch.
src/Jarboe/Http/Controllers/AuthController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public function login(LoginRequest $request)
51 51
     {
52 52
         $credentials = $this->getAuthCredentials($request);
53
-        $shouldRemember = (bool) $request->get('remember');
53
+        $shouldRemember = (bool)$request->get('remember');
54 54
         if (Auth::guard(admin_user_guard())->attempt($credentials, $shouldRemember)) {
55 55
             if ($this->isValidOTP(admin_user(), $request->get('otp'))) {
56 56
                 event(new LoginSuccess(admin_user()));
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
     private function shouldOTP(): bool
130 130
     {
131
-        return (bool) config('jarboe.admin_panel.two_factor_auth.enabled');
131
+        return (bool)config('jarboe.admin_panel.two_factor_auth.enabled');
132 132
     }
133 133
 
134 134
     private function getDataForOTP(): array
Please login to merge, or discard this patch.
src/Jarboe/Http/Requests/Admins/UpdateRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         return [
29 29
             'avatar' => 'mimes:jpeg,bmp,png,gif',
30 30
             'name' => 'required',
31
-            'email' => 'required|email|unique:admins,email,'. $this->route('id'),
31
+            'email' => 'required|email|unique:admins,email,'.$this->route('id'),
32 32
             'password' => 'confirmed',
33 33
         ];
34 34
     }
Please login to merge, or discard this patch.