diff --git a/src/Plugins/Tia/Graph.php b/src/Plugins/Tia/Graph.php index a6371386..a5c7a92a 100644 --- a/src/Plugins/Tia/Graph.php +++ b/src/Plugins/Tia/Graph.php @@ -1289,7 +1289,7 @@ final class Graph /** @param array> $edges */ private function anyTestUses(array $edges, string $component): bool { - return array_any($edges, fn ($components): bool => in_array($component, $components, true)); + return array_any($edges, fn (array $components): bool => in_array($component, $components, true)); } public function pruneMissingTests(): void diff --git a/src/Plugins/Tia/JsModuleGraph.php b/src/Plugins/Tia/JsModuleGraph.php index a0d891ac..e4c2dc20 100644 --- a/src/Plugins/Tia/JsModuleGraph.php +++ b/src/Plugins/Tia/JsModuleGraph.php @@ -386,6 +386,6 @@ final class JsModuleGraph private static function hasViteConfig(string $projectRoot): bool { - return array_any(self::VITE_CONFIG_NAMES, fn ($name): bool => is_file($projectRoot.DIRECTORY_SEPARATOR.$name)); + return array_any(self::VITE_CONFIG_NAMES, fn (string $name): bool => is_file($projectRoot.DIRECTORY_SEPARATOR.$name)); } } diff --git a/src/Plugins/Tia/TableExtractor.php b/src/Plugins/Tia/TableExtractor.php index e9eb4982..0a5052b8 100644 --- a/src/Plugins/Tia/TableExtractor.php +++ b/src/Plugins/Tia/TableExtractor.php @@ -23,7 +23,7 @@ final class TableExtractor } $prefix = strtolower(substr($trimmed, 0, 6)); - $matched = array_any(self::DML_PREFIXES, fn ($dml): bool => str_starts_with($prefix, (string) $dml)); + $matched = array_any(self::DML_PREFIXES, fn (string $dml): bool => str_starts_with($prefix, $dml)); if (! $matched) { return []; diff --git a/src/Plugins/Tia/TestPaths.php b/src/Plugins/Tia/TestPaths.php index 58bf8ac2..8012e067 100644 --- a/src/Plugins/Tia/TestPaths.php +++ b/src/Plugins/Tia/TestPaths.php @@ -94,7 +94,7 @@ final readonly class TestPaths if (in_array($relativePath, $this->files, true)) { return true; } - $matchesSuffix = array_any($this->suffixes, fn ($suffix): bool => str_ends_with($relativePath, (string) $suffix)); + $matchesSuffix = array_any($this->suffixes, fn (string $suffix): bool => str_ends_with($relativePath, $suffix)); if (! $matchesSuffix) { return false; diff --git a/src/Plugins/Tia/WatchPatterns.php b/src/Plugins/Tia/WatchPatterns.php index e7025bdc..33f91f0f 100644 --- a/src/Plugins/Tia/WatchPatterns.php +++ b/src/Plugins/Tia/WatchPatterns.php @@ -253,17 +253,17 @@ final class WatchPatterns private function patternTargetsDotfiles(string $pattern): bool { - return array_any(explode('/', str_replace('\\', '/', $pattern)), fn ($segment): bool => $segment !== '' && $segment[0] === '.'); + return array_any(explode('/', str_replace('\\', '/', $pattern)), fn (string $segment): bool => $segment !== '' && $segment[0] === '.'); } private function touchesVcs(string $file): bool { - return array_any(explode('/', $file), fn ($segment): bool => in_array($segment, self::VCS_DIRS, true)); + return array_any(explode('/', $file), fn (string $segment): bool => in_array($segment, self::VCS_DIRS, true)); } private function touchesDotfile(string $file): bool { - return array_any(explode('/', $file), fn ($segment): bool => $segment !== '' && $segment[0] === '.'); + return array_any(explode('/', $file), fn (string $segment): bool => $segment !== '' && $segment[0] === '.'); } private function excludeMatches(string $exclude, string $file): bool