Completed
Push — master ( f4bae8...0600bf )
by Martijn van
02:35
created
code/model/IpAccess.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
68 68
      */
69 69
     public function hasAccess()
70 70
     {
71
-        return (!(bool)Config::inst()->get('IpAccess', 'enabled')
71
+        return (!(bool) Config::inst()->get('IpAccess', 'enabled')
72 72
             || empty($this->getAllowedIps())
73 73
             || $this->matchExact()
74 74
             || $this->matchRange()
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     public function matchRange()
108 108
     {
109
-        if ($ranges = array_filter($this->getAllowedIps(), function ($ip) {
109
+        if ($ranges = array_filter($this->getAllowedIps(), function($ip) {
110 110
             return strstr($ip, '-');
111 111
         })
112 112
         ) {
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public function matchCIDR()
135 135
     {
136
-        if ($ranges = array_filter($this->getAllowedIps(), function ($ip) {
136
+        if ($ranges = array_filter($this->getAllowedIps(), function($ip) {
137 137
             return strstr($ip, '/');
138 138
         })
139 139
         ) {
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      */
158 158
     public function matchWildCard()
159 159
     {
160
-        if ($ranges = array_filter($this->getAllowedIps(), function ($ip) {
160
+        if ($ranges = array_filter($this->getAllowedIps(), function($ip) {
161 161
             return substr($ip, -1) === '*';
162 162
         })
163 163
         ) {
Please login to merge, or discard this patch.