@@ -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 isEnabled() |
70 | 70 | { |
71 | - return (bool)Config::inst()->get('IpAccess', 'enabled'); |
|
71 | + return (bool) Config::inst()->get('IpAccess', 'enabled'); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | */ |
77 | 77 | public function hasAccess() |
78 | 78 | { |
79 | - if (!$this->isEnabled() || !(bool)$this->getAllowedIps()) { |
|
79 | + if (!$this->isEnabled() || !(bool) $this->getAllowedIps()) { |
|
80 | 80 | return true; |
81 | 81 | } |
82 | 82 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | public function matchRange() |
114 | 114 | { |
115 | - $ranges = array_filter($this->getAllowedIps(), function ($ip) { |
|
115 | + $ranges = array_filter($this->getAllowedIps(), function($ip) { |
|
116 | 116 | return strstr($ip, '-'); |
117 | 117 | }); |
118 | 118 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | */ |
138 | 138 | public function matchCIDR() |
139 | 139 | { |
140 | - $ranges = array_filter($this->getAllowedIps(), function ($ip) { |
|
140 | + $ranges = array_filter($this->getAllowedIps(), function($ip) { |
|
141 | 141 | return strstr($ip, '/'); |
142 | 142 | }); |
143 | 143 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | */ |
160 | 160 | public function matchWildCard() |
161 | 161 | { |
162 | - $ranges = array_filter($this->getAllowedIps(), function ($ip) { |
|
162 | + $ranges = array_filter($this->getAllowedIps(), function($ip) { |
|
163 | 163 | return substr($ip, -1) === '*'; |
164 | 164 | }); |
165 | 165 |