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

CommentFileSizeAuthor
#2 3343583-2.patch771 bytessahil.goyal

Issue fork trim-3343583

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

sahil.goyal created an issue. See original summary.

sahil.goyal’s picture

Status: Needs work » Needs review
StatusFileSize
new771 bytes

Fixing all minor phpcs issues/warnings. Please review.

ranjit1032002’s picture

Status: Needs review » Reviewed & tested by the community

I had Reviewed the patch and it's working as expected mentioned in comment #2

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

avpaderno’s picture

Priority: Normal » Minor
Issue tags: -Drupal coding standard issue +Coding standards
avpaderno’s picture

Status: Reviewed & tested by the community » Needs work
+  if ($form_object instanceof
+  ConfigFormBase    || $form_object instanceof
+  FieldConfigEditForm) {

The class name to which instanceof is referring should not go in a new line; the phpcs report did not even suggest the lines needed to be split. Those spaces before || are not necessary.

avpaderno’s picture

Also, it seems pointless to create a MR that contains the same changes the existing patch contains.

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

hardikpandya’s picture

Status: Needs work » Needs review
avpaderno’s picture

Category: Bug report » Task
mlncn’s picture

Status: Needs review » Needs work

Thanks, the underlying code changed a bit (sorry) but this suggested an improvement there too so crediting.

mlncn’s picture

Status: Needs work » Fixed
mlncn’s picture

Version: 8.x-1.x-dev » 2.0.x-dev

Status: Fixed » Closed (fixed)

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