Follow up to #2692091: Use the new 'view label' entity access check in the entity reference label formatter. By changing the code one use statements is now not needed anymore

$ ../vendor/bin/phpcs

FILE: ...modules/user/src/Plugin/Field/FieldFormatter/AuthorFormatter.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 5 | WARNING | [x] Unused use statement
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

klausi created an issue. See original summary.

klausi’s picture

Status: Active » Needs review
FileSize
584 bytes

Patch.

himanshu-dixit’s picture

Status: Needs review » Reviewed & tested by the community

LGTM, phpcs doesn't show any error now.

  • xjm committed d60cfc9 on 8.4.x
    Issue #2853984 by klausi: Remove unused use statement in AuthorFormatter...

  • xjm committed ae955e6 on 8.3.x
    Issue #2853984 by klausi: Remove unused use statement in AuthorFormatter...
xjm’s picture

Version: 8.4.x-dev » 8.3.x-dev
Status: Reviewed & tested by the community » Fixed

Hm looks like @catch's pre-commit hooks are still not working.

I confirmed that this is the only failure of this rule in core at the moment with:
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme --sniffs=Drupal.Classes.UnusedUseStatement core

Committed to 8.4.x and cherry-picked to 8.3.x. Thanks!

Status: Fixed » Closed (fixed)

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