File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -177,8 +177,8 @@ function checkSectionErrors(string $path): array
177
177
178
178
/* Constructors are special */
179
179
if (str_ends_with ($ path , 'construct.xml ' )) {
180
- if (!str_contains ($ content , '<constructorsynopsis> ' )
181
- && ! str_contains ( $ content , ' <constructorsynopsis role="oop"> ' )
180
+ if (!str_contains ($ content , '<constructorsynopsis> ' ) &&
181
+ ! preg_match ( ' / <constructorsynopsis role="[^"]*">/ ' , $ content )
182
182
) {
183
183
// This generates a lot of errors leave for later
184
184
//return ["Constructors should use <constructorsynopsis> instead of <methodsynopsis>"];
@@ -191,7 +191,8 @@ function checkSectionErrors(string $path): array
191
191
}
192
192
/* Destructors are special */
193
193
if (str_ends_with ($ path , 'destruct.xml ' )) {
194
- if (!str_contains ($ content , '<destructorsynopsis> ' )) {
194
+ if (!str_contains ($ content , '<destructorsynopsis> ' ) &&
195
+ !preg_match ('/<destructorsynopsis role="[^"]*">/ ' , $ content )) {
195
196
// Early bail-out
196
197
return ["Destructors should use <destructorsynopsis> instead of <methodsynopsis> " ];
197
198
}
You can’t perform that action at this time.
0 commit comments