Skip to content

Commit 4673690

Browse files
committed
Add optional visibility to ClassConstBuilder::fromScratch() - Close #14
1 parent e32979b commit 4673690

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Builder/ClassConstBuilder.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@ public static function fromNode(Node\Stmt\ClassConst $node): self
4444
return $self;
4545
}
4646

47-
public static function fromScratch(string $name, $value): self
47+
public static function fromScratch(string $name, $value, $visibility = ClassConstGenerator::FLAG_PUBLIC): self
4848
{
4949
$self = new self();
5050
$self->name = $name;
5151
$self->value = $value;
52+
$self->visibility = $visibility;
5253

5354
return $self;
5455
}

0 commit comments

Comments
 (0)