Completed
Push — master ( d4da59...bf2e41 )
by Maxime
11s
created
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.
src/Distilleries/Expendable/ExpendableRoutingServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     protected function registerRouter()
15 15
     {
16
-        $this->app['router'] = $this->app->share(function ($app) {
16
+        $this->app['router'] = $this->app->share(function($app) {
17 17
             return new Router($app['events'], $app);
18 18
         });
19 19
     }
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/Helpers/UserUtils.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,9 @@  discard block
 block discarded – undo
11 11
     {
12 12
         $user = Auth::user();
13 13
 
14
-        if (empty($user)) return false;
14
+        if (empty($user)) {
15
+            return false;
16
+        }
15 17
 
16 18
         return Auth::user()->role->initials == '@sa' || Auth::user()->role->initials == '@a';
17 19
     }
@@ -27,7 +29,9 @@  discard block
 block discarded – undo
27 29
     {
28 30
         $user = Auth::user();
29 31
 
30
-        if (empty($user)) return false;
32
+        if (empty($user)) {
33
+            return false;
34
+        }
31 35
 
32 36
         return in_array(Auth::user()->role->initials, self::frontendInitialRole());
33 37
     }
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Http/Middleware/SetDisplayStatus.php 2 patches
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.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 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/Expendable/Http/Controllers/Admin/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()->set('language',$locale);
21
+        session()->set('language', $locale);
22 22
         app()->setLocale($locale);
23 23
         return redirect()->back();
24 24
     }
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.