Skip to content

Commit

Permalink
style: fixed using pint
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaile committed Nov 19, 2024
1 parent 5b0646b commit 2b7337b
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 24 deletions.
3 changes: 0 additions & 3 deletions app/Console/Commands/SyncRepositories.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@
use App\Jobs\SyncRepository;
use App\Models\Repository;
use Illuminate\Console\Command;
use Illuminate\Contracts\Console\PromptsForMissingInput;
use Illuminate\Database\Eloquent\ModelNotFoundException;

use function Laravel\Prompts\multiselect;

class SyncRepositories extends Command
{
/**
Expand Down
3 changes: 0 additions & 3 deletions app/Console/Commands/UnFreezeRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@

use App\Models\Repository;
use Illuminate\Console\Command;
use Illuminate\Contracts\Console\PromptsForMissingInput;
use Illuminate\Database\Eloquent\ModelNotFoundException;

use function Laravel\Prompts\select;

class UnFreezeRepository extends Command
{
/**
Expand Down
4 changes: 1 addition & 3 deletions app/Events/SnapshotCreated.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,5 @@ class SnapshotCreated
/**
* Create a new event instance.
*/
public function __construct(public readonly Repository $repository)
{
}
public function __construct(public readonly Repository $repository) {}
}
4 changes: 1 addition & 3 deletions app/Http/Middleware/CommunityLicenceCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

class CommunityLicenceCheck
{
public function __construct(readonly private LicenceVerification $licenceVerification)
{
}
public function __construct(readonly private LicenceVerification $licenceVerification) {}

/**
* Handle an incoming request.
Expand Down
4 changes: 1 addition & 3 deletions app/Http/Middleware/EnterpriseLicenceCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

class EnterpriseLicenceCheck
{
public function __construct(readonly private LicenceVerification $licenceVerification)
{
}
public function __construct(readonly private LicenceVerification $licenceVerification) {}

/**
* Handle an incoming request.
Expand Down
4 changes: 1 addition & 3 deletions app/Jobs/SyncRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ class SyncRepository implements ShouldQueue
/**
* Create a new job instance.
*/
public function __construct(private readonly Repository $repository)
{
}
public function __construct(private readonly Repository $repository) {}

/**
* Execute the job.
Expand Down
4 changes: 1 addition & 3 deletions app/Logic/LicenceVerification.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

class LicenceVerification
{
public function __construct(readonly string $enterpriseEndpoint, readonly string $communityEntrypoint)
{
}
public function __construct(readonly string $enterpriseEndpoint, readonly string $communityEntrypoint) {}

public function communityCheck(string $systemId, string $secret): bool
{
Expand Down
1 change: 1 addition & 0 deletions tests/Feature/CommandLineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use App\Jobs\SyncRepository;
use App\Models\Repository;
use Illuminate\Support\Facades\Queue;

use function Pest\Laravel\artisan;
use function Pest\Laravel\assertDatabaseHas;

Expand Down
6 changes: 3 additions & 3 deletions tests/Feature/SyncRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

test('repository upstream processing', function () {
$repository = Repository::factory()->create(['sub_dir' => 'example']);
$listener = new ProcessRepositoryUpstream();
$listener = new ProcessRepositoryUpstream;
$sourcePath = config('repositories.source_folder').'/'.$repository->name;
$snapshotPath = config('repositories.snapshots').'/'.$repository->name;
Event::fake();
Expand All @@ -68,7 +68,7 @@
Storage::createDirectory($snapshotPath.'/'.now()->subDays(3)->toAtomString());
Storage::createDirectory($snapshotPath.'/'.now()->subDays(2)->toAtomString());
Storage::createDirectory($snapshotPath.'/'.now()->subDay()->toAtomString());
$listener = new CleanRepository();
$listener = new CleanRepository;
$listener->handle(new SnapshotCreated($repository));
Storage::assertMissing($snapshotPath.'/'.now()->subDays(3)->toAtomString());
Storage::assertMissing($snapshotPath.'/'.now()->subDays(2)->toAtomString());
Expand All @@ -88,7 +88,7 @@
Storage::createDirectory($snapshotPath.'/'.now()->subDays(2)->toAtomString());
Storage::createDirectory($snapshotPath.'/'.now()->subDay()->toAtomString());
Storage::createDirectory($snapshotPath.'/'.$repository->freeze);
$listener = new CleanRepository();
$listener = new CleanRepository;
$listener->handle(new SnapshotCreated($repository));
Storage::assertMissing($snapshotPath.'/'.now()->subDays(3)->toAtomString());
Storage::assertMissing($snapshotPath.'/'.now()->subDays(2)->toAtomString());
Expand Down

0 comments on commit 2b7337b

Please sign in to comment.