Problem/Motivation

Running a phpcs check reveals several issues.

FILE: /var/www/docroot/modules/custom/views_entity_embed/css/views_entity_embed.dialog.css
------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------
 16 | ERROR | Style definitions must end with a semicolon
 22 | ERROR | Style definitions must end with a semicolon
 28 | ERROR | Style definitions must end with a semicolon
------------------------------------------------------------------------------------------


FILE: /var/www/docroot/modules/custom/views_entity_embed/README.txt
----------------------------------------------------------------------
FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 7 LINES
----------------------------------------------------------------------
  9 | WARNING | Line exceeds 80 characters; contains 85 characters
 22 | WARNING | Line exceeds 80 characters; contains 111 characters
 24 | WARNING | Line exceeds 80 characters; contains 160 characters
 25 | WARNING | Line exceeds 80 characters; contains 165 characters
 26 | WARNING | Line exceeds 80 characters; contains 127 characters
 32 | WARNING | Line exceeds 80 characters; contains 187 characters
 34 | WARNING | Line exceeds 80 characters; contains 120 characters
----------------------------------------------------------------------


FILE: /var/www/docroot/modules/custom/views_entity_embed/src/Form/ViewsEmbedDialog.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 6 WARNINGS AFFECTING 11 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
   5 | WARNING | [x] Unused use statement
 124 | ERROR   | [x] Expected 1 space between type hint and argument "$form_state"; 0 found
 147 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 150 | ERROR   | [x] Expected 1 blank line after function; 0 found
 161 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 255 | WARNING | [x] '@TODO to be fix.' should match the format '@todo Fix problem X here.'
 285 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 391 | ERROR   | [x] Array indentation error, expected 6 spaces but found 8
 397 | ERROR   | [x] Array indentation error, expected 6 spaces but found 8
 411 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 424 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/docroot/modules/custom/views_entity_embed/src/Plugin/EmbedType/EmbedViews.php
--------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------------------
  90 | WARNING | Unused variable $values.
 126 | WARNING | Unused variable $plugin_ids.
 127 | WARNING | Unused variable $id.
--------------------------------------------------------------------------------------------


FILE: /var/www/docroot/modules/custom/views_entity_embed/src/Plugin/CKEditorPlugin/DrupalViews.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
 31 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 32 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Run phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md

Proposed resolution

Update code for Drupal coding standards

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

shelane created an issue. See original summary.

shelane’s picture

StatusFileSize
new8.69 KB
mahtab_alam’s picture

Status: Active » Needs work
StatusFileSize
new775.32 KB

issue

Patch doesnt applied cleanly on 2.0.x

shelane’s picture

True. I’ve been making changes in a GitHub repo, so it was really based on other commits first. I’m hoping to get maintainership.

https://github.com/shelane/views_entity_embed

mahtab_alam’s picture

Status: Needs work » Needs review

  • shelane committed f707650 on 2.0.x
    Issue #3307651: Update with Drupal coding standards
    
shelane’s picture

Assigned: shelane » Unassigned
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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