Problem/Motivation
FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/trim/trim.module
------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------
16 | ERROR | [x] There should be no white space after an opening "("
16 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
17 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------
Time: 75ms; Memory: 10MB
Steps to reproduce
Run the Command : phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/trim
Proposed resolution
fix all the php coding standard issues/warnings
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
sahil.goyal commentedFixing all minor phpcs issues/warnings. Please review.
Comment #3
ranjit1032002I had Reviewed the patch and it's working as expected mentioned in comment #2
Comment #6
avpadernoComment #7
avpadernoThe class name to which
instanceofis referring should not go in a new line; thephpcsreport did not even suggest the lines needed to be split. Those spaces before||are not necessary.Comment #8
avpadernoAlso, it seems pointless to create a MR that contains the same changes the existing patch contains.
Comment #10
hardikpandya commentedComment #11
avpadernoComment #12
mlncn commentedThanks, the underlying code changed a bit (sorry) but this suggested an improvement there too so crediting.
Comment #13
mlncn commentedComment #14
mlncn commented