Completed
Push — master ( 31684b...2154d6 )
by Maxime
02:33
created
src/Distilleries/Expendable/ExpendableServiceProvider.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -30,22 +30,22 @@  discard block
 block discarded – undo
30 30
     public function boot()
31 31
     {
32 32
 
33
-        $this->loadViewsFrom(__DIR__ . '/../../views', 'expendable');
34
-        $this->loadTranslationsFrom(__DIR__ . '/../../lang', 'expendable');
35
-        $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations/');
33
+        $this->loadViewsFrom(__DIR__.'/../../views', 'expendable');
34
+        $this->loadTranslationsFrom(__DIR__.'/../../lang', 'expendable');
35
+        $this->loadMigrationsFrom(__DIR__.'/../../database/migrations/');
36 36
 
37 37
 
38 38
         $this->publishes([
39
-            __DIR__ . '/../../config/config.php'    => config_path('expendable.php'),
40
-            __DIR__ . '/../../database/seeds/'      => base_path('/database/seeds'),
39
+            __DIR__.'/../../config/config.php'    => config_path('expendable.php'),
40
+            __DIR__.'/../../database/seeds/'      => base_path('/database/seeds'),
41 41
         ]);
42 42
 
43 43
 
44 44
         $this->publishes([
45
-            __DIR__ . '/../../views' => base_path('resources/views/vendor/expendable'),
45
+            __DIR__.'/../../views' => base_path('resources/views/vendor/expendable'),
46 46
         ], 'views');
47 47
         $this->mergeConfigFrom(
48
-            __DIR__ . '/../../config/config.php', 'expendable'
48
+            __DIR__.'/../../config/config.php', 'expendable'
49 49
         );
50 50
 
51 51
         $autoLoaderListener = new \Distilleries\Expendable\Register\ListenerAutoLoader(config('expendable.listener'));
@@ -128,13 +128,13 @@  discard block
 block discarded – undo
128 128
     protected function registerCommands()
129 129
     {
130 130
         $file  = app('files');
131
-        $files = $file->allFiles(__DIR__ . '/Console/');
131
+        $files = $file->allFiles(__DIR__.'/Console/');
132 132
 
133 133
         foreach ($files as $file)
134 134
         {
135 135
             if (strpos($file->getPathName(), 'Lib') === false)
136 136
             {
137
-                $this->commands('Distilleries\Expendable\Console\\' . preg_replace('/\.php/i', '', $file->getFilename()));
137
+                $this->commands('Distilleries\Expendable\Console\\'.preg_replace('/\.php/i', '', $file->getFilename()));
138 138
             }
139 139
         }
140 140
     }
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Http/Forms/Role/RoleForm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@
 block discarded – undo
41 41
 
42 42
     protected function getUpdateRules()
43 43
     {
44
-        $key                           = \Request::get($this->model->getKeyName());
45
-        static::$rules_update['initials'] = 'required|unique:roles,initials' . $key;
44
+        $key = \Request::get($this->model->getKeyName());
45
+        static::$rules_update['initials'] = 'required|unique:roles,initials'.$key;
46 46
 
47 47
         return parent::getUpdateRules();
48 48
     }
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Http/Forms/User/UserForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
     protected function getUpdateRules()
78 78
     {
79 79
         $key                           = \Request::get($this->model->getKeyName());
80
-        static::$rules_update['email'] = 'required|email|unique:users,email,' . $key;
80
+        static::$rules_update['email'] = 'required|email|unique:users,email,'.$key;
81 81
 
82 82
         return parent::getUpdateRules();
83 83
     }
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Http/Forms/Component/ComponentForm.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
     {
47 47
         $allModels = [
48 48
             [
49
-                'path'      => app_path() . DIRECTORY_SEPARATOR,
49
+                'path'      => app_path().DIRECTORY_SEPARATOR,
50 50
                 'namespace' => '{{app}}',
51 51
             ],
52 52
             [
53
-                'path'      => __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'Models' . DIRECTORY_SEPARATOR,
53
+                'path'      => __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'Models'.DIRECTORY_SEPARATOR,
54 54
                 'namespace' => 'Distilleries\\Expendable\\Models\\',
55 55
             ],
56 56
         ];
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             {
64 64
                 $choice                               = explode('/', $model);
65 65
                 $model                                = preg_replace('/.php/i', '', last($choice));
66
-                $choices[$config['namespace'] . $model] = $model;
66
+                $choices[$config['namespace'].$model] = $model;
67 67
             }
68 68
         }
69 69
 
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Http/Forms/Language/LanguageForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     protected function getUpdateRules()
45 45
     {
46 46
         $key                  = \Request::get($this->model->getKeyName());
47
-        static::$rules['iso'] = 'required|unique:languages,iso,' . $key;
47
+        static::$rules['iso'] = 'required|unique:languages,iso,'.$key;
48 48
 
49 49
         return parent::getUpdateRules();
50 50
     }
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Http/Datatables/BaseDatatable.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,15 +10,15 @@
 block discarded – undo
10 10
     // ------------------------------------------------------------------------------------------------
11 11
     public function addTranslationAction($template = 'expendable::admin.form.components.datatable.translations', $route = '')
12 12
     {
13
-        $this->add('translation', function ($model) use ($template, $route) {
13
+        $this->add('translation', function($model) use ($template, $route) {
14 14
 
15 15
             $languages    = Language::withoutCurrentLanguage()->get();
16
-            $translations = Translation::byElement($model)->pluck('id_element','iso')->toArray();
16
+            $translations = Translation::byElement($model)->pluck('id_element', 'iso')->toArray();
17 17
             return view($template, array(
18 18
                 'languages'    => $languages,
19 19
                 'translations' => $translations,
20 20
                 'data'         => $model->toArray(),
21
-                'route'        => !empty($route) ? $route . '@' : $this->getControllerNameForAction() . '@'
21
+                'route'        => !empty($route) ? $route.'@' : $this->getControllerNameForAction().'@'
22 22
             ))->render();
23 23
         });
24 24
 
Please login to merge, or discard this patch.
Distilleries/Expendable/Http/Controllers/Backend/PermissionController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function getIndex()
28 28
     {
29
-        return redirect()->to(action('\\' . get_class($this) . '@getEdit'));
29
+        return redirect()->to(action('\\'.get_class($this).'@getEdit'));
30 30
     }
31 31
 
32 32
     // ------------------------------------------------------------------------------------------------
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         }
59 59
 
60 60
 
61
-        return redirect()->to(action('\\' . get_class($this) . '@getIndex'));
61
+        return redirect()->to(action('\\'.get_class($this).'@getIndex'));
62 62
 
63 63
     }
64 64
 }
65 65
\ No newline at end of file
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Http/Controllers/Backend/LanguageController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
     public function getChangeLang($locale = null)
20 20
     {
21
-        session()->put('language',$locale);
21
+        session()->put('language', $locale);
22 22
         app()->setLocale($locale);
23 23
         return redirect()->back();
24 24
     }
Please login to merge, or discard this patch.
Distilleries/Expendable/Http/Controllers/Backend/ComponentController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
     public function getIndex()
30 30
     {
31
-        return redirect()->to(action('\\' . get_class($this) . '@getEdit'));
31
+        return redirect()->to(action('\\'.get_class($this).'@getEdit'));
32 32
     }
33 33
 
34 34
 
@@ -70,9 +70,9 @@  discard block
 block discarded – undo
70 70
         }
