Passed
Push — master ( 86ad47...367093 )
by IRFA
03:54
created
src/Middleware/ApiLockAccount.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     public function handle($request, Closure $next)
22 22
     {
23 23
         if($this->exceptAccount()){
24
-             return $next($request);
24
+                return $next($request);
25 25
         }
26 26
         
27 27
         if ($request->method() == "POST") {
Please login to merge, or discard this patch.
src/Middleware/LockAccount.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     public function handle($request, Closure $next)
24 24
     {
25 25
         if($this->exceptAccount()){
26
-             return $next($request);
26
+                return $next($request);
27 27
         } else{
28 28
         if ($request->method() == "POST") {
29 29
             if (in_array($request->path(), config('irfa.lockout.protected_action_path'))) {
Please login to merge, or discard this patch.
src/Initializing/Variable.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -5,35 +5,35 @@
 block discarded – undo
5 5
 
6 6
 class Variable {
7 7
 
8
-		protected $ip;
9
-	    protected $input=null;
10
-	    protected $dir;
11
-	    protected $path;
12
-	    protected $attemps;
13
-	    protected $except_enabled;
14
-	    protected $except_accounts;
15
-	    protected $permission_code;
8
+        protected $ip;
9
+        protected $input=null;
10
+        protected $dir;
11
+        protected $path;
12
+        protected $attemps;
13
+        protected $except_enabled;
14
+        protected $except_accounts;
15
+        protected $permission_code;
16 16
 
17
-	    /**
18
-		 * Initializing variable.
19
-		 *
20
-		 * @return void
21
-		 */
22
-		protected function initVar(){
23
-			// if(!empty(config('irfa.lockout'))){
24
-		        $this->ip = Request::ip();
25
-		        $this->input = Request::input(config('irfa.lockout.input_name'));
26
-		        $this->dir = config('irfa.lockout.lockout_file_path');
27
-		        $this->attemps = config('irfa.lockout.login_attemps');
28
-		        $this->except_enabled = config('irfa.lockout.enable_except_account');
29
-		        $this->except_accounts = config('irfa.lockout.except_account');
30
-		        $this->path = $this->dir.md5($this->input);
31
-		    // }
32
-    	}
17
+        /**
18
+         * Initializing variable.
19
+         *
20
+         * @return void
21
+         */
22
+        protected function initVar(){
23
+            // if(!empty(config('irfa.lockout'))){
24
+                $this->ip = Request::ip();
25
+                $this->input = Request::input(config('irfa.lockout.input_name'));
26
+                $this->dir = config('irfa.lockout.lockout_file_path');
27
+                $this->attemps = config('irfa.lockout.login_attemps');
28
+                $this->except_enabled = config('irfa.lockout.enable_except_account');
29
+                $this->except_accounts = config('irfa.lockout.except_account');
30
+                $this->path = $this->dir.md5($this->input);
31
+            // }
32
+        }
33 33
 
34
-    	protected function setPath($username){
35
-    		$this->path = $this->dir.md5($username);
36
-    		$this->input = $username;
37
-    	}
34
+        protected function setPath($username){
35
+            $this->path = $this->dir.md5($username);
36
+            $this->input = $username;
37
+        }
38 38
 	
39
-	}
40 39
\ No newline at end of file
40
+    }
41 41
\ No newline at end of file
Please login to merge, or discard this patch.
src/Func/Core.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@  discard block
 block discarded – undo
17 17
     protected function exceptAccount(){
18 18
         $this->initVar();
19 19
         if($this->except_enabled){
20
-          if(in_array($this->input, $this->except_accounts)){
20
+            if(in_array($this->input, $this->except_accounts)){
21 21
             return true;
22
-          } else{
22
+            } else{
23 23
             return false;
24
-          }
24
+            }
25 25
         } else{
26
-         return false;
26
+            return false;
27 27
         }
28 28
     }
29 29
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      * @return void
75 75
      */
76 76
     protected function eventCleanLockoutAccount() {
77
-       $this->initVar();
77
+        $this->initVar();
78 78
         $this->unlock_account($this->input);
79 79
           
80 80
     }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      * @return boolean
134 134
      */
135 135
     protected function lockLogin($username = null){
136
-         $this->initVar();
136
+            $this->initVar();
137 137
         if(php_sapi_name() == "cli" AND $username != null){
138 138
             $this->setPath($username);
139 139
         }
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
          * @return boolean
162 162
          */
163 163
     private function checkIp($ip_list,$ip){
164
-       $this->initVar();
164
+        $this->initVar();
165 165
         if(collect($ip_list)->contains($ip)){
166 166
             return true;
167 167
         } else{
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
          * @return boolean
177 177
          */
178 178
     public function clear_all(){
179
-       $this->initVar();
179
+        $this->initVar();
180 180
         $file = new Filesystem();
181 181
         if($file->cleanDirectory($this->path)){
182 182
         return true;
Please login to merge, or discard this patch.
src/Listeners/LockoutAccount.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
         $this->logging();
32 32
         if(!$this->exceptAccount()){
33 33
 
34
-           $this->eventFailedLogin();
34
+            $this->eventFailedLogin();
35 35
            
36 36
         }
37 37
 
Please login to merge, or discard this patch.