diff --git a/domains/ConfigAdjustment/Concerns/MakesArchiveAdjustments.php b/domains/ConfigAdjustment/Concerns/MakesArchiveAdjustments.php index 501eec7..37a80ff 100644 --- a/domains/ConfigAdjustment/Concerns/MakesArchiveAdjustments.php +++ b/domains/ConfigAdjustment/Concerns/MakesArchiveAdjustments.php @@ -18,7 +18,7 @@ trait MakesArchiveAdjustments * @throws ZipEntryNotFoundException * @throws ZipException */ - protected function replaceInFile(ZipFile $archive, string $file, array $replacements) : void + protected function replaceInFile(ZipFile $archive, string $file, array $replacements): void { $contents = $archive->getEntryContents($file); $replacedContents = Str::replace( @@ -38,20 +38,20 @@ protected function replaceInFile(ZipFile $archive, string $file, array $replacem * @throws ZipEntryNotFoundException * @throws ZipException */ - protected function replaceEnvExample(ZipFile $archive, array $replacements) : void + protected function replaceEnvExample(ZipFile $archive, array $replacements): void { $this->replaceInFile($archive, '.env.example', $replacements); } - protected function appendToFile(ZipFile $archive, string $file, string $append) : void + protected function appendToFile(ZipFile $archive, string $file, string $append): void { $originalContents = $archive->getEntryContents($file); - $archive->addFromString($file, $originalContents . $append); + $archive->addFromString($file, $originalContents.$append); } - protected function addEnvExampleBlock(ZipFile $archive, string $block) : void + protected function addEnvExampleBlock(ZipFile $archive, string $block): void { - $this->appendToFile($archive, ".env.example", "\n$block\n"); + $this->appendToFile($archive, '.env.example', "\n$block\n"); } } diff --git a/domains/ConfigAdjustment/ConfigAdjustmentArchiveManipulator.php b/domains/ConfigAdjustment/ConfigAdjustmentArchiveManipulator.php index 2ace9d5..9a88123 100644 --- a/domains/ConfigAdjustment/ConfigAdjustmentArchiveManipulator.php +++ b/domains/ConfigAdjustment/ConfigAdjustmentArchiveManipulator.php @@ -17,7 +17,7 @@ public function __construct( ) { } - public function manipulate(ZipFile $archive, CreateProjectForm $form) : void + public function manipulate(ZipFile $archive, CreateProjectForm $form): void { $this->database->adjustDefaults($archive, $form->database->database); $this->cache->adjustDefaults($archive, $form->cache->driver); @@ -25,4 +25,4 @@ public function manipulate(ZipFile $archive, CreateProjectForm $form) : void $this->search->adjustDefaults($archive, $form->search); $this->flysystem->adjustDefaults($archive, $form->storage); } -} \ No newline at end of file +} diff --git a/domains/ConfigAdjustment/FlysystemAdjuster.php b/domains/ConfigAdjustment/FlysystemAdjuster.php index e640d12..682bf90 100644 --- a/domains/ConfigAdjustment/FlysystemAdjuster.php +++ b/domains/ConfigAdjustment/FlysystemAdjuster.php @@ -20,16 +20,16 @@ class FlysystemAdjuster public function adjustDefaults( ZipFile $archive, Storage $storage, - ) : void { - $contents = $archive->getEntryContents("config/filesystems.php"); + ): void { + $contents = $archive->getEntryContents('config/filesystems.php'); $adjusted = $this->adjustContents($contents, $storage); $this->adjustEnvExample($archive, $storage); - $archive->addFromString("config/filesystems.php", $adjusted); + $archive->addFromString('config/filesystems.php', $adjusted); } - private function adjustEnvExample(ZipFile $archive, Storage $storage) : void + private function adjustEnvExample(ZipFile $archive, Storage $storage): void { if ($storage->usesFtp) { $this->addEnvExampleBlock($archive, <<<'ENV' @@ -50,7 +50,7 @@ private function adjustEnvExample(ZipFile $archive, Storage $storage) : void } } - public function adjustContents(string $contents, Storage $storage) : string + public function adjustContents(string $contents, Storage $storage): string { if ($storage->usesFtp) { $contents = $this->prependFilesystemConfig($contents, $this->defaultFtpConfig()); @@ -63,14 +63,14 @@ public function adjustContents(string $contents, Storage $storage) : string return $contents; } - private function prependFilesystemConfig(string $config, string $entry) : string + private function prependFilesystemConfig(string $config, string $entry): string { $marker = " 's3' => ["; return Str::replace($marker, "$entry\n\n$marker", $config); } - private function defaultFtpConfig() : string + private function defaultFtpConfig(): string { $c = <<<'CONFIG' 'ftp' => [ @@ -91,7 +91,7 @@ private function defaultFtpConfig() : string return $c; } - private function defaultSftpConfig() : string + private function defaultSftpConfig(): string { $c = <<<'CONFIG' 'sftp' => [ @@ -123,4 +123,4 @@ private function defaultSftpConfig() : string return $c; } -} \ No newline at end of file +} diff --git a/domains/CreateProjectForm/Http/Request/CreateProjectRequest/BuildsCreateProjectForm.php b/domains/CreateProjectForm/Http/Request/CreateProjectRequest/BuildsCreateProjectForm.php index 78366a4..668169c 100644 --- a/domains/CreateProjectForm/Http/Request/CreateProjectRequest/BuildsCreateProjectForm.php +++ b/domains/CreateProjectForm/Http/Request/CreateProjectRequest/BuildsCreateProjectForm.php @@ -35,7 +35,7 @@ */ trait BuildsCreateProjectForm { - public function buildForm() : CreateProjectForm + public function buildForm(): CreateProjectForm { $sailServiceRepository = $this->sailServiceRepository(); @@ -110,8 +110,8 @@ public function buildForm() : CreateProjectForm ); } - private function sailServiceRepository() : SailServiceRepository + private function sailServiceRepository(): SailServiceRepository { return resolve(SailServiceRepository::class); } -} \ No newline at end of file +} diff --git a/domains/CreateProjectForm/Http/Request/CreateProjectRequest/CreateProjectRequestParameter.php b/domains/CreateProjectForm/Http/Request/CreateProjectRequest/CreateProjectRequestParameter.php index 885d5c1..9915580 100644 --- a/domains/CreateProjectForm/Http/Request/CreateProjectRequest/CreateProjectRequestParameter.php +++ b/domains/CreateProjectForm/Http/Request/CreateProjectRequest/CreateProjectRequestParameter.php @@ -32,12 +32,12 @@ class CreateProjectRequestParameter /** @see Authentication */ const STARTER = 'starter'; - const USES_JETSTREAM_TEAMS = self::USES_PREFIX . 'jetstream-teams'; + const USES_JETSTREAM_TEAMS = self::USES_PREFIX.'jetstream-teams'; const JETSTREAM_FRONTEND = 'jetstream-frontend'; const BREEZE_FRONTEND = 'breeze-frontend'; - const USES_FORTIFY = self::USES_PREFIX . 'fortify'; - const USES_PASSPORT = self::USES_PREFIX . 'passport'; - const USES_SOCIALITE = self::USES_PREFIX . 'socialite'; + const USES_FORTIFY = self::USES_PREFIX.'fortify'; + const USES_PASSPORT = self::USES_PREFIX.'passport'; + const USES_SOCIALITE = self::USES_PREFIX.'socialite'; /** @see Database */ const DATABASE = 'database'; @@ -50,18 +50,18 @@ class CreateProjectRequestParameter /** @see Queue */ const QUEUE_DRIVER = 'queue'; - const USES_HORIZON = self::USES_PREFIX . 'horizon'; + const USES_HORIZON = self::USES_PREFIX.'horizon'; /** @see DevelopmentTools */ - const USES_TELESCOPE = self::USES_PREFIX . 'telescope'; - const USES_MAILHOG = self::USES_PREFIX . 'mailhog'; - const USES_ENVOY = self::USES_PREFIX . 'envoy'; - const USES_PENNANT = self::USES_PREFIX . 'pennant'; - const USES_DEVCONTAINER = self::USES_PREFIX . 'devcontainer'; + const USES_TELESCOPE = self::USES_PREFIX.'telescope'; + const USES_MAILHOG = self::USES_PREFIX.'mailhog'; + const USES_ENVOY = self::USES_PREFIX.'envoy'; + const USES_PENNANT = self::USES_PREFIX.'pennant'; + const USES_DEVCONTAINER = self::USES_PREFIX.'devcontainer'; /** @see Testing */ - const USES_DUSK = self::USES_PREFIX . 'dusk'; - const USES_PEST = self::USES_PREFIX . 'pest'; + const USES_DUSK = self::USES_PREFIX.'dusk'; + const USES_PEST = self::USES_PREFIX.'pest'; /** @see Payment */ const CASHIER_DRIVER = 'cashier'; @@ -76,11 +76,11 @@ class CreateProjectRequestParameter const MAIL_DRIVER = 'mail'; /** @see Storage */ - const USES_MINIO = self::USES_PREFIX . 'minio'; - const USES_FLYSYSTEM_S3_DRIVER = self::USES_PREFIX . 'flysystem-s3'; - const USES_FLYSYSTEM_SFTP_DRIVER = self::USES_PREFIX . 'flysystem-sftp'; - const USES_FLYSYSTEM_FTP_DRIVER = self::USES_PREFIX . 'flysystem-ftp'; - const USES_FLYSYSTEM_READONLY_DRIVER = self::USES_PREFIX . 'flysystem-readonly'; - const USES_FLYSYSTEM_SCOPED_DRIVER = self::USES_PREFIX . 'flysystem-scoped'; - const USES_DBAL = self::USES_PREFIX . 'dbal'; -} \ No newline at end of file + const USES_MINIO = self::USES_PREFIX.'minio'; + const USES_FLYSYSTEM_S3_DRIVER = self::USES_PREFIX.'flysystem-s3'; + const USES_FLYSYSTEM_SFTP_DRIVER = self::USES_PREFIX.'flysystem-sftp'; + const USES_FLYSYSTEM_FTP_DRIVER = self::USES_PREFIX.'flysystem-ftp'; + const USES_FLYSYSTEM_READONLY_DRIVER = self::USES_PREFIX.'flysystem-readonly'; + const USES_FLYSYSTEM_SCOPED_DRIVER = self::USES_PREFIX.'flysystem-scoped'; + const USES_DBAL = self::USES_PREFIX.'dbal'; +} diff --git a/domains/CreateProjectForm/Sections/Storage.php b/domains/CreateProjectForm/Sections/Storage.php index 095370f..c1d7f6f 100644 --- a/domains/CreateProjectForm/Sections/Storage.php +++ b/domains/CreateProjectForm/Sections/Storage.php @@ -13,4 +13,4 @@ public function __construct( public bool $usesReadonly, ) { } -} \ No newline at end of file +} diff --git a/domains/Laravel/RelatedPackages/Infrastructure/Flysystem/FtpDriver.php b/domains/Laravel/RelatedPackages/Infrastructure/Flysystem/FtpDriver.php index 84cfc58..e01aaf4 100644 --- a/domains/Laravel/RelatedPackages/Infrastructure/Flysystem/FtpDriver.php +++ b/domains/Laravel/RelatedPackages/Infrastructure/Flysystem/FtpDriver.php @@ -6,33 +6,33 @@ class FtpDriver extends ComposerDependency { - public function id() : string + public function id(): string { return 'flysystem-ftp'; } - public function packageId() : string + public function packageId(): string { return 'league/flysystem-ftp'; } - public function name() : string + public function name(): string { return 'FTP'; } - public function description() : string + public function description(): string { return 'Allows you to manage files using the File Transfer Protocol.'; } - public function href() : ?string + public function href(): ?string { return 'https://laravel.com/docs/filesystem#ftp-driver-configuration'; } - public function versionConstraint() : ?string + public function versionConstraint(): ?string { return '^3.0'; } -} \ No newline at end of file +} diff --git a/domains/Laravel/RelatedPackages/Infrastructure/Flysystem/ReadonlyDriver.php b/domains/Laravel/RelatedPackages/Infrastructure/Flysystem/ReadonlyDriver.php index 02693a5..4a9123e 100644 --- a/domains/Laravel/RelatedPackages/Infrastructure/Flysystem/ReadonlyDriver.php +++ b/domains/Laravel/RelatedPackages/Infrastructure/Flysystem/ReadonlyDriver.php @@ -6,33 +6,33 @@ class ReadonlyDriver extends ComposerDependency { - public function id() : string + public function id(): string { return 'flysystem-readonly'; } - public function packageId() : string + public function packageId(): string { return 'league/flysystem-read-only'; } - public function name() : string + public function name(): string { return 'Read-Only'; } - public function description() : string + public function description(): string { return 'Allows you to create filesystem disks that do not allow write operations.'; } - public function href() : ?string + public function href(): ?string { return 'https://laravel.com/docs/filesystem#scoped-and-read-only-filesystems'; } - public function versionConstraint() : ?string + public function versionConstraint(): ?string { return '^3.0'; } -} \ No newline at end of file +} diff --git a/domains/Laravel/RelatedPackages/Infrastructure/Flysystem/S3Driver.php b/domains/Laravel/RelatedPackages/Infrastructure/Flysystem/S3Driver.php index 725db1c..2c98f29 100644 --- a/domains/Laravel/RelatedPackages/Infrastructure/Flysystem/S3Driver.php +++ b/domains/Laravel/RelatedPackages/Infrastructure/Flysystem/S3Driver.php @@ -6,39 +6,39 @@ class S3Driver extends ComposerDependency { - public function id() : string + public function id(): string { return 'flysystem-aws'; } - public function packageId() : string + public function packageId(): string { return 'league/flysystem-aws-s3-v3'; } - public function name() : string + public function name(): string { return 'Amazon Simple Storage Service (S3)'; } - public function description() : string + public function description(): string { // Was inlined to be able to use links. return ''; } - public function href() : ?string + public function href(): ?string { return 'https://aws.amazon.com/s3'; } - public function needsToBeInstalledWithAllDependencies() : bool + public function needsToBeInstalledWithAllDependencies(): bool { return true; } - public function versionConstraint() : ?string + public function versionConstraint(): ?string { return '^3.0'; } -} \ No newline at end of file +} diff --git a/domains/Laravel/RelatedPackages/Infrastructure/Flysystem/ScopedDriver.php b/domains/Laravel/RelatedPackages/Infrastructure/Flysystem/ScopedDriver.php index 5bb07d9..af0c4d1 100644 --- a/domains/Laravel/RelatedPackages/Infrastructure/Flysystem/ScopedDriver.php +++ b/domains/Laravel/RelatedPackages/Infrastructure/Flysystem/ScopedDriver.php @@ -6,33 +6,33 @@ class ScopedDriver extends ComposerDependency { - public function id() : string + public function id(): string { return 'flysystem-scoped'; } - public function packageId() : string + public function packageId(): string { return 'league/flysystem-path-prefixing'; } - public function name() : string + public function name(): string { return 'Scoped'; } - public function description() : string + public function description(): string { return 'Allows you to define a filesystem where all paths are automatically prefixed with a given path prefix.'; } - public function href() : ?string + public function href(): ?string { return 'https://laravel.com/docs/filesystem#scoped-and-read-only-filesystems'; } - public function versionConstraint() : ?string + public function versionConstraint(): ?string { return '^3.0'; } -} \ No newline at end of file +} diff --git a/domains/Laravel/RelatedPackages/Infrastructure/Flysystem/SftpDriver.php b/domains/Laravel/RelatedPackages/Infrastructure/Flysystem/SftpDriver.php index bafb735..5a9edeb 100644 --- a/domains/Laravel/RelatedPackages/Infrastructure/Flysystem/SftpDriver.php +++ b/domains/Laravel/RelatedPackages/Infrastructure/Flysystem/SftpDriver.php @@ -6,33 +6,33 @@ class SftpDriver extends ComposerDependency { - public function id() : string + public function id(): string { return 'flysystem-sftp'; } - public function packageId() : string + public function packageId(): string { return 'league/flysystem-sftp-v3'; } - public function name() : string + public function name(): string { return 'SFTP'; } - public function description() : string + public function description(): string { return 'Allows you to manage files using the SSH File Transfer Protocol.'; } - public function href() : ?string + public function href(): ?string { return 'https://laravel.com/docs/filesystem#sftp-driver-configuration'; } - public function versionConstraint() : ?string + public function versionConstraint(): ?string { return '^3.0'; } -} \ No newline at end of file +} diff --git a/domains/Laravel/Sail/Soketi.php b/domains/Laravel/Sail/Soketi.php index a954e4b..fd4afb1 100644 --- a/domains/Laravel/Sail/Soketi.php +++ b/domains/Laravel/Sail/Soketi.php @@ -6,23 +6,23 @@ class Soketi extends SailConfigurationOption { const REPOSITORY_KEY = 'soketi'; - public function id() : string + public function id(): string { return self::REPOSITORY_KEY; } - public function name() : string + public function name(): string { return 'Soketi'; } - public function description() : string + public function description(): string { return 'Free, self-hosted, drop-in Pusher replacement implemented in Node.'; } - public function href() : ?string + public function href(): ?string { return 'https://soketi.app'; } -} \ No newline at end of file +} diff --git a/domains/ProjectTemplateCustomization/Resolver/ComposerPackagesToInstallResolver.php b/domains/ProjectTemplateCustomization/Resolver/ComposerPackagesToInstallResolver.php index 32657de..4e43ac6 100644 --- a/domains/ProjectTemplateCustomization/Resolver/ComposerPackagesToInstallResolver.php +++ b/domains/ProjectTemplateCustomization/Resolver/ComposerPackagesToInstallResolver.php @@ -60,26 +60,26 @@ class ComposerPackagesToInstallResolver * @param CreateProjectForm $form * @return Collection */ - public function resolveFor(CreateProjectForm $form) : Collection + public function resolveFor(CreateProjectForm $form): Collection { return (new Collection([ - ...$this->forAuthentication($form->authentication), - ...$this->forDatabase($form->database), - ...$this->forCache($form->cache), - ...$this->forQueue($form->queue), - ...$this->forSearch($form->search), - ...$this->forDevelopmentTools($form->developmentTools), - ...$this->forTesting($form->testing), - ...$this->forPayment($form->payment), - ...$this->forStorage($form->storage), - ...$this->forNotifications($form->notifications), - ...$this->forMail($form->mail), - ...$this->forBroadcasting($form->broadcasting), + ...$this->forAuthentication($form->authentication), + ...$this->forDatabase($form->database), + ...$this->forCache($form->cache), + ...$this->forQueue($form->queue), + ...$this->forSearch($form->search), + ...$this->forDevelopmentTools($form->developmentTools), + ...$this->forTesting($form->testing), + ...$this->forPayment($form->payment), + ...$this->forStorage($form->storage), + ...$this->forNotifications($form->notifications), + ...$this->forMail($form->mail), + ...$this->forBroadcasting($form->broadcasting), ]))->unique()->values(); } /** @return array */ - public function forAuthentication(Authentication $authentication) : array + public function forAuthentication(Authentication $authentication): array { $packages = []; @@ -105,7 +105,7 @@ public function forAuthentication(Authentication $authentication) : array } /** @return array */ - public function forDatabase(Database $database) : array + public function forDatabase(Database $database): array { return $database->useDbal ? [new DoctrineDbal()] @@ -113,7 +113,7 @@ public function forDatabase(Database $database) : array } /** @return array */ - public function forCache(Cache $cache) : array + public function forCache(Cache $cache): array { if ($cache->driver === null) { return []; @@ -129,7 +129,7 @@ public function forCache(Cache $cache) : array } /** @return array */ - public function forQueue(Queue $queue) : array + public function forQueue(Queue $queue): array { $packages = []; @@ -149,7 +149,7 @@ public function forQueue(Queue $queue) : array } /** @return array */ - public function forSearch(Search $search) : array + public function forSearch(Search $search): array { if ($search->driver === ScoutDriver::NONE) { return []; @@ -170,7 +170,7 @@ public function forSearch(Search $search) : array /** @return array */ public function forDevelopmentTools( DevelopmentTools $developmentTools, - ) : array { + ): array { $packages = []; if ($developmentTools->usesEnvoy) { @@ -189,7 +189,7 @@ public function forDevelopmentTools( } /** @return array */ - public function forTesting(Testing $testing) : array + public function forTesting(Testing $testing): array { $packages = []; @@ -205,7 +205,7 @@ public function forTesting(Testing $testing) : array } /** @return array */ - public function forPayment(Payment $payment) : array + public function forPayment(Payment $payment): array { $packages = []; @@ -217,7 +217,7 @@ public function forPayment(Payment $payment) : array } /** @return array */ - public function forStorage(Storage $storage) : array + public function forStorage(Storage $storage): array { $packages = []; @@ -245,7 +245,7 @@ public function forStorage(Storage $storage) : array } /** @return array */ - public function forNotifications(Notifications $notifications) : array + public function forNotifications(Notifications $notifications): array { return collect($notifications->channels)->flatMap(function (Channel $channel) { return match ($channel) { @@ -256,7 +256,7 @@ public function forNotifications(Notifications $notifications) : array } /** @return array */ - public function forMail(Mail $mail) : array + public function forMail(Mail $mail): array { $driverPackage = match ($mail->driver) { default => null, @@ -269,21 +269,21 @@ public function forMail(Mail $mail) : array } /** @return array */ - public function forBroadcasting(Broadcasting $broadcasting) : array + public function forBroadcasting(Broadcasting $broadcasting): array { $channelPackages = match ($broadcasting->channel) { BroadcastingChannelOption::PUSHER => [new Pusher()], BroadcastingChannelOption::ABLY => [new Ably()], BroadcastingChannelOption::LARAVEL_WEBSOCKETS => [ new LaravelWebsockets(), - // See https://beyondco.de/docs/laravel-websockets/basic-usage/pusher + // See https://beyondco.de/docs/laravel-websockets/basic-usage/pusher new Pusher(), ], - // Soketi is an NPM package and is handled elsewhere + // Soketi is an NPM package and is handled elsewhere BroadcastingChannelOption::SOKETI, BroadcastingChannelOption::NONE => [], }; return $channelPackages; } -} \ No newline at end of file +} diff --git a/domains/ProjectTemplateCustomization/Resolver/SailServiceResolver.php b/domains/ProjectTemplateCustomization/Resolver/SailServiceResolver.php index c0c04da..b373572 100644 --- a/domains/ProjectTemplateCustomization/Resolver/SailServiceResolver.php +++ b/domains/ProjectTemplateCustomization/Resolver/SailServiceResolver.php @@ -22,7 +22,7 @@ class SailServiceResolver /** * @return Collection */ - public function resolveFor(CreateProjectForm $form) : Collection + public function resolveFor(CreateProjectForm $form): Collection { /** @var array $services */ $services = [$form->database->database]; @@ -60,4 +60,4 @@ public function resolveFor(CreateProjectForm $form) : Collection }) ->values(); } -} \ No newline at end of file +} diff --git a/tests/Feature/Domains/ProjectCreation/CreateProjectFormFixtures.php b/tests/Feature/Domains/ProjectCreation/CreateProjectFormFixtures.php index 665ffa2..830061c 100644 --- a/tests/Feature/Domains/ProjectCreation/CreateProjectFormFixtures.php +++ b/tests/Feature/Domains/ProjectCreation/CreateProjectFormFixtures.php @@ -34,48 +34,48 @@ class CreateProjectFormFixtures { /** array */ - public static function allParameters() : array + public static function allParameters(): array { return [ - /** @see Metadata */ + /** @see Metadata */ P::VENDOR => 'foo', P::PROJECT => 'bar', P::PHP => PhpVersion::v8_2, P::DESCRIPTION => '', - /** @see Authentication */ + /** @see Authentication */ P::STARTER => StarterKit::BREEZE, P::BREEZE_FRONTEND => BreezeFrontend::BLADE, P::USES_FORTIFY => true, P::USES_PASSPORT => true, P::USES_SOCIALITE => true, - /** @see Database */ + /** @see Database */ P::DATABASE => DatabaseOption::default(), - /** @see Cache */ + /** @see Cache */ P::CACHE_DRIVER => CacheOption::default(), - /** @see Search */ + /** @see Search */ P::SCOUT_DRIVER => ScoutDriver::default()->value, - /** @see Queue */ + /** @see Queue */ P::QUEUE_DRIVER => QueueDriverOption::default(), P::USES_HORIZON => true, - /** @see DevelopmentTools */ + /** @see DevelopmentTools */ P::USES_TELESCOPE => true, P::USES_MAILHOG => true, P::USES_ENVOY => true, - /** @see Testing */ + /** @see Testing */ P::USES_DUSK => true, P::USES_PEST => true, - /** @see Payment */ + /** @see Payment */ P::CASHIER_DRIVER => CashierDriverOption::STRIPE, - /** @see Storage */ + /** @see Storage */ P::USES_MINIO => true, P::USES_FLYSYSTEM_S3_DRIVER => true, P::USES_FLYSYSTEM_SFTP_DRIVER => true, @@ -96,7 +96,7 @@ public static function allOptionsEnabled( ?Notifications $notifications = null, ?Broadcasting $broadcasting = null, ?Mail $mail = null, - ) : CreateProjectForm { + ): CreateProjectForm { return new CreateProjectForm( metadata: $metadata ?? self::metadata(), authentication: $authentication ?? self::authentication(), @@ -114,7 +114,7 @@ public static function allOptionsEnabled( ); } - public static function metadata() : Metadata + public static function metadata(): Metadata { return new Metadata( vendorName: 'foo', @@ -123,7 +123,7 @@ public static function metadata() : Metadata ); } - public static function authentication() : Authentication + public static function authentication(): Authentication { return new Authentication( starterKit: new Laravel(), @@ -133,27 +133,27 @@ public static function authentication() : Authentication ); } - public static function database() : Database + public static function database(): Database { return new Database(database: new MySQLDatabase(), useDbal: true); } - public static function cache() : Cache + public static function cache(): Cache { return new Cache(driver: new RedisCacheDriver()); } - public static function queue() : Queue + public static function queue(): Queue { return new Queue(driver: new RedisQueueDriver(), usesHorizon: true); } - public static function search() : Search + public static function search(): Search { return new Search(driver: ScoutDriver::MEILISEARCH); } - public static function developmentTools() : DevelopmentTools + public static function developmentTools(): DevelopmentTools { return new DevelopmentTools( usesTelescope: true, @@ -163,17 +163,17 @@ public static function developmentTools() : DevelopmentTools ); } - public static function testing() : Testing + public static function testing(): Testing { return new Testing(usesDusk: true, usesPest: true); } - public static function payment() : Payment + public static function payment(): Payment { return new Payment(driver: new CashierStripeDriver); } - public static function storage() : Storage + public static function storage(): Storage { return new Storage( usesMinIO: true, @@ -185,18 +185,18 @@ public static function storage() : Storage ); } - public static function notifications() : Notifications + public static function notifications(): Notifications { return new Notifications(Notifications\NotificationChannelOptions::cases()); } - public static function mail() : Mail + public static function mail(): Mail { return new Mail(driver: Mail\MailDriverOption::MAILGUN, usesMailhog: true); } - public static function broadcasting() : Broadcasting + public static function broadcasting(): Broadcasting { return new Broadcasting(Broadcasting\BroadcastingChannelOption::PUSHER); } -} \ No newline at end of file +} diff --git a/tests/Feature/Domains/ProjectTemplateCustomization/ArchiveManipulation/FlysystemAdjusterTest.php b/tests/Feature/Domains/ProjectTemplateCustomization/ArchiveManipulation/FlysystemAdjusterTest.php index fc1ec0c..d83b1d0 100644 --- a/tests/Feature/Domains/ProjectTemplateCustomization/ArchiveManipulation/FlysystemAdjusterTest.php +++ b/tests/Feature/Domains/ProjectTemplateCustomization/ArchiveManipulation/FlysystemAdjusterTest.php @@ -10,57 +10,57 @@ class FlysystemAdjusterTest extends TestCase { #[Test] - public function it_does_nothing_when_none_selected() : void + public function it_does_nothing_when_none_selected(): void { $storage = $this->storage(ftp: false, sftp: false); $adjusted = $this->manipulate($storage); - $this->assertEqualsFixture("default.php", $adjusted); + $this->assertEqualsFixture('default.php', $adjusted); } #[Test] - public function it_does_works_with_ftp() : void + public function it_does_works_with_ftp(): void { $storage = $this->storage(ftp: true, sftp: false); $adjusted = $this->manipulate($storage); - $this->assertEqualsFixture("ftp-only.php", $adjusted); + $this->assertEqualsFixture('ftp-only.php', $adjusted); } #[Test] - public function it_does_works_with_sftp() : void + public function it_does_works_with_sftp(): void { $storage = $this->storage(ftp: false, sftp: true); $adjusted = $this->manipulate($storage); - $this->assertEqualsFixture("sftp-only.php", $adjusted); + $this->assertEqualsFixture('sftp-only.php', $adjusted); } #[Test] - public function it_does_works_with_both() : void + public function it_does_works_with_both(): void { $storage = $this->storage(ftp: true, sftp: true); $adjusted = $this->manipulate($storage); - $this->assertEqualsFixture("both.php", $adjusted); + $this->assertEqualsFixture('both.php', $adjusted); } - private function fixturePath(string $name) : string + private function fixturePath(string $name): string { return base_path("tests/resources/fixtures/config/filesystem/$name"); } - private function assertEqualsFixture(string $name, string $actual) : void + private function assertEqualsFixture(string $name, string $actual): void { self::assertStringEqualsFile($this->fixturePath($name), $actual); } - private function defaultConfigContents() : string + private function defaultConfigContents(): string { return file_get_contents($this->fixturePath('default.php')); } - private function manipulate(Storage $storage) : string + private function manipulate(Storage $storage): string { return (new FlysystemAdjuster)->adjustContents( $this->defaultConfigContents(), @@ -68,7 +68,7 @@ private function manipulate(Storage $storage) : string ); } - private function storage(bool $sftp, bool $ftp) : Storage + private function storage(bool $sftp, bool $ftp): Storage { return new Storage( usesSftp: $sftp, @@ -79,4 +79,4 @@ private function storage(bool $sftp, bool $ftp) : Storage usesReadonly: false, ); } -} \ No newline at end of file +} diff --git a/tests/resources/fixtures/config/filesystem/both.php b/tests/resources/fixtures/config/filesystem/both.php index a9d7935..eada8e8 100644 --- a/tests/resources/fixtures/config/filesystem/both.php +++ b/tests/resources/fixtures/config/filesystem/both.php @@ -39,7 +39,7 @@ 'public' => [ 'driver' => 'local', 'root' => storage_path('app/public'), - 'url' => env('APP_URL') . '/storage', + 'url' => env('APP_URL').'/storage', 'visibility' => 'public', 'throw' => false, ], @@ -113,4 +113,4 @@ public_path('storage') => storage_path('app/public'), ], -]; \ No newline at end of file +]; diff --git a/tests/resources/fixtures/config/filesystem/default.php b/tests/resources/fixtures/config/filesystem/default.php index 1c81723..e9d9dbd 100644 --- a/tests/resources/fixtures/config/filesystem/default.php +++ b/tests/resources/fixtures/config/filesystem/default.php @@ -39,7 +39,7 @@ 'public' => [ 'driver' => 'local', 'root' => storage_path('app/public'), - 'url' => env('APP_URL') . '/storage', + 'url' => env('APP_URL').'/storage', 'visibility' => 'public', 'throw' => false, ], @@ -73,4 +73,4 @@ public_path('storage') => storage_path('app/public'), ], -]; \ No newline at end of file +]; diff --git a/tests/resources/fixtures/config/filesystem/ftp-only.php b/tests/resources/fixtures/config/filesystem/ftp-only.php index 5eff9c3..11f9181 100644 --- a/tests/resources/fixtures/config/filesystem/ftp-only.php +++ b/tests/resources/fixtures/config/filesystem/ftp-only.php @@ -39,7 +39,7 @@ 'public' => [ 'driver' => 'local', 'root' => storage_path('app/public'), - 'url' => env('APP_URL') . '/storage', + 'url' => env('APP_URL').'/storage', 'visibility' => 'public', 'throw' => false, ], @@ -87,4 +87,4 @@ public_path('storage') => storage_path('app/public'), ], -]; \ No newline at end of file +]; diff --git a/tests/resources/fixtures/config/filesystem/sftp-only.php b/tests/resources/fixtures/config/filesystem/sftp-only.php index da0ed5b..61a3ab1 100644 --- a/tests/resources/fixtures/config/filesystem/sftp-only.php +++ b/tests/resources/fixtures/config/filesystem/sftp-only.php @@ -39,7 +39,7 @@ 'public' => [ 'driver' => 'local', 'root' => storage_path('app/public'), - 'url' => env('APP_URL') . '/storage', + 'url' => env('APP_URL').'/storage', 'visibility' => 'public', 'throw' => false, ], @@ -99,4 +99,4 @@ public_path('storage') => storage_path('app/public'), ], -]; \ No newline at end of file +];