Passed
Branch master (ffb5df)
by Michele
03:52
created
src/Middleware/WebArtisanEnabled.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     public function handle($request, Closure $next)
37 37
     {
38 38
         $response = $next($request);
39
-        if ($response instanceof Response and $this->webartisan->isEnabled() and $request->url() != asset(config('webartisan.route_prefix').'/run')) {
39
+        if ($response instanceof Response and $this->webartisan->isEnabled() and $request->url() != asset(config('webartisan.route_prefix') . '/run')) {
40 40
             try {
41 41
                 $response->getContent();
42 42
             }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                 return $response;
45 45
             }
46 46
 
47
-            if(!$this->webartisan->useAuthentication()
47
+            if (!$this->webartisan->useAuthentication()
48 48
                 or ($this->webartisan->useAuthentication()
49 49
                     and $request->session()->has('webartisan__authenticated'))) {
50 50
 
Please login to merge, or discard this patch.
src/Controllers/WebArtisanCommandController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,14 +27,14 @@
 block discarded – undo
27 27
             ? $request->get('command')
28 28
             : null;
29 29
 
30
-        if($this->command) {
30
+        if ($this->command) {
31 31
             $commandPrepared = $this->prepareCommand($this->command);
32
-            if(!config('webartisan.use_authentication')
32
+            if (!config('webartisan.use_authentication')
33 33
                 or (config('webartisan.use_authentication') and $this->webartisan->isAuthenticated())) {
34 34
                     try {
35 35
                         Artisan::call($commandPrepared);
36 36
                     }
37
-                    catch(\Exception $e) {
37
+                    catch (\Exception $e) {
38 38
                         return $this->prepareResultToHtml($e->getMessage(), 'error');
39 39
                     }
40 40
             }
Please login to merge, or discard this patch.
src/Controllers/WebArtisanAuthController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,12 +38,12 @@
 block discarded – undo
38 38
             ? $request->get('password')
39 39
             : null;
40 40
 
41
-        if($this->username and $this->password) {
41
+        if ($this->username and $this->password) {
42 42
             $authenticated = true;
43
-            if($this->username != config('webartisan.auth.username')) $authenticated = false;
44
-            if($this->password != config('webartisan.auth.password')) $authenticated = false;
43
+            if ($this->username != config('webartisan.auth.username')) $authenticated = false;
44
+            if ($this->password != config('webartisan.auth.password')) $authenticated = false;
45 45
 
46
-            if($authenticated) {
46
+            if ($authenticated) {
47 47
                 $request->session()->put('webartisan__authenticated', true);
48 48
                 return $this->prepareResultToHtml("Welcome", 'success');
49 49
             }
Please login to merge, or discard this patch.