Passed
Push — master ( d5fc37...fbd322 )
by Antonio Carlos
06:08
created
src/Repositories/DataRepository.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -304,7 +304,7 @@
 block discarded – undo
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));
Please login to merge, or discard this patch.
Spacing   +6 added lines, -8 removed lines patch added patch discarded remove patch
@@ -240,8 +240,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.