Completed
Push — master ( 3aa97c...0f0372 )
by Maxime
12s
created
src/Distilleries/Expendable/Http/Middleware/Cache.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@
 block discarded – undo
18 18
         if (config('cache.enabled') === true) {
19 19
             $url = $request->url();
20 20
 
21
-            $key = md5($url . json_encode($request->query()));
22
-            $value = \Cache::remember($key, config('cache.minutes'), function () use ($next, $request) {
21
+            $key = md5($url.json_encode($request->query()));
22
+            $value = \Cache::remember($key, config('cache.minutes'), function() use ($next, $request) {
23 23
                 return $next($request);
24 24
             });
25 25
 
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Http/Middleware/LanguageDetector.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
         preg_match_all('/(\W|^)([a-z]{2})([^a-z]|$)/six', $request->server->get('HTTP_ACCEPT_LANGUAGE'), $m, PREG_PATTERN_ORDER);
29 29
 
30 30
         $user_langs = $m[2];
31
-        if (! empty($user_langs[0])) {
31
+        if (!empty($user_langs[0])) {
32 32
             $total = Language::where('iso', '=', $user_langs[0])->count();
33 33
             if ($total > 0) {
34 34
                 return redirect()->to('/'.$user_langs[0]);
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Fondation/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      */
31 31
     public function storagePath()
32 32
     {
33
-        $path = env('STORAGE_PATH', $this->basePath . DIRECTORY_SEPARATOR . 'storage');
33
+        $path = env('STORAGE_PATH', $this->basePath.DIRECTORY_SEPARATOR.'storage');
34 34
 
35 35
         return $this->storagePath ?: $path;
36 36
     }
Please login to merge, or discard this patch.
src/Distilleries/Expendable/ExpendableRouteServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
         \Route::group([
57 57
             'middleware' => 'web',
58 58
             'namespace'  => $this->namespace,
59
-        ], function ($router) {
59
+        ], function($router) {
60 60
 
61
-            require __DIR__ . '/../routes/web.php';
61
+            require __DIR__.'/../routes/web.php';
62 62
         });
63 63
     }
64 64
 
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
             'middleware' => 'api',
76 76
             'namespace'  => $this->namespace,
77 77
             'prefix'     => 'api',
78
-        ], function ($router) {
79
-            require __DIR__ . '/../routes/api.php';
78
+        ], function($router) {
79
+            require __DIR__.'/../routes/api.php';
80 80
         });
81 81
     }
82 82
 }
Please login to merge, or discard this patch.
Distilleries/Expendable/Http/Middleware/AuthenticateOnceWithBasicAuth.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@
 block discarded – undo
16 16
      */
17 17
     public function handle($request, Closure $next, $guard = null)
18 18
     {
19
-        $ipsAuth = env('BASIC_AUTH_IP','');
20
-        $ipsAuth = explode(',',$ipsAuth);
19
+        $ipsAuth = env('BASIC_AUTH_IP', '');
20
+        $ipsAuth = explode(',', $ipsAuth);
21 21
 
22 22
 
23
-        if (env('BASIC_AUTH',false) == true)
23
+        if (env('BASIC_AUTH', false) == true)
24 24
         {
25
-            if(empty($ipsAuth) || !in_array($request->ip(),$ipsAuth))
25
+            if (empty($ipsAuth) || !in_array($request->ip(), $ipsAuth))
26 26
             {
27 27
                 return $this->auth->guard($guard)->basic() ?: $next($request);
28 28
             }
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Http/Middleware/SetDisplayStatus.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      */
18 18
     public function __construct(Application $app)
19 19
     {
20
-        $this->app        = $app;
20
+        $this->app = $app;
21 21
     }
22 22
 
23 23
     /**
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         if (UserUtils::isBackendRole())
34 34
         {
35 35
             UserUtils::setDisplayAllStatus();
36
-        }else{
36
+        } else {
37 37
             UserUtils::forgotDisplayAllStatus();
38 38
         }
39 39
 
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Http/Middleware/SetterLanguage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@
 block discarded – undo
18 18
     public function handle($request, Closure $next)
19 19
     {
20 20
 
21
-        if($request->session()->has('language')){
22
-            $local = $request->session()->get('language',config('app.locale'));
21
+        if ($request->session()->has('language')) {
22
+            $local = $request->session()->get('language', config('app.locale'));
23 23
             app()->setLocale($local);
24 24
         }
25 25
 
Please login to merge, or discard this patch.
src/Distilleries/routes/web.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 
30 30
 });
31 31
 
32
-$router->group(array('middleware' => ['auth','language']), function() use($router)
32
+$router->group(array('middleware' => ['auth', 'language']), function() use($router)
33 33
 {
34 34
     $router->group(array('middleware' => 'permission', 'prefix' => config('expendable.admin_base_uri')), function() use($router)
35 35
     {
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) || $id === "0") ? $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.