简体   繁体   中英

phpcs: Missing parameter comment

I have the following code:

/**
 * @param TranscodingJob $transcodingJob
 *
 * @return TranscodingJob
 * @throws \Lexik\Bundle\WorkflowBundle\Exception\WorkflowException
 */
public function onTranscodingJobError(TranscodingJob $transcodingJob) { ...

... and I find that when I hover over the annotation, this note appears:

phpcs: Missing parameter comment

How can I modify my annotations to make the complaint go away?

(I have tried simply adding text above the annotation for the parameter, and that doesn't seem to fix it.)

You need to add comment for your @param variable

Change your code as

 /**
 * @param TranscodingJob $transcodingJob comment about this variable
 *
 * @return TranscodingJob
 * @throws \Lexik\Bundle\WorkflowBundle\Exception\WorkflowException
 */

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM