Fix the issues reported by PHP_CodeSniffer

Created on 30 September 2024, about 2 months ago

Problem/Motivation

FILE: feeds_files_by_media\README.md
------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------
12 | WARNING | [ ] Line exceeds 80 characters; contains 111 characters
14 | WARNING | [ ] Line exceeds 80 characters; contains 123 characters
15 | WARNING | [ ] Line exceeds 80 characters; contains 88 characters
15 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------

FILE: feeds_files_by_media\src\Feeds\Fetcher\MediaFieldFetcher.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first
| | wrong one is Drupal\feeds\Plugin\Type\PluginBase.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: feeds_files_by_media\src\Feeds\Parser\MediaFieldParser.php
--------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
63 | ERROR | [ ] Missing short description in doc comment
63 | ERROR | [ ] Parameter $media_field_id is not described in comment
64 | ERROR | [ ] Missing parameter comment
64 | ERROR | [x] Data types in @param tags need to be fully namespaced
66 | ERROR | [ ] Description for the @return value is missing
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: feeds_files_by_media\src\Feeds\Source\MediaFieldSource.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------
25 | WARNING | Line exceeds 80 characters; contains 128 characters
31 | WARNING | Line exceeds 80 characters; contains 128 characters
37 | WARNING | Line exceeds 80 characters; contains 128 characters
43 | WARNING | Line exceeds 80 characters; contains 128 characters
49 | WARNING | Line exceeds 80 characters; contains 128 characters
--------------------------------------------------------------------------------

FILE: feeds_files_by_media\src\Result\MediaFieldFetcherResult.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
16 | ERROR | Class property $media_field_machine_name should use lowerCamel
| | naming without underscores
21 | ERROR | Missing parameter comment
--------------------------------------------------------------------------------

Steps to reproduce

Run phpcs command to get the drupal coding standard issues.

Proposed resolution

Many of the issues can be fixed by running the phpcbf command. For the remaining ones, we will need to manually address and then commit these changes before pushing them.

📌 Task
Status

Needs work

Version

1.0

Component

Code

Created by

🇺🇸United States sunil jolapara 3265 Summitrun Drive, Independence, KY, 41051

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024