Created on 16 November 2024, 11 days ago

Problem/Motivation

Fix coding standard issues:

FILE: /Users/gaurav_manerkar/Desktop/upload_size_per_role/upload_size_per_role.module
-----------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------------------------
  9 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\EntityFormInterface.
 33 | ERROR   | [x] Whitespace found at end of line
 36 | WARNING | [ ] Unused variable $user_role_key.
-----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------


|FILE: /Users/gaurav_manerkar/Desktop/upload_size_per_role/src/Form/UploadSizePerRoleSettingsForm.php
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 4 WARNINGS AFFECTING 10 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
   9 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Entity\EntityFieldManager.
  20 | ERROR   | [ ] Missing @var tag in member variable comment
  25 | ERROR   | [ ] Missing @var tag in member variable comment
  27 | ERROR   | [x] PHP keywords must be lowercase; expected "public" but found "Public"
  29 | ERROR   | [ ] Parameter $entity_field_manager is not described in comment
  79 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
  82 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
  97 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
 105 | WARNING | [ ] Unused variable $rows.
 129 | ERROR   | [x] Each PHP statement must be on a line by itself
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

šŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

šŸ‡®šŸ‡³India gaurav_manerkar Vasco Da Gama, Goa

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

Merge Requests

Comments & Activities

  • Issue created by @gaurav_manerkar
  • šŸ‡®šŸ‡³India gaurav_manerkar Vasco Da Gama, Goa

    Fixed all coding standard issues
    Added gitlab-ci.yml file

    Pls review

  • Pipeline finished with Success
    11 days ago
    Total: 141s
    #340747
  • Pipeline finished with Success
    11 days ago
    Total: 135s
    #340760
  • šŸ‡µšŸ‡­Philippines paraderojether

    Hi

    I reviewed MR!6, applied it against Upload size per role 1.0.x-dev and confirmed it fixes the issues reported by PHP_CodeSniffer.

     upload_size_per_role git:(1.0.x) curl https://git.drupalcode.org/project/upload_size_per_role/-/merge_requests/6.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  8787    0  8787    0     0  29328      0 --:--:-- --:--:-- --:--:-- 29989
    patching file .cspell-project-words.txt
    patching file .gitlab-ci.yml
    patching file 'src/Form/UploadSizePerRoleSettingsForm.php'
    patching file upload_size_per_role.module
    āžœ  upload_size_per_role git:(1.0.x) āœ— cd ..
    āžœ  contrib git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig upload_size_per_role
    āžœ  contrib git:(main) āœ—

    phpcs, phpstan, and cspell also passed on the Gitlab CI

    Moving this to RTBC!
    Thank you.

Production build 0.71.5 2024