@@ -92,7 +92,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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() |