@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -defined('BASEPATH') OR exit('No direct script access allowed'); |
|
2 | +defined('BASEPATH') or exit('No direct script access allowed'); |
|
3 | 3 | |
4 | 4 | /* |
5 | 5 | | ------------------------------------------------------------------------- |
@@ -6,7 +6,7 @@ |
||
6 | 6 | */ |
7 | 7 | |
8 | 8 | $config['table'] = 'rate_limit'; |
9 | -$config['base_limit'] = 0; // Infinite |
|
9 | +$config['base_limit'] = 0; // Infinite |
|
10 | 10 | $config['header_show'] = TRUE; // Should a rate limit info header be injected? |
11 | 11 | $config['header_prefix'] = 'X-RateLimit-'; |
12 | 12 | $config['whitelist'] = array('127.0.0.1'); // Clients ignored by the limiter |
@@ -1,4 +1,4 @@ |
||
1 | -<?php defined('BASEPATH') OR exit('No direct script access allowed'); |
|
1 | +<?php defined('BASEPATH') or exit('No direct script access allowed'); |
|
2 | 2 | |
3 | 3 | /** |
4 | 4 | * Rate Limiter Configuration |
@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | class UnitTester extends \Codeception\Actor |
20 | 20 | { |
21 | - use _generated\UnitTesterActions; |
|
21 | + use _generated\UnitTesterActions; |
|
22 | 22 | |
23 | 23 | /** |
24 | 24 | * Define custom actions here |
@@ -16,8 +16,7 @@ |
||
16 | 16 | * |
17 | 17 | * @SuppressWarnings(PHPMD) |
18 | 18 | */ |
19 | -class UnitTester extends \Codeception\Actor |
|
20 | -{ |
|
19 | +class UnitTester extends \Codeception\Actor { |
|
21 | 20 | use _generated\UnitTesterActions; |
22 | 21 | |
23 | 22 | /** |
@@ -4,7 +4,6 @@ |
||
4 | 4 | // here you can define custom actions |
5 | 5 | // all public methods declared in helper class will be available in $I |
6 | 6 | |
7 | -class Functional extends \Codeception\Module |
|
8 | -{ |
|
7 | +class Functional extends \Codeception\Module { |
|
9 | 8 | |
10 | 9 | } |
@@ -4,7 +4,6 @@ |
||
4 | 4 | // here you can define custom actions |
5 | 5 | // all public methods declared in helper class will be available in $I |
6 | 6 | |
7 | -class Unit extends \Codeception\Module |
|
8 | -{ |
|
7 | +class Unit extends \Codeception\Module { |
|
9 | 8 | |
10 | 9 | } |
@@ -4,7 +4,6 @@ |
||
4 | 4 | // here you can define custom actions |
5 | 5 | // all public methods declared in helper class will be available in $I |
6 | 6 | |
7 | -class Acceptance extends \Codeception\Module |
|
8 | -{ |
|
7 | +class Acceptance extends \Codeception\Module { |
|
9 | 8 | |
10 | 9 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | class AcceptanceTester extends \Codeception\Actor |
20 | 20 | { |
21 | - use _generated\AcceptanceTesterActions; |
|
21 | + use _generated\AcceptanceTesterActions; |
|
22 | 22 | |
23 | 23 | /** |
24 | 24 | * Define custom actions here |
@@ -16,8 +16,7 @@ |
||
16 | 16 | * |
17 | 17 | * @SuppressWarnings(PHPMD) |
18 | 18 | */ |
19 | -class AcceptanceTester extends \Codeception\Actor |
|
20 | -{ |
|
19 | +class AcceptanceTester extends \Codeception\Actor { |
|
21 | 20 | use _generated\AcceptanceTesterActions; |
22 | 21 | |
23 | 22 | /** |
@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | class FunctionalTester extends \Codeception\Actor |
20 | 20 | { |
21 | - use _generated\FunctionalTesterActions; |
|
21 | + use _generated\FunctionalTesterActions; |
|
22 | 22 | |
23 | 23 | /** |
24 | 24 | * Define custom actions here |
@@ -16,8 +16,7 @@ |
||
16 | 16 | * |
17 | 17 | * @SuppressWarnings(PHPMD) |
18 | 18 | */ |
19 | -class FunctionalTester extends \Codeception\Actor |
|
20 | -{ |
|
19 | +class FunctionalTester extends \Codeception\Actor { |
|
21 | 20 | use _generated\FunctionalTesterActions; |
22 | 21 | |
23 | 22 | /** |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); defined('BASEPATH') or exit('No direct script access allowed'); |
|
1 | +<?php declare(strict_types = 1); defined('BASEPATH') or exit('No direct script access allowed'); |
|
2 | 2 | |
3 | 3 | class MY_Form_validation extends CI_Form_validation { |
4 | 4 | private $user_tables; |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | parent::__construct(); |
8 | 8 | log_message('debug', "MY_Form_validation Class Initialized"); |
9 | 9 | |
10 | - $this->CI =& get_instance(); |
|
10 | + $this->CI = & get_instance(); |
|
11 | 11 | $this->CI->config->load('ion_auth', TRUE); |
12 | 12 | $this->user_tables = $this->CI->config->item('tables', 'ion_auth'); |
13 | 13 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public function isRuleValid(string $ruleName) : bool { |
93 | 93 | $isValid = FALSE; |
94 | - if(is_string($ruleName) && $this->has_rule($ruleName)){ |
|
94 | + if(is_string($ruleName) && $this->has_rule($ruleName)) { |
|
95 | 95 | $isValid = !in_array($ruleName, array_keys($this->error_array()), TRUE); |
96 | 96 | } |
97 | 97 | return $isValid; |
@@ -30,8 +30,7 @@ discard block |
||
30 | 30 | public function valid_password(string $password) : bool { |
31 | 31 | if(!($isValid = $this->min_length($password, $this->CI->config->item('min_password_length', 'ion_auth')))) { |
32 | 32 | $this->set_message('valid_password', 'The password is too short!'); |
33 | - } |
|
34 | - elseif(!($isValid = $this->max_length($password, $this->CI->config->item('max_password_length', 'ion_auth')))) { |
|
33 | + } elseif(!($isValid = $this->max_length($password, $this->CI->config->item('max_password_length', 'ion_auth')))) { |
|
35 | 34 | $this->set_message('valid_password', 'The password is too long!'); |
36 | 35 | } |
37 | 36 | return $isValid; |
@@ -91,7 +90,7 @@ discard block |
||
91 | 90 | */ |
92 | 91 | public function isRuleValid(string $ruleName) : bool { |
93 | 92 | $isValid = FALSE; |
94 | - if(is_string($ruleName) && $this->has_rule($ruleName)){ |
|
93 | + if(is_string($ruleName) && $this->has_rule($ruleName)) { |
|
95 | 94 | $isValid = !in_array($ruleName, array_keys($this->error_array()), TRUE); |
96 | 95 | } |
97 | 96 | return $isValid; |