Passed
Push — master ( 47d82d...fb5b6d )
by Antonio Carlos
02:29
created
src/Repositories/DataRepository.php 1 patch
Spacing   +6 added lines, -8 removed lines patch added patch discarded remove patch
@@ -237,8 +237,7 @@  discard block
 block discarded – undo
237 237
     public function addToProperList($whitelist, $ip)
238 238
     {
239 239
         $this->config->get('use_database') ?
240
-            $this->addToDatabaseList($whitelist, $ip) :
241
-            $this->addToArrayList($whitelist, $ip);
240
+            $this->addToDatabaseList($whitelist, $ip) : $this->addToArrayList($whitelist, $ip);
242 241
     }
243 242
 
244 243
     /**
@@ -250,8 +249,7 @@  discard block
 block discarded – undo
250 249
     public function delete($ipAddress)
251 250
     {
252 251
         $this->config->get('use_database') ?
253
-            $this->removeFromDatabaseList($ipAddress) :
254
-            $this->removeFromArrayList($ipAddress);
252
+            $this->removeFromDatabaseList($ipAddress) : $this->removeFromArrayList($ipAddress);
255 253
     }
256 254
 
257 255
     public function cacheKey($ip)
@@ -325,7 +323,7 @@  discard block
 block discarded – undo
325 323
     {
326 324
         $country = $this->makeCountryFromString($country);
327 325
 
328
-        return $this->all()->filter(function ($item) use ($country) {
326
+        return $this->all()->filter(function($item) use ($country) {
329 327
             return $item['ip_address'] == $country ||
330 328
                 $this->makeCountryFromString($this->getCountryFromIp($item['ip_address'])) == $country;
331 329
         });
@@ -375,13 +373,13 @@  discard block
 block discarded – undo
375 373
     private function getNonDatabaseIps()
376 374
     {
377 375
         return array_merge_recursive(
378
-            array_map(function ($ip) {
376
+            array_map(function($ip) {
379 377
                 $ip['whitelisted'] = true;
380 378
 
381 379
                 return $ip;
382 380
             }, $this->formatIpArray($this->config->get('whitelist'))),
383 381
 
384
-            array_map(function ($ip) {
382
+            array_map(function($ip) {
385 383
                 $ip['whitelisted'] = false;
386 384
 
387 385
                 return $ip;
@@ -497,7 +495,7 @@  discard block
 block discarded – undo
497 495
      */
498 496
     private function formatIpArray($list)
499 497
     {
500
-        return array_map(function ($ip) {
498
+        return array_map(function($ip) {
501 499
             return ['ip_address' => $ip];
502 500
         }, $this->makeArrayOfIps($list));
503 501
     }
Please login to merge, or discard this patch.