@@ -304,7 +304,7 @@ |
||
304 | 304 | * @param $ip |
305 | 305 | * |
306 | 306 | * @return void |
307 | - */ |
|
307 | + */ |
|
308 | 308 | public function cacheForget($ip) |
309 | 309 | { |
310 | 310 | $this->cache->forget($this->cacheKey($ip)); |
@@ -240,8 +240,7 @@ discard block |
||
240 | 240 | public function addToProperList($whitelist, $ip) |
241 | 241 | { |
242 | 242 | $this->config->get('use_database') ? |
243 | - $this->addToDatabaseList($whitelist, $ip) : |
|
244 | - $this->addToArrayList($whitelist, $ip); |
|
243 | + $this->addToDatabaseList($whitelist, $ip) : $this->addToArrayList($whitelist, $ip); |
|
245 | 244 | } |
246 | 245 | |
247 | 246 | /** |
@@ -254,8 +253,7 @@ discard block |
||
254 | 253 | public function delete($ipAddress) |
255 | 254 | { |
256 | 255 | $this->config->get('use_database') ? |
257 | - $this->removeFromDatabaseList($ipAddress) : |
|
258 | - $this->removeFromArrayList($ipAddress); |
|
256 | + $this->removeFromDatabaseList($ipAddress) : $this->removeFromArrayList($ipAddress); |
|
259 | 257 | } |
260 | 258 | |
261 | 259 | /** |
@@ -364,7 +362,7 @@ discard block |
||
364 | 362 | { |
365 | 363 | $country = $this->makeCountryFromString($country); |
366 | 364 | |
367 | - return $this->all()->filter(function ($item) use ($country) { |
|
365 | + return $this->all()->filter(function($item) use ($country) { |
|
368 | 366 | return $item['ip_address'] == $country || |
369 | 367 | $this->makeCountryFromString($this->getCountryFromIp($item['ip_address'])) == $country; |
370 | 368 | }); |
@@ -430,13 +428,13 @@ discard block |
||
430 | 428 | private function getNonDatabaseIps() |
431 | 429 | { |
432 | 430 | return array_merge_recursive( |
433 | - array_map(function ($ip) { |
|
431 | + array_map(function($ip) { |
|
434 | 432 | $ip['whitelisted'] = true; |
435 | 433 | |
436 | 434 | return $ip; |
437 | 435 | }, $this->formatIpArray($this->config->get('whitelist'))), |
438 | 436 | |
439 | - array_map(function ($ip) { |
|
437 | + array_map(function($ip) { |
|
440 | 438 | $ip['whitelisted'] = false; |
441 | 439 | |
442 | 440 | return $ip; |
@@ -555,7 +553,7 @@ discard block |
||
555 | 553 | */ |
556 | 554 | private function formatIpArray($list) |
557 | 555 | { |
558 | - return array_map(function ($ip) { |
|
556 | + return array_map(function($ip) { |
|
559 | 557 | return ['ip_address' => $ip]; |
560 | 558 | }, $this->makeArrayOfIps($list)); |
561 | 559 | } |