Created on 24 August 2023, about 1 year ago
Updated 6 September 2023, about 1 year ago

Problem/Motivation

  • Your README.txt does not follow best practices (headings need to be uppercase). See https://www.drupal.org/node/2181737 .
    • The INTRODUCTION section is missing.
    • The REQUIREMENTS section is missing.
    • The INSTALLATION section is missing.
    • The CONFIGURATION section is missing.
  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards ). See attachment.
  • ESLint has found some issues with your code (please check the JavaScript coding standards ).
    /Users/jameswilson/App/Contrib/drupal10/web/modules/contrib/theme_field/theme_field.services.yml: line 4, col 15, Error - Insert `⏎·····` (prettier/prettier)
    
    1 problem
    
  • DrupalPractice has found some issues with your code, but could be false positives.
    
    FILE: ...ontrib/theme_field/src/Plugin/Field/FieldWidget/ThemeFieldWidget.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    --------------------------------------------------------------------------
     30 | WARNING | t() calls should be avoided in classes, use
        |         | \Drupal\Core\StringTranslation\StringTranslationTrait and
        |         | $this->t() instead
     31 | WARNING | \Drupal calls should be avoided in classes, use
        |         | dependency injection instead
    --------------------------------------------------------------------------
    
    
    FILE: ...0/web/modules/contrib/theme_field/src/Theme/ThemeFieldNegotiator.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    --------------------------------------------------------------------------
     190 | WARNING | FieldConfig::loadMultiple calls should be avoided in
         |         | classes, use dependency injection instead
     195 | WARNING | Unused variable $theme_field_name.
    --------------------------------------------------------------------------
    
    Time: 71ms; Memory: 6MB
    
  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests ? This is not a requirement but encouraged for professional software development.


FILE: ...ontrib/theme_field/src/Plugin/Field/FieldWidget/ThemeFieldWidget.php
--------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------
  8 | WARNING | [x] Unused use statement
  8 | ERROR   | [x] Use statements should be sorted alphabetically. The
    |         |     first wrong one is Drupal\Core\Extension\InfoParser.
 28 | ERROR   | [x] Use null coalesce operator instead of ternary
    |         |     operator.
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...0/web/modules/contrib/theme_field/src/Theme/ThemeFieldNegotiator.php
--------------------------------------------------------------------------
FOUND 10 ERRORS AND 1 WARNING AFFECTING 11 LINES
--------------------------------------------------------------------------
   6 | ERROR   | [x] Use statements should be sorted alphabetically. The
     |         |     first wrong one is
     |         |     Drupal\Core\Entity\EntityFieldManagerInterface.
  45 | ERROR   | [x] Expected 1 blank line before function; 2 found
  65 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, question marks, colons, or closing
     |         |     parentheses
  96 | ERROR   | [ ] Description for the @return value must be on the
     |         |     next line
 136 | ERROR   | [ ] Return type "string machine name of the theme
     |         |     defined by the specified" must not contain spaces
 157 | ERROR   | [ ] Doc comment short description must be on a single
     |         |     line, further text should be a separate paragraph
 159 | ERROR   | [ ] Return type "string machine name of the theme
     |         |     defined by the specified" must not contain spaces
 175 | WARNING | [x] 'TODO: Create a UI to let site builder specify which
     |         |     reference' should match the format '@todo Fix
     |         |     problem X here.'
 201 | ERROR   | [x] Expected 1 space after FOREACH keyword; 0 found
 214 | ERROR   | [x] Expected 1 blank line after function; 0 found
 215 | ERROR   | [x] The closing brace for the class must have an empty
     |         |     line before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 104ms; Memory: 8MB
📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇪🇨Ecuador jwilson3

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024