Problem/Motivation

Steps to reproduce

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

FILE: /var/www/html/web/modules/custom/address_display/tests/src/Kernel/Formatter/AddressDisplayTest.php
-------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------------
 22 | ERROR | Do not disable strict config schema checking in tests. Instead ensure your module properly declares its schema for configurations.
-------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/custom/address_display/README.txt
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 12 | WARNING | Line exceeds 80 characters; contains 85 characters
----------------------------------------------------------------------


FILE: /var/www/html/web/modules/custom/address_display/address_display.info.yml
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
 7 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
----------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/custom/address_display/src/Plugin/Field/FieldFormatter/AddressDisplayFormatter.php
------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------
  98 | ERROR | [ ] Description for the @return value is missing
 101 | ERROR | [x] Opening brace should be on the same line as the declaration
------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------

Proposed resolution

Fix all the valid Drupal coding standard issues.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#9 3345418-9.patch1.49 KBimustakim
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

arunkumark created an issue. See original summary.

annmarysruthy’s picture

Assigned: Unassigned » annmarysruthy

annmarysruthy’s picture

Assigned: annmarysruthy » Unassigned
Status: Active » Needs work

Raised MR!3. Some of the phpcs issues are fixed. only 1 issue in /var/www/html/web/modules/custom/address_display/tests/src/Kernel/Formatter/AddressDisplayTest.php is pending.

avpaderno’s picture

Title: Drupal coding standard issues » Fix the issues reported by phpcs
avpaderno’s picture

Issue tags: +Coding standards
-  - address
+  - drupal:address

As already said in a MR comment, the Address module is not part of Drupal core. Its project name is not drupal.

imustakim’s picture

Assigned: Unassigned » imustakim

Working on this.

imustakim’s picture

Issue summary: View changes
imustakim’s picture

Status: Needs work » Needs review
StatusFileSize
new1.49 KB

Patch added.
Please review.

imustakim’s picture

Assigned: imustakim » Unassigned
lamp5’s picture

Status: Needs review » Needs work
krzysztof domański’s picture

PHP Fatal error: Declaration of Drupal\Tests\address_display\Kernel\Formatter\AddressDisplayTest::setUp() must be compatible with Drupal\KernelTests\KernelTestBase::setUp(): void in /var/www/html/modules/contrib/address_display/tests/src/Kernel/Formatter/AddressDisplayTest.php on line 131

Overridden test methods require void return type hints

krzysztof domański’s picture

Ignore https://www.drupal.org/pift-ci-job/2610715 Run the test on a higher version of MySQL.

"The database server version 5.6.40 is less than the minimum required version 5.7.8."

lamp5’s picture

I changed default php and mysql version for tests,

krzysztof domański’s picture

Status: Needs work » Needs review
lamp5’s picture

This issue duplicated this 2 issues: #3341795: Update .info.yml file and #3341789: Replace README.txt to README.md and update README.md so only one thing to fix is opening brace.

  • lamp5 committed e47d7da5 on 8.x-1.x
    Issue #3345418 by annmarysruthy, imustakim, lamp5, Krzysztof Domański:...
lamp5’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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