phpphpstormphpcs

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.)


Solution

  • 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
     */