Skip to content

Commit 54c2c9b

Browse files
committed
fix: linter.
1 parent d0ef902 commit 54c2c9b

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/Decorators/QueueDecorator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
namespace Umbrellio\LaravelHeavyJobs\Decorators;
66

7-
use Throwable;
87
use Illuminate\Contracts\Queue\Queue;
8+
use Throwable;
99
use Umbrellio\LaravelHeavyJobs\Jobs\HeavyJob;
1010
use Umbrellio\LaravelHeavyJobs\Jobs\ShouldStorePayload;
1111

src/Stores/RedisStore.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
namespace Umbrellio\LaravelHeavyJobs\Stores;
66

77
use Carbon\Carbon;
8+
use function count;
89
use Illuminate\Redis\RedisManager;
910
use Umbrellio\LaravelHeavyJobs\Stores\Helpers\LuaScripts;
10-
use function \count;
1111

1212
final class RedisStore implements StoreInterface
1313
{
@@ -28,15 +28,15 @@ public function get(string $id): ?string
2828
{
2929
$score = $this->lifetime !== -1 ? Carbon::now()->getTimestamp() : 0;
3030

31-
[$payload, $ids] = $this->connection->pipeline(function ($pipe) use ($id, $score) {
31+
[$payload, $ids] = $this->connection->pipeline(function ($pipe) use ($id, $score): void {
3232
$pipe->eval(LuaScripts::get(), [self::JOB_PAYLOADS_KEY, self::FAILED_JOB_PAYLOADS_KEY, $id], 2);
33-
$pipe->zrangebyscore(self::LIFETIME_FAILED_JOB_PAYLOADS_KEY, '-inf', (string)$score);
33+
$pipe->zrangebyscore(self::LIFETIME_FAILED_JOB_PAYLOADS_KEY, '-inf', (string) $score);
3434
});
3535

3636
if (count($ids)) {
37-
$this->connection->pipeline(function ($pipe) use ($ids, $score) {
37+
$this->connection->pipeline(function ($pipe) use ($ids, $score): void {
3838
$pipe->hdel(self::FAILED_JOB_PAYLOADS_KEY, ...$ids);
39-
$pipe->zremrangebyscore(self::LIFETIME_FAILED_JOB_PAYLOADS_KEY, '-inf', (string)$score);
39+
$pipe->zremrangebyscore(self::LIFETIME_FAILED_JOB_PAYLOADS_KEY, '-inf', (string) $score);
4040
});
4141
}
4242

@@ -50,7 +50,7 @@ public function getFailed(string $id): ?string
5050

5151
public function set(string $id, string $serializedData): bool
5252
{
53-
[$set] = $this->connection->pipeline(function ($pipe) use ($id, $serializedData) {
53+
[$set] = $this->connection->pipeline(function ($pipe) use ($id, $serializedData): void {
5454
$pipe->hset(self::JOB_PAYLOADS_KEY, $id, $serializedData);
5555
$pipe->zrem(self::LIFETIME_FAILED_JOB_PAYLOADS_KEY, $id);
5656
});
@@ -70,7 +70,7 @@ public function remove(string $id): bool
7070

7171
public function removeFailed(string $id): bool
7272
{
73-
[$deleted] = $this->connection->pipeline(function ($pipe) use ($id) {
73+
[$deleted] = $this->connection->pipeline(function ($pipe) use ($id): void {
7474
$pipe->hdel(self::FAILED_JOB_PAYLOADS_KEY, $id);
7575
$pipe->zrem(self::LIFETIME_FAILED_JOB_PAYLOADS_KEY, $id);
7676
});
@@ -80,7 +80,7 @@ public function removeFailed(string $id): bool
8080

8181
public function markAsFailed(string $id): bool
8282
{
83-
[$marked] = $this->connection->pipeline(function ($pipe) use ($id) {
83+
[$marked] = $this->connection->pipeline(function ($pipe) use ($id): void {
8484
$pipe->eval(LuaScripts::markAsFailed(), [self::JOB_PAYLOADS_KEY, self::FAILED_JOB_PAYLOADS_KEY, $id], 2);
8585
$pipe->zadd(self::LIFETIME_FAILED_JOB_PAYLOADS_KEY, Carbon::now()->getTimestamp() + $this->lifetime, $id);
8686
});
@@ -90,7 +90,7 @@ public function markAsFailed(string $id): bool
9090

9191
public function flushFailed(): bool
9292
{
93-
$result = $this->connection->pipeline(function ($pipe) {
93+
$result = $this->connection->pipeline(function ($pipe): void {
9494
$pipe->del(self::FAILED_JOB_PAYLOADS_KEY);
9595
$pipe->del(self::LIFETIME_FAILED_JOB_PAYLOADS_KEY);
9696
});

0 commit comments

Comments
 (0)