Passed
Push — master ( c369bf...96540c )
by Biao
03:53
created
src/Swoole/Timer/RenewGlobalTimerLockCronJob.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 {
12 12
     public function interval()
13 13
     {
14
-        return (int)(static::GLOBAL_TIMER_LOCK_SECONDS * 0.9) * 1000;
14
+        return (int) (static::GLOBAL_TIMER_LOCK_SECONDS * 0.9) * 1000;
15 15
     }
16 16
 
17 17
     public function isImmediate()
Please login to merge, or discard this patch.
src/Swoole/Timer/CronJob.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
     public static function getGlobalTimerCacheKey()
94 94
     {
95
-        return 'laravels:timer:' . strtolower(self::$globalTimerLockKey);
95
+        return 'laravels:timer:'.strtolower(self::$globalTimerLockKey);
96 96
     }
97 97
 
98 98
     public static function getGlobalTimerLock()
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         $expire = self::GLOBAL_TIMER_LOCK_SECONDS;
106 106
         $result = $redis->set($key, $value, 'ex', $expire, 'nx');
107 107
         // Compatible with Predis and PhpRedis
108
-        return $result === true || ((string)$result === 'OK');
108
+        return $result === true || ((string) $result === 'OK');
109 109
     }
110 110
 
111 111
     protected static function getCurrentInstanceId()
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     {
118 118
         /**@var \Illuminate\Redis\Connections\PhpRedisConnection $redis */
119 119
         $redis = app('redis');
120
-        return (bool)$redis->exists(self::getGlobalTimerCacheKey());
120
+        return (bool) $redis->exists(self::getGlobalTimerCacheKey());
121 121
     }
122 122
 
123 123
     public static function isCurrentTimerAlive()
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     {
134 134
         /**@var \Illuminate\Redis\Connections\PhpRedisConnection $redis */
135 135
         $redis = app('redis');
136
-        return (bool)$redis->expire(self::getGlobalTimerCacheKey(), $expire);
136
+        return (bool) $redis->expire(self::getGlobalTimerCacheKey(), $expire);
137 137
     }
138 138
 
139 139
     public static function setGlobalTimerLockKey($lockKey)
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 
144 144
     public static function setEnable($enable)
145 145
     {
146
-        self::$enable = (bool)$enable;
146
+        self::$enable = (bool) $enable;
147 147
     }
148 148
 
149 149
     public static function isEnable()
Please login to merge, or discard this patch.
src/Swoole/Timer/CheckGlobalTimerAliveCronJob.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 {
12 12
     public function interval()
13 13
     {
14
-        return (int)(static::GLOBAL_TIMER_LOCK_SECONDS * 0.9) * 1000;
14
+        return (int) (static::GLOBAL_TIMER_LOCK_SECONDS * 0.9) * 1000;
15 15
     }
16 16
 
17 17
     public function isImmediate()
Please login to merge, or discard this patch.