Problem/Motivation

While scanning through the module, using PHPCS with the Drupal coding standards applied, I found a few CS issues:

------ --------------------------------------------------------------------------------------------------- 
  Line   field_defaults.module
 ------ ---------------------------------------------------------------------------------------------------
  24     Access to an undefined property Drupal\Core\Entity\EntityInterface::$changed.
  36     Call to an undefined method Drupal\Core\Form\FormInterface::getEntity().
  90     Call to an undefined method Drupal\Core\Form\FormInterface::getEntity().
  109    Variable $provider might not be defined.
  184    Access to an undefined property Drupal\Core\Entity\ContentEntityInterface::$batch_field_defaults.
 ------ ---------------------------------------------------------------------------------------------------

 ------ ------------------------------------------------------------------------------
  Line   src/Commands/FieldDefaultsBulkCommands.php
 ------ ------------------------------------------------------------------------------
  66     \Drupal calls should be avoided in classes, use dependency injection instead
  84     \Drupal calls should be avoided in classes, use dependency injection instead
  85     \Drupal calls should be avoided in classes, use dependency injection instead
  94     \Drupal calls should be avoided in classes, use dependency injection instead
  120    \Drupal calls should be avoided in classes, use dependency injection instead
  139    Cannot call method getName() on string.
  167    \Drupal calls should be avoided in classes, use dependency injection instead
 ------ ------------------------------------------------------------------------------

 ------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
  Line   src/Form/SettingsForm.php
 ------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
  21     Property Drupal\field_defaults\Form\SettingsForm::$configFactory has unknown class Drupal\field_defaults\Form\Drupal\Core\Config\ConfigFactoryInterface as its type.
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
  28     Property Drupal\field_defaults\Form\SettingsForm::$messenger has unknown class Drupal\field_defaults\Form\Drupal\Core\Messenger\Messenger as its type.
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
  61     Call to method getEditable() on an unknown class Drupal\field_defaults\Form\Drupal\Core\Config\ConfigFactoryInterface.
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
  82     Call to method getEditable() on an unknown class Drupal\field_defaults\Form\Drupal\Core\Config\ConfigFactoryInterface.
         💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
 ------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Note, that this output was automatically generated.

Steps to reproduce

Proposed resolution

Fix the before mentioned phpcs issues.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 3328832-phpcs-fixes.patch10.59 KBb_sharpe
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

Grevil created an issue. See original summary.

b_sharpe’s picture

Status: Active » Needs review
StatusFileSize
new10.59 KB

  • b_sharpe committed e40d52f3 on 8.x-1.x
    Issue #3328832 by b_sharpe: Fix Drupal Coding Standard issues.
    
b_sharpe’s picture

Status: Needs review » Fixed

Tests still passed, marking fixed.

Status: Fixed » Closed (fixed)

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