@@ -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
@@ -652,8 +652,8 @@ public function getPresentExportIgnoresToPreserve(array $globPatternMatchingExpo
652652 $ pattern = \trim ($ pattern );
653653
654654 if ($ patternMatches
655- && !\in_array ($ pattern , $ globPatternMatchingExportIgnores )
656- && !\in_array ($ pattern , $ basenamedGlobPatternMatchingExportIgnores )
655+ && !\in_array ($ pattern , $ globPatternMatchingExportIgnores, strict: true )
656+ && !\in_array ($ pattern , $ basenamedGlobPatternMatchingExportIgnores, strict: true )
657657 ) {
658658 return $ exportIgnoresToPreserve [] = \trim ($ pattern );
659659 }
@@ -688,7 +688,7 @@ public function collectExpectedExportIgnores(): array
688688 }
689689
690690 foreach ($ globMatches as $ filename ) {
691- if (!\in_array ($ filename , $ ignoredGlobMatches )) {
691+ if (!\in_array ($ filename , $ ignoredGlobMatches, strict: true )) {
692692 if (\is_dir ($ filename )) {
693693 $ expectedExportIgnores [] = $ filename . '/ ' ;
694694 continue ;
@@ -830,7 +830,7 @@ public function getPresentNonExportIgnoresContent(): string
830830 $ exportIgnoresPlacementPlaceholderSet = false ;
831831 $ exportIgnoresPlacementPlaceholder = self ::EXPORT_IGNORES_PLACEMENT_PLACEHOLDER ;
832832
833- \array_filter ($ gitattributesLines , function ($ line ) use (
833+ \array_filter ($ gitattributesLines , function (string $ line ) use (
834834 &$ nonExportIgnoreLines ,
835835 &$ exportIgnoresPlacementPlaceholderSet ,
836836 &$ exportIgnoresPlacementPlaceholder
@@ -872,7 +872,7 @@ public function getPresentExportIgnores(bool $applyGlob = true, string $gitattri
872872 );
873873
874874 $ exportIgnores = [];
875- \array_filter ($ gitattributesLines , function ($ line ) use (&$ exportIgnores , &$ applyGlob ) {
875+ \array_filter ($ gitattributesLines , function (string $ line ) use (&$ exportIgnores , &$ applyGlob ) {
876876 if (\strstr ($ line , 'export-ignore ' , true )) {
877877 list ($ line , $ void ) = \explode ('export-ignore ' , $ line );
878878 if ($ applyGlob ) {
@@ -912,7 +912,7 @@ private function getAlignedExportIgnoreArtifacts(array $artifacts): array
912912 {
913913 $ longestArtifact = \max (\array_map ('strlen ' , $ artifacts ));
914914
915- return \array_map (function ($ artifact ) use (&$ longestArtifact ) {
915+ return \array_map (function (string $ artifact ) use (&$ longestArtifact ) {
916916 if (\strlen ($ artifact ) < $ longestArtifact ) {
917917 return $ artifact . \str_repeat (
918918 ' ' ,
@@ -930,7 +930,7 @@ private function getByDirectoriesToFilesExportIgnoreArtifacts(array $artifacts):
930930 return $ artifact ;
931931 }
932932 });
933- $ files = \array_filter ($ artifacts , function ($ artifact ) {
933+ $ files = \array_filter ($ artifacts , function (string $ artifact ) {
934934 if (\strpos ($ artifact , '/ ' ) === false ) {
935935 return $ artifact ;
936936 }
0 commit comments