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
Comments
Comment #3
omkar_yewale commented!2 MR created, Please Review.
Comment #4
schiavone commented@omkar_yewale This need to be rebased with the 8.x-1.x branch.
Thanks.
Comment #7
schiavone commentedThanks @ omkar_yewale this looks good. I went ahead and rebased it.
Comment #8
schiavone commentedComment #9
schiavone commentedNeed to resolve merge conflicts.
Comment #10
schiavone commentedConflicts resolved and merged.
Comment #11
schiavone commented