@@ -211,7 +211,7 @@ public function setGlobPatternFromFile(string $file): Analyser
211211 );
212212
213213 $ globPatterns = [];
214- \array_filter ($ globPatternLines , function ($ line ) use (&$ globPatterns ) {
214+ \array_filter ($ globPatternLines , function (string $ line ) use (&$ globPatterns ) {
215215 if (\trim ($ line ) !== '' ) {
216216 $ globPatterns [] = \trim ($ line );
217217 }
@@ -253,7 +253,7 @@ private function guardGlobPattern(string $pattern): void
253253
254254 $ globPatterns = \explode (', ' , $ bracesContent );
255255
256- if (\count ($ globPatterns ) == 1 ) {
256+ if (\count ($ globPatterns ) === 1 ) {
257257 $ invalidGlobPattern = true ;
258258 }
259259
@@ -650,8 +650,8 @@ public function getPresentExportIgnoresToPreserve(array $globPatternMatchingExpo
650650 $ pattern = \trim ($ pattern );
651651
652652 if ($ patternMatches
653- && !\in_array ($ pattern , $ globPatternMatchingExportIgnores )
654- && !\in_array ($ pattern , $ basenamedGlobPatternMatchingExportIgnores )
653+ && !\in_array ($ pattern , $ globPatternMatchingExportIgnores, strict: true )
654+ && !\in_array ($ pattern , $ basenamedGlobPatternMatchingExportIgnores, strict: true )
655655 ) {
656656 return $ exportIgnoresToPreserve [] = \trim ($ pattern );
657657 }
@@ -686,7 +686,7 @@ public function collectExpectedExportIgnores(): array
686686 }
687687
688688 foreach ($ globMatches as $ filename ) {
689- if (!\in_array ($ filename , $ ignoredGlobMatches )) {
689+ if (!\in_array ($ filename , $ ignoredGlobMatches, strict: true )) {
690690 if (\is_dir ($ filename )) {
691691 $ expectedExportIgnores [] = $ filename . '/ ' ;
692692 continue ;
@@ -828,7 +828,7 @@ public function getPresentNonExportIgnoresContent(): string
828828 $ exportIgnoresPlacementPlaceholderSet = false ;
829829 $ exportIgnoresPlacementPlaceholder = self ::EXPORT_IGNORES_PLACEMENT_PLACEHOLDER ;
830830
831- \array_filter ($ gitattributesLines , function ($ line ) use (
831+ \array_filter ($ gitattributesLines , function (string $ line ) use (
832832 &$ nonExportIgnoreLines ,
833833 &$ exportIgnoresPlacementPlaceholderSet ,
834834 &$ exportIgnoresPlacementPlaceholder
@@ -870,7 +870,7 @@ public function getPresentExportIgnores(bool $applyGlob = true, string $gitattri
870870 );
871871
872872 $ exportIgnores = [];
873- \array_filter ($ gitattributesLines , function ($ line ) use (&$ exportIgnores , &$ applyGlob ) {
873+ \array_filter ($ gitattributesLines , function (string $ line ) use (&$ exportIgnores , &$ applyGlob ) {
874874 if (\strstr ($ line , 'export-ignore ' , true )) {
875875 list ($ line , $ void ) = \explode ('export-ignore ' , $ line );
876876 if ($ applyGlob ) {
@@ -910,7 +910,7 @@ private function getAlignedExportIgnoreArtifacts(array $artifacts): array
910910 {
911911 $ longestArtifact = \max (\array_map ('strlen ' , $ artifacts ));
912912
913- return \array_map (function ($ artifact ) use (&$ longestArtifact ) {
913+ return \array_map (function (string $ artifact ) use (&$ longestArtifact ) {
914914 if (\strlen ($ artifact ) < $ longestArtifact ) {
915915 return $ artifact . \str_repeat (
916916 ' ' ,
@@ -923,12 +923,12 @@ private function getAlignedExportIgnoreArtifacts(array $artifacts): array
923923
924924 private function getByDirectoriesToFilesExportIgnoreArtifacts (array $ artifacts ): array
925925 {
926- $ directories = \array_filter ($ artifacts , function ($ artifact ) {
926+ $ directories = \array_filter ($ artifacts , function (string $ artifact ): string {
927927 if (\strpos ($ artifact , '/ ' )) {
928928 return $ artifact ;
929929 }
930930 });
931- $ files = \array_filter ($ artifacts , function ($ artifact ) {
931+ $ files = \array_filter ($ artifacts , function (string $ artifact ) {
932932 if (\strpos ($ artifact , '/ ' ) === false ) {
933933 return $ artifact ;
934934 }
0 commit comments