Skip to content

Commit 831bb00

Browse files
committed
formatting updates
1 parent 30f816e commit 831bb00

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

src/Commands/DeployCommand.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ private function deployPreviousBuild(string $hash, array $migrate, bool $dryRun)
4040
{
4141
Output::info("Updating symlink to previous build: {$hash}");
4242

43+
/** @var null|AtomicDeployment $deploymentModel */
4344
$deploymentModel = AtomicDeployment::successful()->where('commit_hash', $hash)->first();
4445

4546
if (! $deploymentModel?->has_deployment) {
@@ -75,8 +76,11 @@ private function deployCurrentBuild(array $migrate, bool $dryRun): void
7576
Output::info("Deployment directory option set - Deployment will use directory: {$deployDir}");
7677
$atomicDeployment->getDeployment()->setDirectory($deployDir);
7778
}
78-
$atomicDeployment->deploy(fn () => $atomicDeployment->cleanBuilds(config('atomic-deployments.build-limit'))
79-
);
79+
80+
$atomicDeployment
81+
->deploy(
82+
fn () => $atomicDeployment->cleanBuilds(config('atomic-deployments.build-limit'))
83+
);
8084
} catch (Throwable $e) {
8185
$atomicDeployment->fail();
8286
Output::throwable($e);

src/Commands/ListCommand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public function handle(): void
4141

4242
$titles = ['ID', 'Commit Hash', 'Path', 'SymLink', 'Status', 'Created', 'Live'];
4343

44+
// @phpstan-ignore-next-line
4445
ConsoleOutput::table($titles, $deployments);
4546
ConsoleOutput::line('');
4647
}

src/Models/AtomicDeployment.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ class AtomicDeployment extends Model
4040
'deployment_status' => DeploymentStatus::class,
4141
];
4242

43-
protected static function boot()
43+
protected static function boot(): void
4444
{
4545
parent::boot();
4646

47-
static::deleting(function ($model) {
47+
static::deleting(function (AtomicDeployment $model) {
4848
if ($model->is_currently_deployed) {
4949
throw new AreYouInsaneException('Cannot delete live deployment');
5050
}
@@ -53,7 +53,7 @@ protected static function boot()
5353
});
5454
}
5555

56-
public function scopeSuccessful($query)
56+
public function scopeSuccessful($query): Builder
5757
{
5858
return $query->where('deployment_status', DeploymentStatus::SUCCESS);
5959
}

0 commit comments

Comments
 (0)