71 71
 
72 72
         $libelle            = $request->get('libelle');
73
-        $libelle_form       = $libelle . 'Form';
74
-        $libelle_datatable  = $libelle . 'Datatable';
75
-        $libelle_controller = $libelle . 'Controller';
73
+        $libelle_form       = $libelle.'Form';
74
+        $libelle_datatable  = $libelle.'Datatable';
75
+        $libelle_controller = $libelle.'Controller';
76 76
         $model              = $request->get('models');
77 77
         $states             = $request->get('state');
78 78
 
@@ -82,14 +82,14 @@  discard block
 block discarded – undo
82 82
             {
83 83
                 $this->artisan->call('datatable:make', [
84 84
                     '--fields' => $request->get('colon_datatable'),
85
-                    'name'     => 'Http/Datatables/' . $libelle_datatable
85
+                    'name'     => 'Http/Datatables/'.$libelle_datatable
86 86
                 ]);
87 87
             } else if (strpos($state, 'FormStateContract') !== false)
88 88
             {
89 89
 
90 90
                 $this->artisan->call('make:form', [
91 91
                     '--fields' => $request->get('fields_form'),
92
-                    'name'     => 'Http/Forms/' . $libelle_form
92
+                    'name'     => 'Http/Forms/'.$libelle_form
93 93
                 ]);
94 94
             }
95 95
         }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             '--model'     => $model,
100 100
             '--datatable' => $libelle_datatable,
101 101
             '--form'      => $libelle_form,
102
-            'name'        => 'Http/Controllers/Admin/' . $libelle_controller
102
+            'name'        => 'Http/Controllers/Admin/'.$libelle_controller
103 103
         ]);
104 104
 
105 105
         return redirect()->back()->with(Message::MESSAGE, [trans('expendable::success.generated')]);
Please login to merge, or discard this patch.