Skip to content

Commit ed6e5b2

Browse files
committed
fixed magic methods searching criteria
1 parent 6dce680 commit ed6e5b2

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

specs/completer/resolver/NodeTypeResolver.spec.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
function createClass($classFQN, $fqcn){
1919
$class = new ClassData($classFQN, 'dummy/path/class.php');
2020
$method = new MethodData('method2');
21+
$method->setType(ClassData::MODIFIER_PUBLIC);
2122
$param = new ClassProperty('param2');
2223
$param->type = $fqcn;
2324
$method->setReturn($fqcn);

src/Entity/Collection/Specification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function satisfy($node){
2424
return false;
2525
}
2626
if($node instanceof MethodData){
27-
if($node->isMagic() !== $this->magic){
27+
if($node->isMagic() && !$this->magic){
2828
return false;
2929
}
3030
}

0 commit comments

Comments
 (0)