Explorar o código

Abort quickly if the only match is class= in a file

Jordi Boggiano %!s(int64=11) %!d(string=hai) anos
pai
achega
e3a10b31ab
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Composer/Autoload/ClassMapGenerator.php

+ 1 - 1
src/Composer/Autoload/ClassMapGenerator.php

@@ -104,7 +104,7 @@ class ClassMapGenerator
         }
 
         // return early if there is no chance of matching anything in this file
-        if (!preg_match('{\b(?:class|interface'.$traits.')\b}i', $contents)) {
+        if (!preg_match('{\b(?:class|interface'.$traits.')\s}i', $contents)) {
             return array();
         }