@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | Deprecation::notice('1.1', 'Use the "IpAccess.allowed_ips" config setting instead'); |
| 61 | 61 | self::config()->allowed_ips = $this->allowedIps; |
| 62 | 62 | } |
| 63 | - return (array)self::config()->allowed_ips; |
|
| 63 | + return (array) self::config()->allowed_ips; |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /** |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | */ |
| 69 | 69 | public function hasAccess() |
| 70 | 70 | { |
| 71 | - if (!(bool)Config::inst()->get('IpAccess', 'enabled') |
|
| 71 | + if (!(bool) Config::inst()->get('IpAccess', 'enabled') |
|
| 72 | 72 | || empty($this->getAllowedIps()) |
| 73 | 73 | || $this->matchExact() |
| 74 | 74 | || $this->matchRange() |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | */ |
| 112 | 112 | public function matchRange() |
| 113 | 113 | { |
| 114 | - if ($ranges = array_filter($this->getAllowedIps(), function ($ip) { |
|
| 114 | + if ($ranges = array_filter($this->getAllowedIps(), function($ip) { |
|
| 115 | 115 | return strstr($ip, '-'); |
| 116 | 116 | }) |
| 117 | 117 | ) { |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | */ |
| 139 | 139 | public function matchCIDR() |
| 140 | 140 | { |
| 141 | - if ($ranges = array_filter($this->getAllowedIps(), function ($ip) { |
|
| 141 | + if ($ranges = array_filter($this->getAllowedIps(), function($ip) { |
|
| 142 | 142 | return strstr($ip, '/'); |
| 143 | 143 | }) |
| 144 | 144 | ) { |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | */ |
| 163 | 163 | public function matchWildCard() |
| 164 | 164 | { |
| 165 | - if ($ranges = array_filter($this->getAllowedIps(), function ($ip) { |
|
| 165 | + if ($ranges = array_filter($this->getAllowedIps(), function($ip) { |
|
| 166 | 166 | return substr($ip, -1) === '*'; |
| 167 | 167 | }) |
| 168 | 168 | ) { |