예제 #1
0
 /**
  * @param SplFileInfo[] $files
  */
 public function parse($files)
 {
     foreach ($files as $file) {
         $content = $this->charsetConvertor->convertFileToUtf($file->getPathname());
         try {
             $this->broker->processString($content, $file->getPathname());
         } catch (FileProcessingException $exception) {
             $this->errors[] = $exception;
         }
     }
     $this->extractBrokerDataForParserResult($this->broker);
 }
 /**
  * @return string
  */
 private function getHighlightedCodeFromElement(ReflectionElement $element)
 {
     $content = $this->charsetConvertor->convertFileToUtf($element->getFileName());
     return $this->sourceCodeHighlighter->highlightAndAddLineNumbers($content);
 }