Fix the issues reported by phpcs

Created on 18 August 2022, over 2 years ago
Updated 6 November 2023, about 1 year ago
phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml .
FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\autoshortqr\autoshortqr.module
------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------
   1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 196 | ERROR | [x] Expected newline after closing brace
------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\autoshortqr\README.md
------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------
 14 | WARNING | Line exceeds 80 characters; contains 142 characters
 18 | WARNING | Line exceeds 80 characters; contains 123 characters
------------------------------------------------------------------------


FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\autoshortqr\src\AutoCodeLinkList.php
---------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
---------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\autoshortqr\src\Controller\CodeController.php
------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\autoshortqr\src\Plugin\Field\FieldFormatter\AutoCodeFormatter.php
--------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
--------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\autoshortqr\src\Plugin\Field\FieldType\AutoCodeLinkItem.php
--------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
 18 | WARNING | [ ] Line exceeds 80 characters; contains 117 characters
--------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\autoshortqr\src\Plugin\Field\FieldType\ShortLinkLinkItem.php
---------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
 19 | WARNING | [ ] Line exceeds 80 characters; contains 117 characters
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\autoshortqr\src\Plugin\views\field\AutoCodeField.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 24 | ERROR | [ ] The array declaration extends to column 109 (the limit is 80). The array content should be split up over multiple lines
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\autoshortqr\src\Plugin\views\field\AutoCodeShortLinkField.php
----------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\autoshortqr\src\RedirectThirdpartyWrapper.php
------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\autoshortqr\src\UserThirdpartyWrapper.php
--------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------
📌 Task
Status

Closed: outdated

Version

3.0

Component

Code

Created by

🇮🇳India Harsh panchal

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, show which command has been used, which arguments have been used, and which report that command shown.

  • Status changed to Needs review over 1 year ago
  • 🇨🇦Canada imustakim Canada

    Issue summary updated.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
    +The module requires drupal/barcodes and tecnickcom/tc-lib-barcode.
    +    For tecnickcom/tc-lib-barcode, the general packagist repo may be necessary.

    The last line does not need to be indented.

    +  /**
    +   * The alias manager.
    +   *
    +   * @var Drupal\Core\Session\AccountInterface
    +   */
    +  protected $currentUser;

    The description is not correct.

    - *   constraints = {"LinkType" = {}, "LinkAccess" = {}, "LinkExternalProtocols" = {}, "LinkNotExistingInternal" = {}}
    + *   constraints = {"LinkType" = {}, "LinkAccess" = {},
    + *   "LinkExternalProtocols" ={},"LinkNotExistingInternal" = {}}

    The changed lines are not correctly formatted.

    -    if (!empty($entity) && in_array($entity->getEntityTypeId(), ['node', 'taxonomy_term', 'user', 'redirect'])) {
    +    if (!empty($entity) && in_array($entity->getEntityTypeId(), [
    +      'node',
    +      'taxonomy_term',
    +      'user', 'redirect',
    +    ])) {
           $value = $entity->autoshortqr->view([

    Control structure conditions may exceed 80 characters, if they are simple to read and understand .

  • Status changed to Needs review over 1 year ago
  • 🇮🇳India sakthi_dev

    Please review.

  • Status changed to Closed: outdated about 1 year ago
Production build 0.71.5 2024