Getting following error/warnings

FILE: /app/modules/contrib/easy_breadcrumb/easy_breadcrumb.module
----------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------
8 | WARNING | [x] Unused use statement
48 | ERROR | [x] Expected 1 space after IF keyword; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: /app/modules/contrib/easy_breadcrumb/src/EasyBreadcrumbBuilder.php
--------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 4 WARNINGS AFFECTING 6 LINES
--------------------------------------------------------------------------------------------------
274 | ERROR | [x] Whitespace found at end of line
294 | ERROR | [x] Expected 1 space after IF keyword; 0 found
360 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
887 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
899 | WARNING | [x] There must be no blank line following an inline comment
899 | WARNING | [ ] There must be no blank line following an inline comment
900 | ERROR | [x] Whitespace found at end of line
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------

FILE: /app/modules/contrib/easy_breadcrumb/src/EasyBreadcrumbConstants.php
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------
145 | WARNING | Line exceeds 80 characters; contains 96 characters
--------------------------------------------------------------------------

FILE: /app/modules/contrib/easy_breadcrumb/src/EasyBreadcrumbStructuredDataJsonLd.php
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
14 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
-----------------------------------------------------------------------------------------------------------------

FILE: /app/modules/contrib/easy_breadcrumb/src/Form/EasyBreadcrumbGeneralSettingsForm.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
128 | ERROR | [x] Opening brace must be the last content on the line
128 | ERROR | [x] There should be no white space after an opening "{"
128 | ERROR | [x] There should be no white space before a closing "}"
128 | ERROR | [x] Closing brace must be on a line by itself
128 | WARNING | [ ] Menu::loadMultiple calls should be avoided in classes, use dependency injection instead
128 | ERROR | [x] Each PHP statement must be on a line by itself
134 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
377 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: /app/modules/contrib/easy_breadcrumb/src/TitleResolver.php
---------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------
11 | WARNING | [x] Unused use statement
20 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------

FILE: /app/modules/contrib/easy_breadcrumb/tests/src/Kernel/EasyBreadcrumbBuilderTest.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------
23 | ERROR | The array declaration extends to column 83 (the limit is 80). The array content should be split up over multiple lines
-------------------------------------------------------------------------------------------------------------------------------------

Time: 922ms; Memory: 18MB

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

samit.310@gmail.com created an issue. See original summary.

samitk’s picture

Assigned: samitk » Unassigned
Status: Needs work » Needs review
StatusFileSize
new13.2 KB

Error/Warnings Fixed.

kunal_sahu’s picture

Assigned: Unassigned » kunal_sahu

I am reviewing this patch.

gaurav-mathur’s picture

Assigned: kunal_sahu » gaurav-mathur
gaurav-mathur’s picture

Assigned: gaurav-mathur » Unassigned

Verified and tested patch #2 on Drupal 10.1.x-dev and do not see any error or warnings.
Patch applied successfully.
Thank You.

greg boggs’s picture

Hi folks, thanks for working on this issue. If someone can open a merge request, I can get this added.

Sonal Gyanani made their first commit to this issue’s fork.

Sonal Gyanani’s picture

Thanks, patch #2 works fine all errors & warnings are fixed.
Created merge request for the same.

greg boggs’s picture

Status: Needs review » Needs work
Issue tags: -

needs a reroll.

samitk’s picture

Status: Needs work » Needs review
StatusFileSize
new14.21 KB
new8.3 KB

Hi @Greg Boggs,

Reroll with #2.

Status: Needs review » Needs work

The last submitted patch, 11: phpcs-issues-3323769-11.patch, failed testing. View results

samitk’s picture

Status: Needs work » Needs review
StatusFileSize
new14.27 KB
new7.74 KB

Fixed #11

Reroll with #2.

greg boggs’s picture

Status: Needs review » Needs work

Can we get this as a merge request?

kunal_sahu’s picture

Status: Needs work » Needs review

Hey Greg , So i tried to apply the patch resulted into some errors and then i thought to fix them and create an MR but unfortunately I pushed my changes to 2.x branch. I can assure you that the Coding standards issue are solved.

Please consider my MR.

https://git.drupalcode.org/issue/easy_breadcrumb-3323769/-/commit/c23485...

Thanks.

diego_mow’s picture

Status: Needs review » Reviewed & tested by the community
greg boggs’s picture

Status: Reviewed & tested by the community » Needs work

MR needs a rebase from the current code.

spuky’s picture

should get closed by 3454226 which fixes all outstanding pcs and phpstan issues

spuky’s picture

Status: Needs work » Closed (duplicate)

All Coding standard Issues are fixed in our Test suite