vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig web/modules/contrib/views_cumulative_field/
FILE: .../contrib/views_cumulative_field/src/Plugin/views/field/CumulativeField.php
--------------------------------------------------------------------------------
FOUND 25 ERRORS AFFECTING 17 LINES
--------------------------------------------------------------------------------
9 | ERROR | [x] There must be one blank line after the last USE statement; 2
| | found;
35 | ERROR | [ ] Missing parameter comment
36 | ERROR | [ ] Missing parameter comment
36 | ERROR | [ ] Missing parameter type
37 | ERROR | [ ] Missing parameter comment
37 | ERROR | [ ] Missing parameter type
38 | ERROR | [ ] Missing parameter comment
45 | ERROR | [ ] Missing member variable doc comment
86 | ERROR | [ ] Missing parameter comment
86 | ERROR | [ ] Missing parameter type
88 | ERROR | [ ] Description for the @return value is missing
105 | ERROR | [ ] Missing parameter comment
105 | ERROR | [ ] Missing parameter type
107 | ERROR | [ ] Description for the @return value is missing
124 | ERROR | [ ] Missing parameter comment
124 | ERROR | [ ] Missing parameter type
126 | ERROR | [ ] Description for the @return value is missing
140 | ERROR | [ ] Missing short description in doc comment
141 | ERROR | [ ] Missing parameter comment
141 | ERROR | [ ] Missing parameter type
142 | ERROR | [ ] Missing parameter comment
142 | ERROR | [ ] Missing parameter type
143 | ERROR | [ ] Missing parameter comment
143 | ERROR | [ ] Missing parameter type
145 | ERROR | [ ] Description for the @return value is missing
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...eb/modules/contrib/views_cumulative_field/views_cumulative_field.views.inc
--------------------------------------------------------------------------------
FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
17 | WARNING | [ ] Line exceeds 80 characters; contains 87 characters
17 | ERROR | [x] Inline comments must end in full-stops, exclamation marks,
| | question marks, colons, or closing parentheses
18 | WARNING | [x] A comma should follow the last multiline array item. Found:
| | TRUE
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 402ms; Memory: 12MB
Comment | File | Size | Author |
---|---|---|---|
#18 | Screenshot 2024-03-04 173730.png | 32.55 KB | Shank115 |
#16 | phpcs-issue-fixes-5.patch | 5.36 KB | Yashaswi18 |
#10 | listed-issues-fixes-4.patch | 5.19 KB | shalini_jha |
#4 | afterpatch.png | 1.18 MB | skt-001 |
#3 | phpcsissues-3353889-3.patch | 4.81 KB | dineshkumarbollu |
Issue fork views_cumulative_field-3353889
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
dineshkumarbollu CreditAttribution: dineshkumarbollu at Valuebound for Valuebound commentedI will work on this issue.
Comment #3
dineshkumarbollu CreditAttribution: dineshkumarbollu at Valuebound for Valuebound commentedComment #4
skt-001 CreditAttribution: skt-001 at Material for Drupal India Association commentedthanks @dineshkumarbollu for the patch. Applied successfully and fixes all PHPCS error.
sharing the SS.
Comment #5
skt-001 CreditAttribution: skt-001 at Material for Drupal India Association commentedComment #6
apadernoComment #7
apadernoThe patch could apply, but it is not correct.
array of values is too generic for that parameter.
Plugin_id is not an English word.
The last line is missing an article and misspelling Plugin, since that word is not at the sentence beginning.
There is still a missing article.
The service name is also misspelled.
The entity type manager. is a better description; there is no need to say that a manager is a service, since in Drupal that is normal.
That description does not make sense. Furthermore, saying that the returned value is a string (which I guess is what that comment is supposed to say) is quite vague and useless, since that is information already given from the parameter type-hinting. The correct description should say what exactly the returned value is, not its type.
That is a too generic description.
There is a typo.
value of Mixed does not make sense and it does not say what the method returns.
Those descriptions are not helpful at all.
It is not that, for a
$random_value
parameter, the description can be Define random_value value. because that is wrong and too generic.The usual comment is Hook implementations for the [module name] module.
Hooks is misspelled, since it is not at the beginning of the sentence.
Comment #9
shalini_jha CreditAttribution: shalini_jha at Valuebound for Valuebound commentedI will work on this issue.
Comment #10
shalini_jha CreditAttribution: shalini_jha at Valuebound for Valuebound commentedAdded the patch for fixes of listed issues. please review.
Comment #11
djsagar CreditAttribution: djsagar at OpenSense Labs commentedHi @all,
After applied patch #10, all phpcs issue are fixed.
RTBC ++
Comment #12
elberHi I also reviewed it.
Patch applies cleanly.
I ran
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml
All the phpcs errors has been removed.
Module keeps good.
Moving to RTBC.
Comment #13
apadernoThe type and description of the first three parameters need to be:
$configuration:
A configuration array containing information about the plugin instance.$plugin_id
: The plugin ID.$plugin_definition
: The plugin implementation definition.Since those documentation comments are changed, Determine must be declined on the third person singular.
Defining the values. is not the correct description for a
getRelationshipEntity()
method.views_cumulative_field must be replaced from the module name, which is different from the module machine name.
Allow must be declined on the third person singular.
The other sentence is missing verb and subject (It is).
Comment #16
Yashaswi18 CreditAttribution: Yashaswi18 commentedAddressed above comments in this patch. Please review.
Comment #17
Yashaswi18 CreditAttribution: Yashaswi18 commentedComment #18
Shank115 CreditAttribution: Shank115 at Specbee for Drupal India Association commentedI applied patch provided in #16, applies cleanly. Ran phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig views_cumulative_field/, found no phpcs errors.
Comment #19
andileco CreditAttribution: andileco at JSI Research & Training Institute, Inc. (JSI) commentedWould someone please make a merge request from the latest patch? The code looks good, but I like to see the pipeline results that run on merge requests.
Comment #22
pray_12 CreditAttribution: pray_12 at Specbee commentedComment #24
andileco CreditAttribution: andileco at JSI Research & Training Institute, Inc. (JSI) commented