Problem/Motivation

Drupal Coding standards should be fixed.

phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig .

FILE: .../web/modules/custom/date_filter/src/Plugin/views/filter/DateBase.php
------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------
24 | ERROR | Missing @var tag in member variable comment
29 | ERROR | Missing @var tag in member variable comment
34 | ERROR | Missing @var tag in member variable comment
------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/date_filter/Readme.md
---------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 88 characters
4 | WARNING | Line exceeds 80 characters; contains 94 characters
---------------------------------------------------------------------------

FILE: .../web/modules/custom/date_filter/tests/src/Functional/DateFilterTest.php
---------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------
43 | ERROR | Missing @var tag in member variable comment
---------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/date_filter/tests/src/Kernel/DateFilterTest.php
-----------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------
74 | ERROR | Missing @var tag in member variable comment
79 | ERROR | Missing @var tag in member variable comment
-----------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/date_filter/tests/date_filter_test/date_filter_test.info.yml
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
10 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------

Steps to reproduce

phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig .

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

alyaj2a created an issue. See original summary.

alyaj2a’s picture

Assigned: Unassigned » alyaj2a

alyaj2a’s picture

Status: Active » Needs review
alyaj2a’s picture

Assigned: alyaj2a » Unassigned
cleavinjosh’s picture

Status: Needs review » Needs work

Hi @alyaj2a,

Thank you for providing an MR. I applied MR!15, it was applied smoothly and fixed most of the phpcs issues.

These is the remaining issue after I ran phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig:

➜  date_filter git:(1.0.x) curl https://git.drupalcode.org/project/date_filter/-/merge_requests/15.diff | patch -p1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3070    0  3070    0     0   6454      0 --:--:-- --:--:-- --:--:--  6449
patching file Readme.md
patching file src/Plugin/views/filter/DateBase.php
patching file tests/date_filter_test/date_filter_test.info.yml
patching file tests/src/Functional/DateFilterTest.php
patching file tests/src/Kernel/DateFilterTest.php
➜  date_filter git:(1.0.x) ✗ ..
➜  contrib git:(main) ✗ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml date_filter

FILE: /Users/interns/Demo-site/drupal_11_test/install-dir/drupal_11_test_site/web/modules/contrib/date_filter/date_filter.module
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
 11 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\date_filter\Plugin\views\filter\DateTime.
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------

Time: 268ms; Memory: 10MB

➜  contrib git:(main) ✗

Thank you.

akshaydalvi212’s picture

Assigned: Unassigned » akshaydalvi212

I will remove the remaining issue.

akshaydalvi212’s picture

Assigned: akshaydalvi212 » Unassigned
Status: Needs work » Needs review

hi @cleavinjosh,
Resolved the last issue, you can review the MR now.
Thanks and regards.

cleavinjosh’s picture

Status: Needs review » Reviewed & tested by the community

Hi @akshaydalvi212,

Thank you for providing updating the MR. I applied MR!15, it was applied smoothly and fixed all the phpcs issues.

➜  date_filter git:(1.0.x) curl https://git.drupalcode.org/project/date_filter/-/merge_requests/15.diff | patch -p1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3622    0  3622    0     0   7786      0 --:--:-- --:--:-- --:--:--  7806
patching file Readme.md
patching file date_filter.module
patching file src/Plugin/views/filter/DateBase.php
patching file tests/date_filter_test/date_filter_test.info.yml
patching file tests/src/Functional/DateFilterTest.php
patching file tests/src/Kernel/DateFilterTest.php
➜  date_filter git:(1.0.x) ✗ ..
➜  contrib git:(main) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml date_filter
➜  contrib git:(main) ✗

Thank you.

graber made their first commit to this issue’s fork.

graber’s picture

Status: Reviewed & tested by the community » Fixed

TY all!

alyaj2a’s picture

Thanks!

Status: Fixed » Closed (fixed)

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