Problem/Motivation

Getting Following errors/warnings

$ phpcs --standard=Drupal overpass_api

FILE: C:\Users\Admin\Desktop\task\overpass_api\src\DTO\OverpassQueryOptions.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found
    |       |     "\r\n"
 21 | ERROR | [ ] Doc comment short description must end with a full stop
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...Admin\Desktop\task\overpass_api\src\Exception\OverpassApiHttpException.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: ...esktop\task\overpass_api\src\Exception\OverpassApiMemoryLimitException.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:\Users\Admin\Desktop\task\overpass_api\src\Form\SettingsForm.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:\Users\Admin\Desktop\task\overpass_api\src\OverpassApi.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found
     |         |     "\r\n"
  14 | WARNING | [x] Unused use statement
 135 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
 135 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks,
     |         |     question marks, colons, or closing parentheses
 136 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
 136 | ERROR   | [x] Namespaced classes/interfaces/traits should be referenced
     |         |     with use statements
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: C:\Users\Admin\Desktop\task\overpass_api\src\Utils.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found
    |       |     "\r\n"
 29 | ERROR | [ ] Doc comment short description must end with a full stop
 29 | ERROR | [ ] Doc comment short description must be on a single line,
    |       |     further text should be a separate paragraph
 31 | ERROR | [ ] Missing parameter type
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 500ms; Memory: 10MB

Proposed resolution

Fix the errors and warnings.

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

Jay Jangid created an issue. See original summary.

jay jangid’s picture

Assigned: jay jangid » Unassigned
Status: Active » Needs review

Created MR , please review.

Thank you.

Sonal Gyanani’s picture

Assigned: Unassigned » Sonal Gyanani
Sonal Gyanani’s picture

Assigned: Sonal Gyanani » Unassigned
Status: Needs review » Reviewed & tested by the community

Thanks @Jay Jangid, MR looks good to me all errors and warnings are fixed now.
So moving it to RTBC

murz made their first commit to this issue’s fork.

murz’s picture

Status: Reviewed & tested by the community » Fixed

Sorry for the late review, one of the comment was wrong - fixed it, everything else looks good to me, merged.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

murz’s picture

Status: Fixed » Closed (fixed)