Fix the issues reported by PHPCS

Created on 17 March 2023, over 1 year ago

Problem/Motivation

Getting the following errors.

FILE: /picture_everywhere/src/Form/SettingsForm.php
----------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------
29 | ERROR | Missing @var tag in member variable comment
34 | ERROR | Missing @var tag in member variable comment
----------------------------------------------------------------------------------------------

Steps to reproduce

Run the following command:
phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,css,info picture_everywhere

📌 Task
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

🇮🇳India omkar_yewale Mumbai

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Comments & Activities

  • Issue created by @omkar_yewale
  • @omkar_yewale opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India omkar_yewale Mumbai

    Please review !2 MR.

  • Status changed to RTBC over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    What has been added after @var contains a namespace and it is an interface name.

    The MR is good to go.

  • Status changed to Closed: works as designed over 1 year ago
  • 🇺🇸United States bvoynick

    Hi Omkar, thanks for taking the time to contribute!

    In this particular case, this is a Drupal standard that has recently changed. Make sure you're using the latest version of drupal/coder.

    What changed recently is that the rule (and PHPCS sniff) now takes PHP type declarations into account. Because those interfaces are already declared in the property definition, it does not have to be specified again with @var in the property's DocBlock.

Production build 0.71.5 2024