diff --git a/phpunit-tests/ClassTest.php b/phpunit-tests/ClassTest.php new file mode 100644 index 0000000..d9d6caa --- /dev/null +++ b/phpunit-tests/ClassTest.php @@ -0,0 +1,34 @@ +assertSameRepresentation( + <<<'CODE' + setAttribute('kind', Double::KIND_DOUBLE); } + /** + * TRANSFORM: remove class const type + */ + private function removeClassConstType(ClassConst $node): void + { + $node->type = null; + } + /** * {@inheritDoc} */ @@ -283,6 +292,8 @@ public function enterNode(Node $node) $this->replaceStaticCallName($node); } elseif ($node instanceof MethodCall) { $this->replaceMethodCallName($node); + } elseif ($node instanceof ClassConst) { + $this->removeClassConstType($node); } return null;