@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | use File; |
7 | 7 | |
8 | 8 | class Testing extends Core { |
9 | - public function testWriteEventFailedLogin($username){ |
|
9 | + public function testWriteEventFailedLogin($username) { |
|
10 | 10 | |
11 | 11 | $this->eventFailedLogin($username); |
12 | 12 | |
@@ -14,53 +14,53 @@ discard block |
||
14 | 14 | $dir = config('irfa.lockout.lockout_file_path'); |
15 | 15 | $path = $dir.md5($input); |
16 | 16 | |
17 | - if(File::exists($path)) |
|
17 | + if (File::exists($path)) |
|
18 | 18 | { |
19 | 19 | return true; |
20 | 20 | } |
21 | 21 | return false; |
22 | 22 | } |
23 | - public function testWritable($username){ |
|
23 | + public function testWritable($username) { |
|
24 | 24 | $input = $username; |
25 | 25 | $dir = config('irfa.lockout.lockout_file_path'); |
26 | 26 | $path = $dir.md5($input); |
27 | 27 | |
28 | - if(is_writable($path)) |
|
28 | + if (is_writable($path)) |
|
29 | 29 | { |
30 | 30 | return true; |
31 | 31 | } |
32 | 32 | return false; |
33 | 33 | } |
34 | 34 | |
35 | - public function testManualLocking($username){ |
|
35 | + public function testManualLocking($username) { |
|
36 | 36 | $input = $username; |
37 | 37 | $dir = config('irfa.lockout.lockout_file_path'); |
38 | 38 | $path = $dir.md5($input); |
39 | 39 | |
40 | - if($this->lock_account($username)) |
|
40 | + if ($this->lock_account($username)) |
|
41 | 41 | { |
42 | 42 | return true; |
43 | 43 | } |
44 | 44 | return false; |
45 | 45 | } |
46 | 46 | |
47 | - public function testUnlocking($username){ |
|
47 | + public function testUnlocking($username) { |
|
48 | 48 | $input = $username; |
49 | 49 | $dir = config('irfa.lockout.lockout_file_path'); |
50 | 50 | $path = $dir.md5($input); |
51 | - $unlock = $this->test_unlock_account($username); |
|
52 | - if($unlock) |
|
51 | + $unlock = $this->test_unlock_account($username); |
|
52 | + if ($unlock) |
|
53 | 53 | { |
54 | 54 | return true; |
55 | 55 | } |
56 | 56 | return false; |
57 | 57 | } |
58 | - public function testLockLogin($username){ |
|
58 | + public function testLockLogin($username) { |
|
59 | 59 | $input = $username; |
60 | 60 | $dir = config('irfa.lockout.lockout_file_path'); |
61 | 61 | $path = $dir.md5($input); |
62 | - $unlock = $this->lockLogin($username); |
|
63 | - if($unlock) |
|
62 | + $unlock = $this->lockLogin($username); |
|
63 | + if ($unlock) |
|
64 | 64 | { |
65 | 65 | return true; |
66 | 66 | } |
@@ -39,13 +39,13 @@ |
||
39 | 39 | \Illuminate\Auth\Events\Authenticated::class, |
40 | 40 | CleanLockoutAccount::class |
41 | 41 | ); |
42 | - if(in_array('api', config('irfa.lockout.protected_middleware_group'))){ |
|
42 | + if (in_array('api', config('irfa.lockout.protected_middleware_group'))) { |
|
43 | 43 | $router->pushMiddlewareToGroup('api', \Irfa\Lockout\Middleware\ApiLockAccount::class); |
44 | 44 | } |
45 | - if(in_array('web', config('irfa.lockout.protected_middleware_group'))){ |
|
45 | + if (in_array('web', config('irfa.lockout.protected_middleware_group'))) { |
|
46 | 46 | $router->pushMiddlewareToGroup('web', \Irfa\Lockout\Middleware\LockAccount::class); |
47 | 47 | } |
48 | - if(in_array(null, config('irfa.lockout.protected_middleware_group'))){ |
|
48 | + if (in_array(null, config('irfa.lockout.protected_middleware_group'))) { |
|
49 | 49 | $router->pushMiddlewareToGroup('web', \Irfa\Lockout\Middleware\LockAccount::class); |
50 | 50 | } |
51 | 51 |