Passed
Branch master (ad686c)
by Maxime
05:36
created
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, $field = 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/Scopes/Translatable.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     {
44 44
         $translation = new Translation;
45 45
 
46
-        return $translation->getTable() . '.' . $translation->getIsoColumn();
46
+        return $translation->getTable().'.'.$translation->getIsoColumn();
47 47
     }
48 48
 
49 49
     /**
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     {
56 56
         $translation = new Translation;
57 57
 
58
-        return $translation->getTable() . '.' . $translation->getIdElementColumn();
58
+        return $translation->getTable().'.'.$translation->getIdElementColumn();
59 59
     }
60 60
 
61 61
     /**
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     {
68 68
         $translation = new Translation;
69 69
 
70
-        return $translation->getTable() . '.' . $translation->getModelColumn();
70
+        return $translation->getTable().'.'.$translation->getModelColumn();
71 71
     }
72 72
 
73 73
     /**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     {
80 80
         $translation = new Translation;
81 81
 
82
-        return $translation->getTable() . '.' . $translation->getIdSourceColumn();
82
+        return $translation->getTable().'.'.$translation->getIdSourceColumn();
83 83
     }
84 84
 
85 85
     /**
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             ->where($this->getQualifiedIsoColumn(), '=', $iso)->get();
103 103
 
104 104
         if (!$translation->isEmpty()) {
105
-            $translation->each(function($trans){
105
+            $translation->each(function($trans) {
106 106
                 $trans->delete();
107 107
             });
108 108
         }
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Imports/BaseImport.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     public function model(array $row)
32 32
     {
33 33
         $data = [];
34
-        foreach($this->model->getFillable() as $value)
34
+        foreach ($this->model->getFillable() as $value)
35 35
         {
36 36
             $data[$value] = $row[$value];
37 37
         }
Please login to merge, or discard this patch.
src/Distilleries/Expendable/States/ExportStateTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         $dateStart = !empty($data['range']) && !empty($data['range']['start']) ? $data['range']['start'] : Carbon::now()->format('Y-m-d');
54 54
         $dateEnd = !empty($data['range']) && !empty($data['range']['end']) ? $data['range']['end'] : Carbon::now()->format('Y-m-d');
55 55
         $type = !empty($data['type']) ? $data['type'] : 'csv';
56
-        $filename = str_replace('/', '-', $dateStart . '_' . $dateEnd) . '.' . mb_strtolower($type);
56
+        $filename = str_replace('/', '-', $dateStart.'_'.$dateEnd).'.'.mb_strtolower($type);
57 57
 
58 58
         return (new BaseExport($this->model, $data))->export($filename);
59 59
     }
Please login to merge, or discard this patch.
src/Distilleries/Expendable/Http/Middleware/RedirectIfAuthenticated.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
             $menu = $this->config->get('expendable.menu');
46 46
             $user = $this->auth->user();
47 47
 
48
-            if (method_exists($user, 'getFirstRedirect') && !empty($menu) &&  !empty($menu['left']))
48
+            if (method_exists($user, 'getFirstRedirect') && !empty($menu) && !empty($menu['left']))
49 49
             {
50 50
                 return new RedirectResponse($this->auth->user()->getFirstRedirect($menu['left']));
51 51
             }
Please login to merge, or discard this patch.