protected function parse(SourceUnit $unit) { $result = []; foreach ($unit->getFiles() as $filename) { $result[$filename] = $this->parseFile($unit, $filename); } return $result; }
protected function createTarget(SourceUnit $unit, $package) { return ['ToRepoCloneURL' => $unit->getRepository($package), 'ToUnit' => $package, 'ToUnitType' => $unit->getType(), 'ToVersionString' => $unit->getRequiredVersion($package), 'ToRevSpec' => $unit->getCommit($package)]; }
protected function applyGlobal(array &$ref, Node $node, SourceUnit $unit, $filename, $test) { $ref['DefUnit'] = $unit->getPackageName($ref['DefPath']); $ref['DefUnitType'] = $unit->getType(); $ref['DefRepo'] = $unit->getRepository($ref['DefUnit']); $ref['File'] = $filename; $ref['Start'] = $node->getAttribute('startFilePos'); $ref['End'] = $node->getAttribute('endFilePos'); }