original_string: public function extractApiEndpoints(array $module)
      {
          $modulePath = $module['path'] . DIRECTORY_SEPARATOR . 'Api';
          $moduleName = $module['name'];
          $endpoints = [];
          if (file_exists($modulePath)) {
              $finder = new Finder();
              $finder->files()->in($modulePath)->depth(0)->name('*.php');
              if (count($finder)) {
                  /** @var \SplFileInfo $file */
                  foreach ($finder as $file) {
                      $namespace = "\\{$moduleName}\\Api\\" . str_replace('.php', '', $file->getFilename());
                      $info = $this->extractApiInfo($namespace, $moduleName);
                      if (!empty($info)) {
                          $endpoints[$namespace] = $info;
                      }
                  }
              }
          }
          return $endpoints;
      }
code: public function extractApiEndpoints(array $module)
      {
          $modulePath = $module['path'] . DIRECTORY_SEPARATOR . 'Api';
          $moduleName = $module['name'];
          $endpoints = [];
          if (file_exists($modulePath)) {
              $finder = new Finder();
              $finder->files()->in($modulePath)->depth(0)->name('*.php');
              if (count($finder)) {
                  /** @var \SplFileInfo $file */
                  foreach ($finder as $file) {
                      $namespace = "\\{$moduleName}\\Api\\" . str_replace('.php', '', $file->getFilename());
                      $info = $this->extractApiInfo($namespace, $moduleName);
                      if (!empty($info)) {
                          $endpoints[$namespace] = $info;
                      }
                  }
              }
          }
          return $endpoints;
      }
code_tokens: public function extractApiEndpoints ( array $ module ) { $ modulePath = $ module [ 'path' ] . DIRECTORY_SEPARATOR . 'Api' ; $ moduleName = $ module [ 'name' ] ; $ endpoints = [ ] ; if ( file_exists ( $ modulePath ) ) { $ finder = new Finder ( ) ; $ finder -> files ( ) -> in ( $ modulePath ) -> depth ( 0 ) -> name ( '*.php' ) ; if ( count ( $ finder ) ) { /** @var \SplFileInfo $file */ foreach ( $ finder as $ file ) { $ namespace = "\\{$moduleName}\\Api\\" . str_replace ( '.php' , '' , $ file -> getFilename ( ) ) ; $ info = $ this -> extractApiInfo ( $ namespace , $ moduleName ) ; if ( ! empty ( $ info ) ) { $ endpoints [ $ namespace ] = $ info ; } } } } return $ endpoints ; }
docstring: Method that extract all endpoints for each module
  
  @param array $module
  
  @return array
docstring_tokens: Method that extract all endpoints for each module