Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Riley19280 authored and github-actions[bot] committed Oct 28, 2024
1 parent 6f79fa1 commit 0d25f1f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public function hasOptimization(?string $optimize = null, ?string $clear = null,
$this->optimizeCommands[] = [
'optimize' => $optimize,
'clear' => $clear,
'key' => $key
'key' => $key,
];

if (! in_array($optimize, $this->consoleCommands)) {
Expand Down
2 changes: 1 addition & 1 deletion src/PackageServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function boot()
}

if (! empty($this->package->optimizeCommands) && method_exists($this, 'optimizes')) {
foreach($this->package->optimizeCommands as $optimizeCmd) {
foreach ($this->package->optimizeCommands as $optimizeCmd) {
$this->optimizes($optimizeCmd['optimize'], $optimizeCmd['clear'], $optimizeCmd['key'] ?? null);
}
}
Expand Down
8 changes: 3 additions & 5 deletions tests/PackageServiceProviderTests/PackageOptimizationTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\Tests\TestClasses\FourthTestCommand;
use Spatie\LaravelPackageTools\Tests\TestClasses\OtherTestCommand;
use Spatie\LaravelPackageTools\Tests\TestClasses\TestCommand;
use Spatie\LaravelPackageTools\Tests\TestClasses\ThirdTestCommand;

trait ConfigurePackageOptimizationTest
{
Expand Down Expand Up @@ -40,18 +38,18 @@ public function configurePackage(Package $package)
->assertExitCode(0);
});

it('registered optimize with laravel', function() {
it('registered optimize with laravel', function () {
if (version_compare(app()->version(), '11.27.1', '<')) {
$this->markTestSkipped('Laravel 11+ functionality');
}

$this->artisan('optimize')->expectsOutputToContain('laravel-package-tools');
});

it('registered optimize:clear with laravel', function() {
it('registered optimize:clear with laravel', function () {
if (version_compare(app()->version(), '11.27.1', '<')) {
$this->markTestSkipped('Laravel 11+ functionality');
}

$this->artisan('optimize:clear')->expectsOutputToContain('laravel-package-tools');
$this->artisan('optimize:clear')->expectsOutputToContain('laravel-package-tools');
});

0 comments on commit 0d25f1f

Please sign in to comment.