This is a sub issue of #2734539: Make coder more PHPCS compliant

This is an attempt to fix all errors other than

PEAR.Commenting.FunctionComment.Missing
PEAR.Commenting.FunctionComment.MissingParamComment
Squiz.PHP.DisallowInlineIf.Found

in all files other than

DrupalPractice/Sniffs/CodeAnalysis/VariableAnalysisSniff.php

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

anoopjohn created an issue. See original summary.

anoopjohn’s picture

Status: Active » Needs review
FileSize
5.73 KB

Please find attached a patch to fix these errors

klausi’s picture

Status: Needs review » Needs work
  1. +++ b/coder_sniffer/Drupal/Sniffs/Commenting/PostStatementCommentSniff.php
    @@ -2,6 +2,8 @@
    + * PHP version 5
    + *
    

    I think this is quite useless information that we should not add on purpose. The code should also run on PHP 7 for example.

  2. +++ b/coder_sniffer/Drupal/Sniffs/Functions/FunctionDeclarationSniff.php
    @@ -13,7 +13,7 @@
    - * @deprecated in Coder 8.x, will be removed in Coder 9.x.
    + * Deprecated in Coder 8.x, will be removed in Coder 9.x.
    

    why are we removing the @deprecated tag? I think it should stay. If PHPCS is complaining about it the we should disable that complaint in our phpcs.xml.dist.

chipway’s picture

Status: Needs work » Needs review
FileSize
3.06 KB

Patch do not apply anymore and rebase conflicts. Rewrote the patch including #3.

klausi’s picture

Status: Needs review » Needs work

Thanks, please create a pull request against https://github.com/klausi/coder and link it here.

chipway’s picture

Status: Needs work » Needs review

Thanks Klausi, but I don't use github because we have our own git tool. I will try but I can't do this soon. BTW, do you have some quick guide?

klausi’s picture

Sure: fork the repository on Github, push your changes to your fork, a new button to create a pull request shows up at https://github.com/klausi/coder .
More info should be at https://help.github.com/articles/about-pull-requests/

chipway’s picture

Thanks, :-)
Is this link the one you need? https://github.com/chipway/coder/pull/1

klausi’s picture

Almost there, but you should file the pull request against https://github.com/klausi/coder :)

chipway’s picture

  • klausi committed 9d102ce on 8.x-2.x authored by cros
    style(doc comments): Improve coding standards compliance (#2747101 by...
klausi’s picture

Status: Needs review » Fixed

merged, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.