Skip to content

Commit 0df1907

Browse files
committed
Pint
1 parent a6d1dd6 commit 0df1907

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

src/Actions/AppendTailwindTag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public function __invoke(string $contents): ?string
1212

1313
return preg_replace(
1414
'/(\s*)(<\/head>)/',
15-
PHP_EOL."\\1 <!-- TailwindCSS Styles -->".
15+
PHP_EOL.'\\1 <!-- TailwindCSS Styles -->'.
1616
"\\1 <link rel=\"stylesheet\" href=\"{{ tailwindcss('css/app.css') }}\" />\\1\\2",
1717
$contents,
1818
);

src/Commands/BuildCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function handle(): int
3535
$sourcePath = $this->fixFilePathForOs(config('tailwindcss.build.source_file_path'));
3636
$sourceRelativePath = str_replace(rtrim(resource_path(), DIRECTORY_SEPARATOR), '', $sourcePath);
3737
$destinationPath = $this->fixFilePathForOs(config('tailwindcss.build.destination_path'));
38-
$destinationFileAbsolutePath = $destinationPath . DIRECTORY_SEPARATOR . trim($sourceRelativePath, DIRECTORY_SEPARATOR);
38+
$destinationFileAbsolutePath = $destinationPath.DIRECTORY_SEPARATOR.trim($sourceRelativePath, DIRECTORY_SEPARATOR);
3939
$destinationFileRelativePath = str_replace(rtrim(public_path(), DIRECTORY_SEPARATOR), '', $destinationFileAbsolutePath);
4040

4141
File::ensureDirectoryExists(dirname($destinationFileAbsolutePath));
@@ -109,6 +109,7 @@ private function shouldVersion(): bool
109109
if ($this->option('digest')) {
110110
return true;
111111
}
112+
112113
return (bool) $this->option('prod');
113114
}
114115

@@ -117,6 +118,7 @@ private function shouldMinify(): bool
117118
if ($this->option('minify')) {
118119
return true;
119120
}
121+
120122
return (bool) $this->option('prod');
121123
}
122124
}

src/Commands/InstallCommand.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ protected function phpBinary(): string
4444
private function ensureTailwindConfigExists(): void
4545
{
4646
$this->copyStubToApp(
47-
stub: __DIR__ . '/../../stubs/postcss.config.js',
47+
stub: __DIR__.'/../../stubs/postcss.config.js',
4848
to: base_path('postcss.config.js'),
4949
);
5050

5151
if (! File::exists($appCssFilePath = resource_path('css/app.css')) || in_array(trim(File::get($appCssFilePath)), ['', '0'], true) || $this->mainCssIsDefault($appCssFilePath)) {
5252
$this->copyStubToApp(
53-
stub: __DIR__ . '/../../stubs/resources/css/app.css',
53+
stub: __DIR__.'/../../stubs/resources/css/app.css',
5454
to: $appCssFilePath,
5555
);
5656
}
@@ -94,8 +94,8 @@ private function installMiddlewareAfter(string $after, string $name, $group = 'w
9494
}
9595

9696
$modifiedMiddlewareGroup = str_replace(
97-
$after . ',',
98-
$after . ',' . PHP_EOL . ' ' . $name . ',',
97+
$after.',',
98+
$after.','.PHP_EOL.' '.$name.',',
9999
$middlewareGroup,
100100
);
101101

@@ -142,10 +142,10 @@ private function installMiddlewareToBootstrap(string $middleware, string $group
142142
$bootstrapApp = str_replace(
143143
'->withMiddleware(function (Middleware $middleware) {',
144144
'->withMiddleware(function (Middleware $middleware) {'
145-
. PHP_EOL . " \$middleware->{$group}({$modifier}: ["
146-
. PHP_EOL . " {$middleware},"
147-
. PHP_EOL . ' ]);'
148-
. PHP_EOL,
145+
.PHP_EOL." \$middleware->{$group}({$modifier}: ["
146+
.PHP_EOL." {$middleware},"
147+
.PHP_EOL.' ]);'
148+
.PHP_EOL,
149149
$bootstrapApp,
150150
);
151151

src/Http/Middleware/AddLinkHeaderForPreloadedAssets.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66

77
class AddLinkHeaderForPreloadedAssets
88
{
9-
public function __construct(private readonly Manifest $manifest)
10-
{
11-
}
9+
public function __construct(private readonly Manifest $manifest) {}
1210

1311
public function handle($request, $next)
1412
{

src/Testing/InteractsWithTailwind.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ trait InteractsWithTailwind
1212
*/
1313
protected function withoutTailwind(): static
1414
{
15-
$this->swap(Manifest::class, fn(): \Illuminate\Support\HtmlString => new HtmlString(''));
15+
$this->swap(Manifest::class, fn (): \Illuminate\Support\HtmlString => new HtmlString(''));
1616

1717
return $this;
1818
}

src/helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/**
88
* Get the path to a versioned TailwindCSS file.
99
*
10-
* @param bool|array $preload
10+
* @param bool|array $preload
1111
*/
1212
function tailwindcss(string $path, $preload = true): HtmlString|string
1313
{

tests/AppendTailwindTagTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ public function append_tailwind_tag_before_closing_head_tag(): void
4040
</html>
4141
BLADE;
4242

43-
$this->assertEquals($expected, (new AppendTailwindTag())($contents));
43+
$this->assertEquals($expected, (new AppendTailwindTag)($contents));
4444
}
4545
}

tests/WorksWithoutCompiledManifestTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ protected function setUp(): void
1515
{
1616
parent::setUp();
1717

18-
Route::get('_testing/missing-manifest', fn() => View::file(__DIR__ . '/stubs/welcome.blade.php'));
18+
Route::get('_testing/missing-manifest', fn () => View::file(__DIR__.'/stubs/welcome.blade.php'));
1919
}
2020

2121
#[\PHPUnit\Framework\Attributes\Test]

0 commit comments

Comments
 (0)