Test Setup Failed
Branch master (e1098f)
by Biao
08:14
created
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 \Redis|\RedisCluster|\Predis\Client $redis */
119 119
         $redis = app('redis')->client(); // Fix exists() always returns false for some older version of Laravel, see https://github.com/illuminate/redis/commit/62ff6a06a9c91902d3baa7feda20bab5e807606f
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\RedisManager $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)
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 
155 155
     public static function setEnable($enable)
156 156
     {
157
-        self::$enable = (bool)$enable;
157
+        self::$enable = (bool) $enable;
158 158
     }
159 159
 
160 160
     public static function isEnable()
Please login to merge, or discard this patch.