diff --git a/src/Parser/Filter/NodeName.php b/src/Parser/Filter/NodeName.php index de16f349..8b59a639 100644 --- a/src/Parser/Filter/NodeName.php +++ b/src/Parser/Filter/NodeName.php @@ -75,7 +75,9 @@ public function setOptions(array $options) $this->excludePattern = (string) $options['excludePattern']; } - if (isset($options['namespaceFilter'])) { + if (isset($options['namespaceFilter']) + && $options['namespaceFilter'] instanceof NamespaceFilterInterface + ) { $this->namespaceFilter = $options['namespaceFilter']; } }