original_string: private function discoverDataServices()
      {
          $path = $this->rootDir.'/'.$this->directory;
          $finder = new Finder();
          $finder->files()->in($path);
  
          /** @var SplFileInfo $file */
          foreach ($finder as $file) {
              $class = $this->classForFile($file);
              /* @var \Lullabot\Mpx\DataService\Annotation\DataService $annotation */
              $annotation = $this->annotationReader->getClassAnnotation(new \ReflectionClass($class), 'Lullabot\Mpx\DataService\Annotation\DataService');
              if (!$annotation) {
                  continue;
              }
  
              // Now that we have a new data service, we need to attach any
              // custom field implementations.
              $customFields = $this->getCustomFields($annotation);
              $this->dataServices[$annotation->getService()][$annotation->getObjectType()][$annotation->getSchemaVersion()] = new DiscoveredDataService($class, $annotation, $customFields);
          }
      }
code: private function discoverDataServices()
      {
          $path = $this->rootDir.'/'.$this->directory;
          $finder = new Finder();
          $finder->files()->in($path);
  
          /** @var SplFileInfo $file */
          foreach ($finder as $file) {
              $class = $this->classForFile($file);
              /* @var \Lullabot\Mpx\DataService\Annotation\DataService $annotation */
              $annotation = $this->annotationReader->getClassAnnotation(new \ReflectionClass($class), 'Lullabot\Mpx\DataService\Annotation\DataService');
              if (!$annotation) {
                  continue;
              }
  
              // Now that we have a new data service, we need to attach any
              // custom field implementations.
              $customFields = $this->getCustomFields($annotation);
              $this->dataServices[$annotation->getService()][$annotation->getObjectType()][$annotation->getSchemaVersion()] = new DiscoveredDataService($class, $annotation, $customFields);
          }
      }
code_tokens: private function discoverDataServices ( ) { $ path = $ this -> rootDir . '/' . $ this -> directory ; $ finder = new Finder ( ) ; $ finder -> files ( ) -> in ( $ path ) ; /** @var SplFileInfo $file */ foreach ( $ finder as $ file ) { $ class = $ this -> classForFile ( $ file ) ; /* @var \Lullabot\Mpx\DataService\Annotation\DataService $annotation */ $ annotation = $ this -> annotationReader -> getClassAnnotation ( new \ ReflectionClass ( $ class ) , 'Lullabot\Mpx\DataService\Annotation\DataService' ) ; if ( ! $ annotation ) { continue ; } // Now that we have a new data service, we need to attach any // custom field implementations. $ customFields = $ this -> getCustomFields ( $ annotation ) ; $ this -> dataServices [ $ annotation -> getService ( ) ] [ $ annotation -> getObjectType ( ) ] [ $ annotation -> getSchemaVersion ( ) ] = new DiscoveredDataService ( $ class , $ annotation , $ customFields ) ; } }
docstring: Discovers data services.
docstring_tokens: Discovers data services .