diff --git a/composer.json b/composer.json index d556575..2660f17 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "require": { "php": "^8.1", "ext-json": "*", - "symfony/finder": "7.*", + "symfony/finder": "6.*|7.*", "illuminate/config": "10.*|11.*", "illuminate/console": "10.*|11.*", "illuminate/contracts": "10.*|11.*", diff --git a/phpunit.xml b/phpunit.xml index 18b5c6f..18566f7 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,12 +1,6 @@ - + - - src/ - - - src/Opcache.php - @@ -18,4 +12,12 @@ tests + + + src/ + + + src/Opcache.php + + diff --git a/src/Condition.php b/src/Condition.php index ec81cac..19961d7 100644 --- a/src/Condition.php +++ b/src/Condition.php @@ -12,8 +12,6 @@ class Condition { /** * Create a new Condition instance. - * - * @param \Closure(\Illuminate\Http\Request, \Symfony\Component\HttpFoundation\Response, array):bool $callback */ public function __construct(protected ApplicationContract $app, protected Closure $callback) { @@ -22,8 +20,6 @@ public function __construct(protected ApplicationContract $app, protected Closur /** * Use a callback for the condition. - * - * @param \Closure(\Illuminate\Http\Request, \Symfony\Component\HttpFoundation\Response, array):bool $callback */ public function use(Closure $callback): void { @@ -46,8 +42,6 @@ public function shouldGenerate(Request $request, Response $response): bool * Returns a condition callback based on requests count. * * Ensure your 'condition' array contains a 'store', 'key' and 'hits' keys. - * - * @return \Closure(array{int, mixed}, \Illuminate\Contracts\Cache\Factory):bool */ public static function countCondition(): Closure { diff --git a/src/Lister/Pipes/NormalizeList.php b/src/Lister/Pipes/NormalizeList.php index 362a348..ab39af6 100644 --- a/src/Lister/Pipes/NormalizeList.php +++ b/src/Lister/Pipes/NormalizeList.php @@ -12,7 +12,6 @@ class NormalizeList */ public function handle(Listing $listing, Closure $next): Listing { - // @phpstan-ignore-next-line $listing->files = $listing->files->keys(); return $next($listing); diff --git a/src/Preloader.php b/src/Preloader.php index 659bfbf..e00a70b 100644 --- a/src/Preloader.php +++ b/src/Preloader.php @@ -45,7 +45,7 @@ public function __construct( * * @param (\Closure(\Symfony\Component\Finder\Finder):void)|string ...$exclude */ - public function exclude(string ...$exclude): void + public function exclude(Closure|string ...$exclude): void { $this->exclude = $this->normalizeListing($exclude); } @@ -55,7 +55,7 @@ public function exclude(string ...$exclude): void * * @param (\Closure(\Symfony\Component\Finder\Finder):void)|string ...$append */ - public function append(Closure | string ...$append): void + public function append(Closure|string ...$append): void { $this->append = $this->normalizeListing($append); }