We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8f2348 commit d1f8b2aCopy full SHA for d1f8b2a
source/Utility/traitCodeParser.php
@@ -24,7 +24,8 @@ static public function getFirstFoundMultilineComment( $sCode ) {
24
static public function getMultiLineCommentUnwrapped( $sMultiLineComment ) {
25
$_sText = '';
26
preg_match( '/\/\*+?(.*)\*\//Us', $sMultiLineComment, $_aMatches );
27
- foreach( preg_split("/\r\n|\n|\r/", trim( $_aMatches[ 1 ], '\t\n\r\0\x0B' ) ) as $_i => $_sLine ) {
+ $_sMultiLineComment = isset( $_aMatches[ 1 ] ) ? trim( $_aMatches[ 1 ], '\t\n\r\0\x0B' ) : '';
28
+ foreach( preg_split("/\r\n|\n|\r/", $_sMultiLineComment ) as $_i => $_sLine ) {
29
$_sText .= preg_replace( '/^(\s|\/)+\*+(\s|$)/', '', $_sLine ) . PHP_EOL;
30
}
31
return trim( $_sText );
0 commit comments