Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bin/command.php
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,9 @@ private static function parse_docblock( $docblock ) {
$key = key( $ret['parameters'][ $param_name ] );
reset( $ret['parameters'][ $param_name ] );
if ( ! empty( $ret['parameters'][ $param_name ][ $key ][2] )
&& '{' === substr( $ret['parameters'][ $param_name ][ $key ][2], -1 ) ) {
&&
in_array( substr( $ret['parameters'][ $param_name ][ $key ][2], -1 ), [ '{', ',' ], true )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What will happen if a multi-line comment doesn't end with a comma?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @wojtekn

Thank you for your feedback and suggestion, I’ve updated the logic and refined the code based on it. I've also created a brief video to explain the updates, the assumptions made, and the approach taken.

Here’s the link to the video: Link

) {
$in_param = [ $param_name, $key ];
}
}
Expand Down