@@ -737,7 +737,9 @@ private function processStmtNode(
737
737
$ this ->processAttributeGroups ($ stmt , $ stmt ->attrGroups , $ scope , $ nodeCallback );
738
738
739
739
foreach ($ stmt ->props as $ prop ) {
740
- $ this ->processStmtNode ($ prop , $ scope , $ nodeCallback , $ context );
740
+ if ($ prop ->default !== null ) {
741
+ $ this ->processExprNode ($ stmt , $ prop ->default , $ scope , $ nodeCallback , ExpressionContext::createDeep ());
742
+ }
741
743
[,,,,,,,,,,$ isReadOnly , $ docComment , ,,,$ varTags , $ isAllowedPrivateMutation ] = $ this ->getPhpDocs ($ scope , $ stmt );
742
744
if (!$ scope ->isInClass ()) {
743
745
throw new ShouldNotHappenException ();
@@ -773,12 +775,6 @@ private function processStmtNode(
773
775
if ($ stmt ->type !== null ) {
774
776
$ nodeCallback ($ stmt ->type , $ scope );
775
777
}
776
- } elseif ($ stmt instanceof Node \Stmt \PropertyProperty) {
777
- $ hasYield = false ;
778
- $ throwPoints = [];
779
- if ($ stmt ->default !== null ) {
780
- $ this ->processExprNode ($ stmt , $ stmt ->default , $ scope , $ nodeCallback , ExpressionContext::createDeep ());
781
- }
782
778
} elseif ($ stmt instanceof Throw_) {
783
779
$ result = $ this ->processExprNode ($ stmt , $ stmt ->expr , $ scope , $ nodeCallback , ExpressionContext::createDeep ());
784
780
$ throwPoints = $ result ->getThrowPoints ();
@@ -1520,7 +1516,7 @@ private function processStmtNode(
1520
1516
$ hasYield = false ;
1521
1517
$ throwPoints = [];
1522
1518
foreach ($ stmt ->uses as $ use ) {
1523
- $ this -> processStmtNode ($ use , $ scope, $ nodeCallback , $ context );
1519
+ $ nodeCallback ($ use , $ scope );
1524
1520
}
1525
1521
} elseif ($ stmt instanceof Node \Stmt \Global_) {
1526
1522
$ hasYield = false ;
@@ -1604,14 +1600,11 @@ private function processStmtNode(
1604
1600
} elseif ($ stmt instanceof Node \Stmt \Nop) {
1605
1601
$ hasYield = false ;
1606
1602
$ throwPoints = $ overridingThrowPoints ?? [];
1607
- } elseif ($ stmt instanceof Node \Stmt \UseUse) {
1608
- $ hasYield = false ;
1609
- $ throwPoints = [];
1610
1603
} elseif ($ stmt instanceof Node \Stmt \GroupUse) {
1611
1604
$ hasYield = false ;
1612
1605
$ throwPoints = [];
1613
1606
foreach ($ stmt ->uses as $ use ) {
1614
- $ this -> processStmtNode ($ use , $ scope, $ nodeCallback , $ context );
1607
+ $ nodeCallback ($ use , $ scope );
1615
1608
}
1616
1609
} else {
1617
1610
$ hasYield = false ;
0 commit comments