Problem/Motivation
Getting following error/warnings:
FILE: D:\xampp\htdocs\project_10\web\modules\contrib\daterangepickerwidget\src\DateRangePickerHelper.php
--------------------------------------------------------------------------------------------------------
FOUND 9 ERRORS AND 1 WARNING AFFECTING 10 LINES
--------------------------------------------------------------------------------------------------------
13 | ERROR | Description for the @return value is missing
16 | ERROR | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
33 | ERROR | Description for the @return value is missing
52 | ERROR | Missing parameter comment
53 | ERROR | Missing parameter comment
94 | ERROR | Doc comment is empty
109 | WARNING | Line exceeds 80 characters; contains 90 characters
111 | ERROR | Missing parameter comment
112 | ERROR | Missing parameter comment
121 | ERROR | Doc comment is empty
--------------------------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\project_10\web\modules\contrib\daterangepickerwidget\src\Element\DateRangePickerElement.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 3 WARNINGS AFFECTING 7 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
11 | WARNING | Line exceeds 80 characters; contains 89 characters
40 | ERROR | Doc comment is empty
50 | WARNING | Line exceeds 80 characters; contains 107 characters
71 | ERROR | The array declaration extends to column 125 (the limit is 80). The array content should be split up over multiple lines
75 | WARNING | Line exceeds 80 characters; contains 110 characters
82 | ERROR | Doc comment is empty
106 | ERROR | Doc comment is empty
-----------------------------------------------------------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\project_10\web\modules\contrib\daterangepickerwidget\src\Plugin\better_exposed_filters\filter\DateRangePickerFilter.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
25 | ERROR | The array declaration extends to column 179 (the limit is 80). The array content should be split up over multiple lines
42 | WARNING | Unused variable $element.
69 | WARNING | Line exceeds 80 characters; contains 113 characters
116 | ERROR | Doc comment is empty
---------------------------------------------------------------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\project_10\web\modules\contrib\daterangepickerwidget\src\Plugin\Field\FieldFormatter\DateRangePickerDefaultFormatter.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
12 | WARNING | Line exceeds 80 characters; contains 81 characters
24 | ERROR | Doc comment is empty
----------------------------------------------------------------------------------------------------------------------------------------------
FILE: D:\xampp\htdocs\project_10\web\modules\contrib\daterangepickerwidget\src\Plugin\Field\FieldWidget\DateRangePickerDefaultWidget.php
----------------------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 5 WARNINGS AFFECTING 8 LINES
----------------------------------------------------------------------------------------------------------------------------------------
51 | WARNING | Line exceeds 80 characters; contains 81 characters
53 | WARNING | Line exceeds 80 characters; contains 100 characters
66 | ERROR | Comment indentation error, expected only 1 spaces
67 | WARNING | Line exceeds 80 characters; contains 98 characters
67 | ERROR | Comment indentation error, expected only 9 spaces
99 | ERROR | Comment indentation error, expected only 1 spaces
101 | WARNING | Line exceeds 80 characters; contains 141 characters
102 | WARNING | There must be no blank line following an inline comment
102 | ERROR | Comment indentation error, expected only 5 spaces
105 | ERROR | Doc comment short description must start with a capital letter
105 | ERROR | Doc comment short description must end with a full stop
----------------------------------------------------------------------------------------------------------------------------------------
Steps to reproduce
Run following command:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml daterangepickerwidget/
Proposed resolution
Above error/warnings need to be fixed
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3375262-after-patch.png | 261.62 KB | clarkssquared |
| #2 | 3375262-2.patch | 41.57 KB | arti_parmar |
Issue fork daterangepickerwidget-3375262
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
Comment #2
arti_parmar commentedKindly review patch.
Comment #3
clarkssquared commentedHi arti_parmar
I applied your patch #2 and reviewed it, and after applying an error stated below remains.
FILE: /Users/studenttrainees/daterangepickerwidget/src/Plugin/Field/FieldWidget/DateRangePickerDefaultWidget.php
----------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------
23 | ERROR | [x] Additional blank lines found at end of doc comment
----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------
Time: 478ms; Memory: 10MB
please look at the screenshot I attached for your reference.
Thank you
Comment #7
josedsilvaIssue fixed and added to dev and will become available in the next release.
Comment #8
josedsilvaFixed issues reported by phpcs