Problem/Motivation

Getting the following errors/warnings.

FILE: /pager_for_content_type/pager_for_content_type.routing.yml
-------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------
 7 | WARNING | The administration page callback should probably use "administer site configuration" - which implies the user can change something - rather than "access administration pages" which is
   |         | about viewing but not changing configurations.
-------------------------------------------------------------


FILE: /pager_for_content_type/pager_for_content_type.module
-------------------------------------------------------------
FOUND 20 ERRORS AFFECTING 17 LINES
-------------------------------------------------------------
  50 | ERROR | [x] Short array syntax must be used to define arrays
  52 | ERROR | [x] Short array syntax must be used to define arrays
  64 | ERROR | [x] Short array syntax must be used to define arrays
  66 | ERROR | [x] Short array syntax must be used to define arrays
  86 | ERROR | [x] Short array syntax must be used to define arrays
  94 | ERROR | [x] Short array syntax must be used to define arrays
 128 | ERROR | [ ] Type hint "array" missing for $pager
 132 | ERROR | [x] Short array syntax must be used to define arrays
 155 | ERROR | [x] Short array syntax must be used to define arrays
 156 | ERROR | [x] Short array syntax must be used to define arrays
 156 | ERROR | [x] Short array syntax must be used to define arrays
 162 | ERROR | [x] Short array syntax must be used to define arrays
 163 | ERROR | [x] Short array syntax must be used to define arrays
 163 | ERROR | [x] Short array syntax must be used to define arrays
 183 | ERROR | [ ] Type hint "array" missing for $node
 184 | ERROR | [x] Short array syntax must be used to define arrays
 193 | ERROR | [x] Short array syntax must be used to define arrays
 234 | ERROR | [x] Short array syntax must be used to define arrays
 235 | ERROR | [x] Short array syntax must be used to define arrays
 235 | ERROR | [x] Short array syntax must be used to define arrays
-------------------------------------------------------------------------



FILE: /pager_for_content_type/src/Form/PagerForContentTypeSettingsForm.php
-----------------------------------------------------------------------
FOUND 9 ERRORS AND 3 WARNINGS AFFECTING 12 LINES
-----------------------------------------------------------------------
  34 | WARNING | [ ] NodeType::loadMultiple calls should be avoided in classes, use dependency injection instead
  36 | ERROR   | [x] Short array syntax must be used to define arrays
  43 | ERROR   | [x] Short array syntax must be used to define arrays
  50 | ERROR   | [x] Short array syntax must be used to define arrays
  59 | ERROR   | [x] Short array syntax must be used to define arrays
  68 | ERROR   | [x] Short array syntax must be used to define arrays
  78 | ERROR   | [x] Short array syntax must be used to define arrays
  86 | ERROR   | [x] Short array syntax must be used to define arrays
  93 | ERROR   | [x] Short array syntax must be used to define arrays
 100 | ERROR   | [x] Short array syntax must be used to define arrays
 103 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 116 | WARNING | [ ] NodeType::loadMultiple calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------

Steps to reproduce

Run the following command

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

Proposed resolution

The above errors/warnings need to be fixe

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

omkar_yewale created an issue. See original summary.

omkar_yewale’s picture

Assigned: omkar_yewale » Unassigned
Status: Needs work » Needs review

!2 MR created, Please Review.

schiavone’s picture

@omkar_yewale This need to be rebased with the 8.x-1.x branch.

Thanks.

  • schiavone committed 5e1440b2 on 8.x-1.x
    Issue #3352593 by omkar_yewale, schiavone: Fix the issues reported by...
schiavone’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @ omkar_yewale this looks good. I went ahead and rebased it.

schiavone’s picture

Status: Reviewed & tested by the community » Fixed
schiavone’s picture

Status: Fixed » Needs work

Need to resolve merge conflicts.

schiavone’s picture

Conflicts resolved and merged.

schiavone’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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