@@ -52,7 +52,12 @@ public function generateFiles(
52
52
$ files = [];
53
53
54
54
if ($ currentFileAst === null ) {
55
- $ currentFileAst = static function (File $ file , ClassInfo $ classInfo ) {
55
+ /**
56
+ * @param File $file
57
+ * @param ClassInfo $classInfo
58
+ * @return \PhpParser\Node\Stmt[]
59
+ */
60
+ $ currentFileAst = static function (File $ file , ClassInfo $ classInfo ): array {
56
61
return [];
57
62
};
58
63
}
@@ -93,7 +98,7 @@ public function addGetterMethodsForProperties(
93
98
callable $ skip = null
94
99
): void {
95
100
if ($ skip === null ) {
96
- $ skip = static function (ClassBuilder $ classBuilder ) {
101
+ $ skip = static function (ClassBuilder $ classBuilder ): bool {
97
102
return false ;
98
103
};
99
104
}
@@ -106,7 +111,8 @@ public function addGetterMethodsForProperties(
106
111
$ methodName = ($ methodNameFilter )($ classPropertyBuilder ->getName ());
107
112
108
113
if (true === ($ skip )($ classBuilder )
109
- || $ classBuilder ->hasMethod ($ methodName )) {
114
+ || $ classBuilder ->hasMethod ($ methodName )
115
+ ) {
110
116
continue 2 ;
111
117
}
112
118
$ classBuilder ->addMethod (
@@ -136,7 +142,7 @@ public function addClassConstantsForProperties(
136
142
int $ visibility = ClassConstGenerator::FLAG_PUBLIC
137
143
): void {
138
144
if ($ skip === null ) {
139
- $ skip = static function (ClassBuilder $ classBuilder ) {
145
+ $ skip = static function (ClassBuilder $ classBuilder ): bool {
140
146
return false ;
141
147
};
142
148
}
@@ -149,7 +155,8 @@ public function addClassConstantsForProperties(
149
155
$ constantName = ($ constantNameFilter )($ classPropertyBuilder ->getName ());
150
156
151
157
if (true === ($ skip )($ classBuilder )
152
- || $ classBuilder ->hasConstant ($ constantName )) {
158
+ || $ classBuilder ->hasConstant ($ constantName )
159
+ ) {
153
160
continue 2 ;
154
161
}
155
162
$ classBuilder ->addConstant (
0 commit comments