Skip to content

Commit 8185e0c

Browse files
committed
GlobalFunction::from() added $withBody
1 parent 61ad0bf commit 8185e0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PhpGenerator/GlobalFunction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ final class GlobalFunction
2525
use Traits\CommentAware;
2626
use Traits\AttributeAware;
2727

28-
public static function from(string $function): self
28+
public static function from(string $function, bool $withBody = false): self
2929
{
30-
return (new Factory)->fromFunctionReflection(new \ReflectionFunction($function));
30+
return (new Factory)->fromFunctionReflection(new \ReflectionFunction($function), $withBody);
3131
}
3232

3333

0 commit comments

Comments
 (0)