Skip to content

Commit

Permalink
Fix #303, change if condition order
Browse files Browse the repository at this point in the history
  • Loading branch information
mi-schi committed Aug 22, 2015
1 parent f964eb9 commit 3376c73
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/php/PHPMD/Node/MethodNode.php
Expand Up @@ -121,12 +121,14 @@ public function getParentType()
{
$parentNode = $this->getNode()->getParent();

if ($parentNode instanceof ASTClass) {
return new ClassNode($parentNode);
}
if ($parentNode instanceof ASTTrait) {
return new TraitNode($parentNode);
}

if ($parentNode instanceof ASTClass) {
return new ClassNode($parentNode);
}

return new InterfaceNode($parentNode);
}

Expand Down

0 comments on commit 3376c73

Please sign in to comment.