Skip to content

Commit 13eb7f0

Browse files
committed
Fix alignment of @param tags.
1 parent a4cc83c commit 13eb7f0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

WPForms/Sniffs/Comments/ParamTagHooksSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ private function processParamTag( $phpcsFile, $param ) {
257257
return $param;
258258
}
259259

260-
preg_match( '/([\w\s]+)(\$[\w_]+\s+)(.*)/', $tokens[ $commentString ]['content'], $paramElements );
260+
preg_match( '/([\w\s\[\]|]+)(\$[\w_]+\s+)(.*)/', $tokens[ $commentString ]['content'], $paramElements );
261261

262262
if ( empty( $paramElements[1] ) || empty( $paramElements[2] ) || empty( $paramElements[3] ) ) {
263263
$phpcsFile->addError(

WPForms/Tests/TestFiles/Comments/ParamTagHooks.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
*
66
* @since 1.3.0
77
*
8-
* @param object $response Response data.
9-
* @param array $request_args Request arguments.
10-
* @param array $contact GetResponse
11-
* contact data.
12-
* @param array $connection Connection data.
13-
* @param array $args Additional arguments.
8+
* @param object|string[] $response Response data.
9+
* @param array $request_args Request arguments.
10+
* @param array $contact GetResponse
11+
* contact data.
12+
* @param array $connection Connection data.
13+
* @param array $args Additional arguments.
1414
*/
1515
do_action(
1616
'wpforms_getresponse_provider_process_task_async_action_subscribe_after',

0 commit comments

Comments
 (0)