File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -177,8 +177,8 @@ function checkSectionErrors(string $path): array
177177
178178 /* Constructors are special */
179179 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 )
182182 ) {
183183 // This generates a lot of errors leave for later
184184 //return ["Constructors should use <constructorsynopsis> instead of <methodsynopsis>"];
@@ -191,7 +191,8 @@ function checkSectionErrors(string $path): array
191191 }
192192 /* Destructors are special */
193193 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 )) {
195196 // Early bail-out
196197 return ["Destructors should use <destructorsynopsis> instead of <methodsynopsis> " ];
197198 }
You can’t perform that action at this time.
0 commit comments