Skip to content

Commit 008f7e3

Browse files
Removed unnecessary methods
1 parent 61e0e2a commit 008f7e3

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

src/Concerns/Isolatable.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,6 @@
99

1010
trait Isolatable
1111
{
12-
protected function isolationCreate(): bool
13-
{
14-
return $this->isolationMutex()->create($this);
15-
}
16-
17-
protected function isolationForget(): void
18-
{
19-
$this->isolationMutex()->forget($this);
20-
}
21-
2212
protected function isolationMutex(): Mutex
2313
{
2414
return $this->getLaravel()->make(Mutex::class);

src/Console/Command.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function handle(): int
3737
protected function execute(InputInterface $input, OutputInterface $output): int
3838
{
3939
try {
40-
if ($this->getIsolateOption() !== false && ! $this->isolationCreate()) {
40+
if ($this->getIsolateOption() !== false && ! $this->isolationMutex()->create($this)) {
4141
$this->comment(sprintf('The [%s] command is already running.', $this->getName()));
4242

4343
return $this->isolatedStatusCode();
@@ -47,7 +47,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
4747
}
4848
finally {
4949
if ($this->getIsolateOption() !== false) {
50-
$this->isolationForget();
50+
$this->isolationMutex()->forget($this);
5151
}
5252
}
5353
}

0 commit comments

Comments
 (0)