Skip to content

Commit 1a4ff7e

Browse files
committed
Fix GenerateEntitiesCommand when class doesn't inherit
1 parent f44d72e commit 1a4ff7e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Command/GenerateEntitiesCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ protected function preGenerate($path)
142142
$content = str_replace("\r", "", $content);
143143

144144
//Delete comments in "extends" and "impements" (if found)
145-
$pattern = '/(class\s+[a-z0-9_-]+?)\\/\\*(.+)\\*\\/(\\r*\\n\\{)/iUs';
145+
$pattern = '/(class\s+[a-z0-9_-]+?)\\/\\*(.*)\\*\\/(\\r*\\n\\{)/iUs';
146146
$content = preg_replace($pattern, "$1$2$3", $content);
147147

148148
//Comment "extends" and "impements"
@@ -166,7 +166,7 @@ protected function postGenerate($path)
166166
$content = str_replace("\r", "", $content);
167167

168168
//Delete comments in "extends" and "impements"
169-
$pattern = '/(class\s+[a-z0-9_-]+?)\\/\\*(.+)\\*\\/(\\r*\\n\\{)/iUs';
169+
$pattern = '/(class\s+[a-z0-9_-]+?)\\/\\*(.*)\\*\\/(\\r*\\n\\{)/iUs';
170170
$content = preg_replace($pattern, "$1$2$3", $content);
171171

172172
//Add "=null" in setters when foreign key is used

0 commit comments

Comments
 (0)