Problem/Motivation

There are a number of PHPCS issues being reported during automated tests.

Proposed resolution

Resolve outstanding PHPCS issues.

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

markdorison created an issue. See original summary.

markdorison’s picture

Status: Active » Needs review
nayana_mvr’s picture

StatusFileSize
new3 KB

Verified MR!17. Except the following issues, all other errors are fixed:

FILE: ../contrib/csv_serialization/README.md
-----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------
 49 | WARNING | Line exceeds 80 characters; contains 86 characters
-----------------------------------------------------------------------------------------------


FILE: ../contrib/csv_serialization/csv_serialization.install
---------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] Missing file doc comment
  5 | ERROR   | [ ] Missing short description in doc comment
 12 | WARNING | [ ] Hook implementations should not duplicate @param documentation
 12 | ERROR   | [ ] Missing parameter comment
 12 | ERROR   | [ ] Missing parameter type
 14 | WARNING | [ ] Hook implementations should not duplicate @return documentation
 14 | ERROR   | [ ] Description for the @return value is missing
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------

Time: 222ms; Memory: 12MB

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

avpaderno’s picture

Title: Resolve PHPCS issues » Fix the issues reported by phpcs
Status: Needs review » Needs work
Issue tags: +Coding standards
imustakim’s picture

Assigned: Unassigned » imustakim

Working on this.

imustakim’s picture

Assigned: imustakim » Unassigned
Status: Needs work » Needs review
StatusFileSize
new618 bytes

Added a patch.

akram khan’s picture

Status: Needs review » Needs work

after applying patch 9 still issues are there.

phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml /Users/akram.khan/Desktop/Contribution/drupal10.1/drupal/modules/contrib/csv_serialization/

FILE: ...n/drupal10.1/drupal/modules/contrib/csv_serialization/csv_serialization.install
-------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
-------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
5 | ERROR | [ ] Missing short description in doc comment
12 | WARNING | [ ] Hook implementations should not duplicate @param documentation
12 | ERROR | [ ] Missing parameter comment
12 | ERROR | [ ] Missing parameter type
14 | WARNING | [ ] Hook implementations should not duplicate @return documentation
14 | ERROR | [ ] Description for the @return value is missing
-------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------

FILE: .../drupal10.1/drupal/modules/contrib/csv_serialization/src/Encoder/CsvEncoder.php
-------------------------------------------------------------------------------------
FOUND 9 ERRORS AND 1 WARNING AFFECTING 10 LINES
-------------------------------------------------------------------------------------
5 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be
| | referenced with use statements
10 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be
| | referenced with use statements
14 | WARNING | [x] Unused use statement
258 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
259 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
260 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
261 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
263 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
290 | ERROR | [ ] Description for the @return value is missing
389 | ERROR | [x] Use null coalesce operator instead of ternary operator.
-------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------

akram khan’s picture

StatusFileSize
new3.68 KB
new2.94 KB

added updated patch it's remove remaining error

akram khan’s picture

Status: Needs work » Needs review
himanshu_jhaloya’s picture

Assigned: Unassigned » himanshu_jhaloya
himanshu_jhaloya’s picture

StatusFileSize
new34.13 KB

#12 Patch applied cleanly no error&warning Found , Moving to RTBC

himanshu_jhaloya’s picture

Assigned: himanshu_jhaloya » Unassigned
Status: Needs review » Reviewed & tested by the community
avpaderno’s picture

Status: Reviewed & tested by the community » Needs work
+/**
+ * @file
+ * Description message.
+ */
+
 /**
  * @file
+ * Description message.
  */

That is not how documentation comments are correct. Description message needs to be replaced with a true description message.

avpaderno’s picture

It would also be better to show which tool has been used for checking the code, which parameters have been used, and which report has been produced by that tool.

himanshu_jhaloya’s picture

Status: Needs work » Needs review
StatusFileSize
new3.69 KB

Created the patch update the comment please review

avpaderno’s picture

Status: Needs review » Needs work
 /**
  * @file
+ * CSV Serialization requires the League\Csv library.

The comment for a .install file is different. It does not report the module dependencies.

The previous patch changed two of those comments, but the latest one just changes one of them.

    * @return mixed
+   *   The decode value.

It should be decoded.

imustakim’s picture

Assigned: Unassigned » imustakim
imustakim’s picture

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

Patch updated.
Please review.

imustakim’s picture

Assigned: imustakim » Unassigned
avpaderno’s picture

Status: Needs review » Needs work
mrinalini9’s picture

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

Rerolled patch #21, please review it.

Thanks!

  • markdorison committed 38efd021 on 3.x
    Issue #3344114 by markdorison, imustakim, Akram Khan, annmarysruthy,...
markdorison’s picture

Status: Needs review » Fixed

In the future, if an issue has been started with a merge request, I encourage you to stick with that instead of switching to using patch files.

Status: Fixed » Closed (fixed)

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