Skip to content

Commit d3f1fc8

Browse files
authored
use single indentation (#1595)
use single indentation rather than arbitrary alignment, just like we do now in `laravel/framework`
1 parent 14b8ae5 commit d3f1fc8

File tree

6 files changed

+19
-18
lines changed

6 files changed

+19
-18
lines changed

resources/js/screens/recentJobs/index.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,12 @@
128128
*/
129129
updatePageTitle() {
130130
document.title = this.$route.params.type == 'pending'
131-
? 'Horizon - Pending Jobs'
132-
: (
133-
this.$route.params.type == 'silenced'
134-
? 'Horizon - Silenced Jobs'
135-
: 'Horizon - Completed Jobs'
136-
);
131+
? 'Horizon - Pending Jobs'
132+
: (
133+
this.$route.params.type == 'silenced'
134+
? 'Horizon - Silenced Jobs'
135+
: 'Horizon - Completed Jobs'
136+
);
137137
}
138138
}
139139
}

src/Console/SupervisorStatusCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function handle(SupervisorRepository $supervisors)
3838

3939
$supervisorStatus = optional(collect($supervisors->all())->first(function ($supervisor) use ($name) {
4040
return Str::startsWith($supervisor->name, MasterSupervisor::basename()) &&
41-
Str::endsWith($supervisor->name, $name);
41+
Str::endsWith($supervisor->name, $name);
4242
}))->status;
4343

4444
if (is_null($supervisorStatus)) {

src/Http/Controllers/BatchesController.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,15 @@ public function retry($id)
8282

8383
if ($batch) {
8484
app(JobRepository::class)
85-
->getJobs($batch->failedJobIds)
86-
->reject(function ($job) {
87-
$payload = json_decode($job->payload);
85+
->getJobs($batch->failedJobIds)
86+
->reject(function ($job) {
87+
$payload = json_decode($job->payload);
8888

89-
return isset($payload->retry_of);
90-
})->each(function ($job) {
91-
dispatch(new RetryFailedJob($job->id));
92-
});
89+
return isset($payload->retry_of);
90+
})
91+
->each(function ($job) {
92+
dispatch(new RetryFailedJob($job->id));
93+
});
9394
}
9495
}
9596
}

src/JobPayload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ protected function shouldBeSilenced($job)
153153
$jobClass = is_string($underlyingJob) ? $underlyingJob : get_class($underlyingJob);
154154

155155
return in_array($jobClass, config('horizon.silenced', [])) ||
156-
is_a($jobClass, Silenced::class, true);
156+
is_a($jobClass, Silenced::class, true);
157157
}
158158

159159
/**

src/Supervisor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public function terminate($status = 0)
237237
protected function shouldWait()
238238
{
239239
return ! config('horizon.fast_termination') ||
240-
app(CacheFactory::class)->get('horizon:terminate:wait');
240+
app(CacheFactory::class)->get('horizon:terminate:wait');
241241
}
242242

243243
/**
@@ -340,7 +340,7 @@ protected function processPendingCommands()
340340
protected function autoScale()
341341
{
342342
$this->lastAutoScaled = $this->lastAutoScaled ?:
343-
CarbonImmutable::now()->subSeconds($this->options->balanceCooldown + 1);
343+
CarbonImmutable::now()->subSeconds($this->options->balanceCooldown + 1);
344344

345345
if (CarbonImmutable::now()->subSeconds($this->options->balanceCooldown)->gte($this->lastAutoScaled)) {
346346
$this->lastAutoScaled = CarbonImmutable::now();

src/WorkerProcess.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ protected function cooldown()
178178
public function coolingDown()
179179
{
180180
return isset($this->restartAgainAt) &&
181-
CarbonImmutable::now()->lt($this->restartAgainAt);
181+
CarbonImmutable::now()->lt($this->restartAgainAt);
182182
}
183183

184184
/**

0 commit comments

Comments
 (0)