@@ -72,7 +72,7 @@ public function getLocator()
7272 */
7373 public function import ($ resource , string $ type = null , bool $ ignoreErrors = false , string $ sourceResource = null , $ exclude = null )
7474 {
75- if (\is_string ($ resource ) && \strlen ($ resource ) !== ($ i = strcspn ($ resource , '*?{[ ' )) && false === strpos ($ resource , "\n" )) {
75+ if (\is_string ($ resource ) && \strlen ($ resource ) !== ($ i = strcspn ($ resource , '*?{[ ' )) && ! str_contains ($ resource , "\n" )) {
7676 $ excluded = [];
7777 foreach ((array ) $ exclude as $ pattern ) {
7878 foreach ($ this ->glob ($ pattern , true , $ _ , false , true ) as $ path => $ info ) {
@@ -82,7 +82,7 @@ public function import($resource, string $type = null, bool $ignoreErrors = fals
8282 }
8383
8484 $ ret = [];
85- $ isSubpath = 0 !== $ i && false !== strpos (substr ($ resource , 0 , $ i ), '/ ' );
85+ $ isSubpath = 0 !== $ i && str_contains (substr ($ resource , 0 , $ i ), '/ ' );
8686 foreach ($ this ->glob ($ resource , false , $ _ , $ ignoreErrors || !$ isSubpath , false , $ excluded ) as $ path => $ info ) {
8787 if (null !== $ res = $ this ->doImport ($ path , 'glob ' === $ type ? null : $ type , $ ignoreErrors , $ sourceResource )) {
8888 $ ret [] = $ res ;
@@ -106,7 +106,7 @@ protected function glob(string $pattern, bool $recursive, &$resource = null, boo
106106 if (\strlen ($ pattern ) === $ i = strcspn ($ pattern , '*?{[ ' )) {
107107 $ prefix = $ pattern ;
108108 $ pattern = '' ;
109- } elseif (0 === $ i || false === strpos (substr ($ pattern , 0 , $ i ), '/ ' )) {
109+ } elseif (0 === $ i || ! str_contains (substr ($ pattern , 0 , $ i ), '/ ' )) {
110110 $ prefix = '. ' ;
111111 $ pattern = '/ ' .$ pattern ;
112112 } else {
0 commit comments