Skip to content

Commit 717e754

Browse files
committed
dump default value for property hooks if present
1 parent f0bc90a commit 717e754

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ProxyHelper.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ public static function generateLazyGhost(\ReflectionClass $class): string
7979
$hooks .= "\n "
8080
.($p->isProtected() ? 'protected' : 'public')
8181
.($p->isProtectedSet() ? ' protected(set)' : '')
82-
." {$type} \${$name} {\n";
82+
." {$type} \${$name}"
83+
.($p->hasDefaultValue() ? ' = '.$p->getDefaultValue() : '')
84+
." {\n";
8385

8486
foreach ($p->getHooks() as $hook => $method) {
8587
if ('get' === $hook) {

0 commit comments

Comments
 (0)