Skip to content

Commit

Permalink
Tweak lookup logic
Browse files Browse the repository at this point in the history
  • Loading branch information
theseer committed Mar 21, 2017
1 parent 8f0784a commit b71c43c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/generator/enricher/pmd/PHPMessDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use TheSeer\fDOM\fDOMDocument;
use TheSeer\fDOM\fDOMElement;
use TheSeer\fDOM\fDOMException;
use TheSeer\phpDox\FileInfo;
use TheSeer\phpDox\Generator\AbstractUnitObject;
use TheSeer\phpDox\Generator\ClassStartEvent;
use TheSeer\phpDox\Generator\InterfaceStartEvent;
Expand Down Expand Up @@ -58,7 +59,8 @@ private function loadViolations($xmlFile) {
$dom = new fDOMDocument();
$dom->load($xmlFile);
foreach($dom->query('/pmd/file') as $file) {
$this->violations[$file->getAttribute('name')] = $file->query('*');
$fileInfo = new FileInfo($file->getAttribute('name'));
$this->violations[$fileInfo->getPathname()] = $file->query('*');
}
} catch (fDOMException $e) {
throw new EnricherException(
Expand Down

0 comments on commit b71c43c

Please sign in to comment.