Fix the issues reported by phpcs

Created on 7 July 2023, over 1 year ago
Updated 31 May 2024, 7 months ago

Running phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig route_iframes shows the following errors/warnings that should be fixed.

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\route_iframes\route_iframes.module
-------------------------------------------------------------------------
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\backendassignment\web\modules\contrib\route_iframes\src\Controller\RouteIframeController.php
-------------------------------------------------------------------------
FOUND 9 ERRORS AND 1 WARNING AFFECTING 10 LINES
-------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
  16 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
 104 | ERROR   | [ ] Missing parameter comment
 106 | ERROR   | [ ] Description for the @return value is missing
 122 | ERROR   | [ ] Missing parameter comment
 124 | ERROR   | [ ] Description for the @return value is missing
 150 | ERROR   | [ ] Parameter $tabId is not described in comment
 155 | ERROR   | [ ] Doc comment for parameter $tab does not match actual variable name $tabId
 173 | ERROR   | [ ] Missing parameter comment
 175 | ERROR   | [ ] Description for the @return value is missing
-------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\route_iframes\src\Entity\RouteIframeConfigEntity.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\backendassignment\web\modules\contrib\route_iframes\src\Entity\RouteIframeConfigEntityInterface.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\backendassignment\web\modules\contrib\route_iframes\src\Form\RouteIframeConfigEntityDeleteForm.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\backendassignment\web\modules\contrib\route_iframes\src\Form\RouteIframeConfigEntityForm.php
-------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
-------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
  15 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
 150 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
 158 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
-------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\route_iframes\src\Form\RouteIframesConfiguration.php
-------------------------------------------------------------------------
FOUND 1 ERROR AND 5 WARNINGS AFFECTING 6 LINES
-------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
  15 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
  92 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
  94 | WARNING | [x] '@todo: These tabs should have an order / weight to control tab order.' should match the format '@todo Fix problem X here.'
 126 | WARNING | [x] A comma should follow the last multiline array item. Found: )
 285 | WARNING | [x] '@todo: If tabs change, the related configuration entities need to change.' should match the format '@todo Fix problem X here.'
-------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\route_iframes\src\Plugin\Derivative\DynamicLocalTasks.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\backendassignment\web\modules\contrib\route_iframes\src\RouteIframeConfigEntityHtmlRouteProvider.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\backendassignment\web\modules\contrib\route_iframes\src\RouteIframeConfigEntityListBuilder.php
-------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
-------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
  77 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 103 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 143 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
-------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\route_iframes\src\Routing\IframeRoutes.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
-------------------------------------------------------------------------

Time: 2.7 secs; Memory: 6MB
📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇮🇳India sidharth_soman Bangalore

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024