Skip to content

Commit 23c1a11

Browse files
authored
Refactored to add missing inheritance check
Let PHPCR handle the node type checking including inheritance.
1 parent e3ff8fb commit 23c1a11

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/PHPCR/Shell/Console/Helper/NodeHelper.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,7 @@ class NodeHelper extends Helper
2929
*/
3030
public function nodeHasMixinType($node, $mixinTypeName)
3131
{
32-
$mixinTypes = $node->getMixinNodeTypes();
33-
34-
foreach ($mixinTypes as $mixinType) {
35-
if ($mixinTypeName == $mixinType->getName()) {
36-
return true;
37-
}
38-
}
39-
40-
return false;
32+
return $node->isNodeType($mixinTypeName);
4133
}
4234

4335
/**

0 commit comments

Comments
 (0)