We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9afa824 commit f8a95ddCopy full SHA for f8a95dd
src/PhpGenerator/Traits/CommentAware.php
@@ -39,4 +39,11 @@ public function addComment(string $val): static
39
$this->comment .= $this->comment ? "\n$val" : $val;
40
return $this;
41
}
42
+
43
44
+ public function removeComment(): static
45
+ {
46
+ $this->comment = null;
47
+ return $this;
48
+ }
49
tests/PhpGenerator/ClassType.phpt
@@ -59,7 +59,9 @@ $class->addProperty('handle')
59
->addComment('@var resource orignal file handle');
60
61
$class->addProperty('order')
62
- ->setValue(new Literal('RecursiveIteratorIterator::SELF_FIRST'));
+ ->setValue(new Literal('RecursiveIteratorIterator::SELF_FIRST'))
63
+ ->addComment('foo')
64
+ ->removeComment();
65
66
$class->addProperty('typed1')
67
->setType(Type::Array)
0 commit comments