فهرست منبع

Place file name logic in Finder

Finder is responsible of filtering only php files.
Also updated phpdoc issue
Marc 11 سال پیش
والد
کامیت
8b4e059205
1فایلهای تغییر یافته به همراه3 افزوده شده و 12 حذف شده
  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
              */