Skip to content

Commit 101ec4f

Browse files
committed
fix phpdoc controller for empty interfaces
1 parent f87acfa commit 101ec4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: build/controllers/PhpDocController.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -589,13 +589,13 @@ protected function generateClassPropertyDocs($fileName)
589589
return false;
590590
}
591591
if (count($classes) < 1) {
592-
$interfaces = $this->match('#\ninterface (?<name>\w+)( extends .+)?\n\{(?<content>.+)\n\}(\n|$)#', $file);
592+
$interfaces = $this->match('#\ninterface (?<name>\w+)( extends .+)?\n\{(?<content>.*)\n\}(\n|$)#', $file);
593593
if (count($interfaces) == 1) {
594594
return false;
595595
} elseif (count($interfaces) > 1) {
596596
$this->stderr("[ERR] There should be only one interface in a file: $fileName\n", Console::FG_RED);
597597
} else {
598-
$traits = $this->match('#\ntrait (?<name>\w+)\n\{(?<content>.+)\n\}(\n|$)#', $file);
598+
$traits = $this->match('#\ntrait (?<name>\w+)\n\{(?<content>.*)\n\}(\n|$)#', $file);
599599
if (count($traits) == 1) {
600600
return false;
601601
} elseif (count($traits) > 1) {

0 commit comments

Comments
 (0)