Completed
Push — master ( d4da59...bf2e41 )
by Maxime
11s
created
Distilleries/Expendable/Http/Controllers/Admin/Base/ModelBaseController.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -96,6 +96,10 @@
 block discarded – undo
96 96
         ];
97 97
     }
98 98
 
99
+    /**
100
+     * @param string $key
101
+     * @param null|integer $default_value
102
+     */
99 103
     protected function getParams(Request $request, $key, $default_value)
100 104
     {
101 105
         $element = $request->get($key);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         $data = $this->model->where($this->model->getKeyName(), $request->get('id'))->get()->last();
39 39
         $data->delete();
40 40
 
41
-        return redirect()->to(action('\\' . get_class($this) . '@getIndex'));
41
+        return redirect()->to(action('\\'.get_class($this).'@getIndex'));
42 42
     }
43 43
 
44 44
     // ------------------------------------------------------------------------------------------------
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Listeners/UserListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     {
36 36
 
37 37
 
38
-        if($model->email != ''){
38
+        if ($model->email != '') {
39 39
             $model->unlock();
40 40
         }
41 41
 
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Http/Controllers/Admin/UserController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     }
54 54
 
55 55
 
56
-    public function postUnLock(Request $request){
56
+    public function postUnLock(Request $request) {
57 57
 
58 58
         $model = $this->model->findOrFail($request->get('id'));
59 59
         $model->nb_of_try = 0;
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     }
64 64
 
65 65
 
66
-    public function postLock(Request $request){
66
+    public function postLock(Request $request) {
67 67
 
68 68
         $model = $this->model->findOrFail($request->get('id'));
69 69
         $model->nb_of_try = config('expendable.auth.nb_of_try');
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Scopes/StatusScope.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Illuminate\Database\Eloquent\Scope;
6 6
 use Illuminate\Database\Eloquent\Model;
7 7
 
8
-class StatusScope implements Scope{
8
+class StatusScope implements Scope {
9 9
 
10 10
     /**
11 11
      * All of the extensions to be added to the builder.
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Http/Controllers/Admin/Base/BaseController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
         $this->layoutManager->initStaticPart(function($layoutManager)
50 50
         {
51 51
 
52
-            $menu_top  = $layoutManager->getView()->make('expendable::admin.menu.top',[
52
+            $menu_top  = $layoutManager->getView()->make('expendable::admin.menu.top', [
53 53
                 'languages'=>Language::all()
54 54
             ]);
55 55
             $menu_left = $layoutManager->getView()->make('expendable::admin.menu.left');
Please login to merge, or discard this patch.
src/config/config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
     'login_uri'           => 'admin/login',
5 5
     'logout_action'       => 'Distilleries\Expendable\Http\Controllers\Admin\LoginController@getLogout',
6 6
     'admin_base_uri'      => 'admin',
7
-    'config_file_assets'  => base_path() . '/package.json',
7
+    'config_file_assets'  => base_path().'/package.json',
8 8
     'folder_whitelist'    => [
9 9
         'moximanager'
10 10
     ],
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Scopes/TranslatableScope.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,10 +31,10 @@  discard block
 block discarded – undo
31 31
             $iso = app()->getLocale();
32 32
         }
33 33
 
34
-        $builder->whereExists(function ($query) use ($model, $iso) {
34
+        $builder->whereExists(function($query) use ($model, $iso) {
35 35
             $query->select(\DB::raw(1))
36 36
                 ->from($model->getQualifiedTable())
37
-                ->whereRaw($model->getTable() . '.' . $model->getKeyName() . ' = ' . $model->getQualifiedIdElementColumn())
37
+                ->whereRaw($model->getTable().'.'.$model->getKeyName().' = '.$model->getQualifiedIdElementColumn())
38 38
                 ->where($model->getQualifiedIsoColumn(), $iso)
39 39
                 ->where($model->getQualifiedModelColumn(), $model->getTable());
40 40
         });
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     protected function addWithoutTranslation(Builder $builder)
68 68
     {
69
-        $builder->macro('withoutTranslation', function (Builder $builder) {
69
+        $builder->macro('withoutTranslation', function(Builder $builder) {
70 70
             return $builder->withoutGlobalScope($this);
71 71
         });
72 72
     }
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Scopes/Translatable.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     {
38 38
         $translation = new Translation;
39 39
 
40
-        return $translation->getTable() . '.' . $translation->getIsoColumn();
40
+        return $translation->getTable().'.'.$translation->getIsoColumn();
41 41
     }
42 42
 
43 43
     /**
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     {
50 50
         $translation = new Translation;
51 51
 
52
-        return $translation->getTable() . '.' . $translation->getIdElementColumn();
52
+        return $translation->getTable().'.'.$translation->getIdElementColumn();
53 53
     }
54 54
 
55 55
     /**
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     {
62 62
         $translation = new Translation;
63 63
 
64
-        return $translation->getTable() . '.' . $translation->getModelColumn();
64
+        return $translation->getTable().'.'.$translation->getModelColumn();
65 65
     }
66 66
 
67 67
     /**
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     {
74 74
         $translation = new Translation;
75 75
 
76
-        return $translation->getTable() . '.' . $translation->getIdSourceColumn();
76
+        return $translation->getTable().'.'.$translation->getIdSourceColumn();
77 77
     }
78 78
 
79 79
     /**
Please login to merge, or discard this patch.
src/Distilleries/Expendable/States/FormStateTrait.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
         $id_element = $this->model->hasBeenTranslated($this->model->getTable(), $id, $iso);
79 79
         if (!empty($id_element)) {
80
-            return redirect()->to(action($this->getControllerNameForAction() . '@getEdit', $id_element));
80
+            return redirect()->to(action($this->getControllerNameForAction().'@getEdit', $id_element));
81 81
         }
82 82
 
83 83
         $model = (!empty($id)) ? $this->model->withoutTranslation()->findOrFail($id) : $this->model;
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             return $result;
134 134
         }
135 135
 
136
-        return redirect()->to(action($this->getControllerNameForAction() . '@getIndex'));
136
+        return redirect()->to(action($this->getControllerNameForAction().'@getIndex'));
137 137
     }
138 138
 
139 139
     // ------------------------------------------------------------------------------------------------
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
             return $result;
168 168
         }
169 169
 
170
-        return redirect()->to(action($this->getControllerNameForAction() . '@getIndex'));
170
+        return redirect()->to(action($this->getControllerNameForAction().'@getIndex'));
171 171
 
172 172
     }
173 173
 
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
         $form_content = view('form-builder::form.components.formgenerator.info', [
231 231
             'form'  => $form,
232 232
             'id'    => $id,
233
-            'route' => $this->getControllerNameForAction() . '@',
233
+            'route' => $this->getControllerNameForAction().'@',
234 234
         ]);
235 235
 
236 236
         $this->layoutManager->add([
@@ -250,6 +250,6 @@  discard block
 block discarded – undo
250 250
 
251 251
         $action = explode('@', \Route::currentRouteAction());
252 252
 
253
-        return '\\' . $action[0];
253
+        return '\\'.$action[0];
254 254
     }
255 255
 }
256 256
\ No newline at end of file
Please login to merge, or discard this patch.