Explorar el Código

Place file name logic in Finder

Finder is responsible of filtering only php files.
Also updated phpdoc issue
Marc hace 11 años
padre
commit
8b4e059205
Se han modificado 1 ficheros con 3 adiciones y 12 borrados
  1. 3 12
      Service/GearmanCacheWrapper.php

+ 3 - 12
Service/GearmanCacheWrapper.php

@@ -178,9 +178,8 @@ class GearmanCacheWrapper
 
     /**
      * Return Gearman bundle settings, previously loaded by method load()
+     * 
      * If settings are not loaded, a SettingsNotLoadedException Exception is thrown
-     *
-     * @return array Bundles that gearman will be able to search annotations
      */
     public function loadNamespaceMap()
     {
@@ -241,7 +240,8 @@ class GearmanCacheWrapper
                 ->files()
                 ->followLinks()
                 ->exclude($this->excludedPaths)
-                ->in($this->paths);
+                ->in($this->paths)
+                ->name('*.php');
 
             $workerCollection = $this->parseFiles($finder, $reader);
         }
@@ -268,15 +268,6 @@ class GearmanCacheWrapper
          */
         foreach ($finder as $file) {
 
-            /**
-             * File is checked to be parsed. Is just parsed if is a php file
-             * Otherwise, jump to next file
-             */
-            if ('php' !== strtolower($file->getExtension())) {
-
-                continue;
-            }
-
             /**
              * File is accepted to be parsed
              */