/** * @param FileInterface $file * @return DefinitionInterface[] */ private function collectDefinitionsForFile(FileInterface $file) { return array_map(function ($code) use($file) { return new DocumentationCodeDefinition($code, $file); }, $this->codeExtractor->getCodeFromDocumentation($file->getContents())); }
/** * @param $file * @return string */ private function prepareJsonContent(FileInterface $file) : string { return preg_replace('!//.*!', '', $file->getContents()); }