Completed
Push — master ( 6f4b0c...c09e9f )
by Clinton
16s
created
src/RedisQ.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,9 @@  discard block
 block discarded – undo
52 52
         if ($redis->set($wQueueID, true, Array('nx', 'ex'=>15)) === false) {
53 53
             $redis->incr("redisQ:queueID:429count:$ip");
54 54
             $redis->expire("redisQ:queueID:429count:$ip", 300);
55
-            if ($redis->get("redisQ:queueID:429count:$ip") > 30) $redis->setex("redisQ:banned:$ip", 10000, "true");
55
+            if ($redis->get("redisQ:queueID:429count:$ip") > 30) {
56
+                $redis->setex("redisQ:banned:$ip", 10000, "true");
57
+            }
56 58
             header('HTTP/1.1 429 Too many requests.');
57 59
             exit();
58 60
         }
@@ -65,7 +67,9 @@  discard block
 block discarded – undo
65 67
                 $object = false;
66 68
                 $pop = $redis->blPop($rQueueID, 1);
67 69
                 if (!isset($pop[1])) {
68
-                    if (time() >= ($time + $timeToWait)) return;
70
+                    if (time() >= ($time + $timeToWait)) {
71
+                        return;
72
+                    }
69 73
                 } else {
70 74
                     $objectID = $pop[1];
71 75
                     $object = $redis->get($objectID);
@@ -82,7 +86,9 @@  discard block
 block discarded – undo
82 86
 
83 87
     protected static function matchesFilter($filterValue, $object)
84 88
     {
85
-        if ($filterValue == null) return $object;
89
+        if ($filterValue == null) {
90
+            return $object;
91
+        }
86 92
         return self::recursive_array_search($filterValue, unserialize($object)) ? $object : false;
87 93
     }
88 94
 
Please login to merge, or discard this patch.