Problem/Motivation

PHP Code Sniffer is detecting several issues:

Steps to reproduce

$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml .

FILE: /Users/jameswilson/App/Contrib/filename_transliteration/README.md
-----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------
 17 | WARNING | Line exceeds 80 characters; contains 124 characters
-----------------------------------------------------------------------


FILE: /Users/jameswilson/App/Contrib/filename_transliteration/filename_transliteration.module
---------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------
 8 | WARNING | [x] Unused use statement
---------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------


FILE: /Users/jameswilson/App/Contrib/filename_transliteration/filename_transliteration.services.yml
---------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------
 4 | ERROR | [x] Expected 1 newline at end of file; 2 found
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------


FILE: /Users/jameswilson/App/Contrib/filename_transliteration/src/FilenamePostprocessor.php
----------------------------------------------------------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 7 LINES
----------------------------------------------------------------------------------------------------------------------
  5 | ERROR | [x] When importing a class with "use", do not include a leading \
  6 | ERROR | [x] When importing a class with "use", do not include a leading \
 45 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
 46 | ERROR | [x] There must be exactly one blank line before the tags in a doc comment
 46 | ERROR | [x] Expected "string" but found "String" for parameter type
 48 | ERROR | [x] Separate the @param and @return sections by a blank line.
 48 | ERROR | [x] Expected "string" but found "String" for function return type
 72 | ERROR | [x] Expected 1 blank line after function; 0 found
 73 | ERROR | [x] The closing brace for the class must have an empty line before it
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------

Time: 85ms; Memory: 8MB

Proposed resolution

Use phpcbf to automatically fix as many issues as possible, then fix the rest manually.

Remaining tasks

Patch
Commit

User interface changes

None

API changes

None

Data model changes

None

CommentFileSizeAuthor
#2 3161667-2.patch2.52 KBjwilson3

Comments

jwilson3 created an issue. See original summary.

jwilson3’s picture

Status: Active » Needs review
StatusFileSize
new2.52 KB

  • jwilson3 committed f41d759 on 1.0.x
    Issue #3161667: Fix coding standards in Filename Transliteration module
    
jwilson3’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.