Skip to content

Commit 93c6e39

Browse files
committed
formatting
1 parent 67bdac6 commit 93c6e39

11 files changed

+30
-23
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"sort-packages": true
3636
},
3737
"require-dev": {
38+
"laravel/pint": "^1.4",
3839
"orchestra/testbench": "^7.19"
3940
}
4041
}

src/Commands/BaseCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ protected function optionalChoice(string $question, array $choices, $default = n
1515
choices: array_merge($choices, [self::NONE]),
1616
default: $default,
1717
);
18+
1819
return $choice === self::NONE ? false : $choice;
1920
}
20-
}
21+
}

src/Commands/Choices/ArtisanOptimize.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
class ArtisanOptimize
66
{
77
public const YES = 'yes';
8+
89
public const NO = 'no';
910

1011
public static function values(): array
@@ -14,4 +15,4 @@ public static function values(): array
1415
self::NO,
1516
];
1617
}
17-
}
18+
}

src/Commands/Choices/NodeBuildTool.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
class NodeBuildTool
66
{
77
public const VITE = 'vite';
8+
89
public const MIX = 'mix';
910

1011
public static function values(): array
@@ -14,4 +15,4 @@ public static function values(): array
1415
self::MIX,
1516
];
1617
}
17-
}
18+
}

src/Commands/Choices/NodePackageManager.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
class NodePackageManager
66
{
77
public const NPM = 'npm';
8+
89
public const YARN = 'yarn';
910

1011
public static function values(): array
@@ -14,4 +15,4 @@ public static function values(): array
1415
self::YARN,
1516
];
1617
}
17-
}
18+
}

src/Commands/Choices/PhpVersion.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
class PhpVersion
66
{
77
public const v8_2 = '8.2';
8+
89
public const v8_1 = '8.1';
10+
911
public const v8_0 = '8.0';
1012

1113
public static function values(): array
@@ -16,4 +18,4 @@ public static function values(): array
1618
self::v8_0,
1719
];
1820
}
19-
}
21+
}

src/Commands/DockerBuildCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ public function handle(): int
3030

3131
return self::SUCCESS;
3232
}
33-
}
33+
}

src/Commands/DockerGenerateCommand.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ public function handle(): int
3838
]),
3939
]);
4040

41-
if (!is_dir($dir = base_path('.docker'))) {
41+
if (! is_dir($dir = base_path('.docker'))) {
4242
mkdir($dir);
4343
}
4444

4545
foreach ($dockerfiles as $file => $content) {
4646
// Example: $PWD/.docker/{php,nginx}.dockerfile
47-
$dockerfile = sprintf("%s/%s", $dir, $file);
47+
$dockerfile = sprintf('%s/%s', $dir, $file);
4848

4949
// Save Dockerfile contents
5050
file_put_contents($dockerfile, $content);
@@ -117,16 +117,14 @@ private function getNodeBuildTool(): string
117117
);
118118
}
119119

120-
121120
protected function getOptions(): array
122121
{
123-
124122
return [
125123
new InputOption(
126124
name: 'php-version',
127125
shortcut: 'p',
128126
mode: InputOption::VALUE_REQUIRED,
129-
description: sprintf("PHP version (supported: %s)", join(', ', PhpVersion::values())),
127+
description: sprintf('PHP version (supported: %s)', implode(', ', PhpVersion::values())),
130128
),
131129
new InputOption(
132130
name: 'optimize',
@@ -138,14 +136,14 @@ protected function getOptions(): array
138136
name: 'node-package-manager',
139137
shortcut: 'm',
140138
mode: InputOption::VALUE_REQUIRED,
141-
description: sprintf('Node Package Manager (supported: %s)', join(', ', NodePackageManager::values())),
139+
description: sprintf('Node Package Manager (supported: %s)', implode(', ', NodePackageManager::values())),
142140
),
143141
new InputOption(
144142
name: 'node-build-tool',
145143
shortcut: 'b',
146144
mode: InputOption::VALUE_REQUIRED,
147-
description: sprintf('Node Build Tool (supported: %s)', join(', ', NodeBuildTool::values())),
145+
description: sprintf('Node Build Tool (supported: %s)', implode(', ', NodeBuildTool::values())),
148146
),
149147
];
150148
}
151-
}
149+
}

src/DockerServiceProvider.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,21 @@ public function boot(): void
1818
}
1919

2020
$this->publishes([
21-
__DIR__ . '/../config/docker-builder.php' => config_path('docker-builder.php'),
21+
__DIR__.'/../config/docker-builder.php' => config_path('docker-builder.php'),
2222
]);
2323

2424
$this->mergeConfigFrom(
25-
__DIR__ . '/../config/docker-builder.php', 'docker-builder',
25+
__DIR__.'/../config/docker-builder.php', 'docker-builder',
2626
);
2727
}
2828

2929
public static function getPackagePath(string $path = null): string
3030
{
3131
$dir = dirname(__FILE__, 2);
3232
if ($path) {
33-
return $dir . DIRECTORY_SEPARATOR . $path;
33+
return $dir.DIRECTORY_SEPARATOR.$path;
3434
}
35+
3536
return $dir;
3637
}
37-
}
38+
}

src/Traits/InteractsWithTwig.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ trait InteractsWithTwig
1111

1212
private function twig(): TwigEnvironment
1313
{
14-
if (!is_null($this->twig)) {
14+
if (! is_null($this->twig)) {
1515
return $this->twig;
1616
}
1717
$path = package_path('docker/template');
1818
$loader = new FilesystemLoader($path);
19+
1920
return $this->twig = new TwigEnvironment($loader);
2021
}
2122

2223
private function render(string $name, array $context): string
2324
{
2425
return $this->twig()->render($name, $context);
2526
}
26-
}
27+
}

src/helpers.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php
22

3-
if (!function_exists('package_path')) {
3+
if (! function_exists('package_path')) {
44
function package_path(string $path = null): string
55
{
66
$dir = dirname(__FILE__, 2);
77

88
if ($path = str($path)->ltrim(DIRECTORY_SEPARATOR)) {
9-
return $dir . DIRECTORY_SEPARATOR . $path;
9+
return $dir.DIRECTORY_SEPARATOR.$path;
1010
}
1111

1212
return $dir;
1313
}
14-
}
14+
}

0 commit comments

Comments
 (0)