Problem/Motivation

FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/leaflet_maptiler/leaflet_maptiler.links.menu.yml
-------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------
 12 | ERROR | [x] Expected 1 newline at end of file; 2 found
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/leaflet_maptiler/leaflet_maptiler.routing.yml
----------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------
 19 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/leaflet_maptiler/config/install/leaflet_maptiler.settings.yml
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------
 4 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/leaflet_maptiler/README.txt
----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------
 19 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/leaflet_maptiler/modules/leaflet_maptiler_token/README.txt
-----------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 4 WARNINGS AFFECTING 5 LINES
-----------------------------------------------------------------------------------------------------------------------------------
  4 | WARNING | [ ] Line exceeds 80 characters; contains 93 characters
 10 | WARNING | [ ] Line exceeds 80 characters; contains 227 characters
 12 | WARNING | [ ] Line exceeds 80 characters; contains 92 characters
 13 | WARNING | [ ] Line exceeds 80 characters; contains 93 characters
 15 | ERROR   | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/leaflet_maptiler/modules/leaflet_maptiler_token/src/TokenOperations.php
------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 4 WARNINGS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------------------------------------------------------
  77 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  78 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  84 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  85 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 138 | ERROR   | The array declaration extends to column 103 (the limit is 80). The array content should be split up over multiple lines
------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/leaflet_maptiler/src/Form/LeafletMaptilerSettingsForm.php
----------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------
 13 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
----------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/leaflet_maptiler/src/LibraryOperations.php
-------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------
 59 | ERROR | [x] Case breaking statements must be followed by a single blank line
-------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/leaflet_maptiler/src/MaptilerLeafletServiceDecorator.php
---------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
---------------------------------------------------------------------------------------------------------------------------------
 16 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
 38 | ERROR   | [ ] Doc comment for parameter $leaflet_service does not match actual variable name $language_manager
 87 | ERROR   | [x] Short array syntax must be used to define arrays
---------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/leaflet_maptiler/src/LeafletOperations.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
 59 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 60 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------

Time: 134ms; Memory: 10MB

Steps to reproduce

Run the following command : phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml s/10.1.x/drupal/modules/contrib/leaflet_maptiler

Proposed resolution

Remaining tasks

Fix all the PHPCS issues/warnings

User interface changes

API changes

Data model changes

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

sahil.goyal created an issue. See original summary.

sahil.goyal’s picture

Status: Needs work » Needs review
StatusFileSize
new9.05 KB

Resolving all the coding standard issues/warning in this patch, Please review.

skt-001’s picture

Status: Needs review » Reviewed & tested by the community

after the applying the patch #2 there is no phpcs error. it looks good

avpaderno’s picture

Title: Drupal Coding Standards Issues | phpcs » Fix the issues reported by phpcs
Category: Bug report » Task
Issue tags: - +Coding standards
bernardopaulino’s picture

Status: Reviewed & tested by the community » Needs work

The patch #2 can no longer be applied. Some of the fixes in this patch have already been committed (see https://git.drupalcode.org/project/leaflet_maptiler/-/commit/5a6c62caf94...). We might need to re-run phpcs to check if there are still errors.

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

atul_ghate’s picture

Status: Needs work » Needs review
bernardopaulino’s picture

Status: Needs review » Needs work

@atul_ghate thanks for the new merge request. However, there are conflicts with the latest changes in the module. I am sending this back to rework.

atul_ghate’s picture

Status: Needs work » Needs review

Hi @bernardopaulino i have resolved conflict please review.

bernardopaulino’s picture

Status: Needs review » Needs work

Thanks a lot @atul_ghate, the patch seems ok. However, I would like the patch to be ported to the new version 2.x since we don't have plans to keep supporting the version 8.x-1.x in the future. Also, maybe we could rename the README.txt to README.md in the sub-module leaflet_maptiler_token as we did for the main README of the project (see https://www.drupal.org/project/leaflet_maptiler/issues/3339970).
For now I will keep this as Needs work.

avpaderno’s picture

For the 2.x branch is necessary to create a new issue, since in this issue is not possible to create an issue fork for that branch.

avpaderno’s picture

(This happens because the new branch has been created after this issue was created.)

orkutmuratyilmaz’s picture

Version: 8.x-1.x-dev » 2.x-dev
Status: Needs work » Needs review
StatusFileSize
new1.82 KB

I've closed the MR and modified the content of it. Right now it is merged into 2.x-dev version. I also put some notes in the attached file too. Please check testoutputafterfix.md

If no objections are received within 2 weeks, I will update the status of the issue to "Fixed".

orkutmuratyilmaz’s picture

Status: Needs review » Fixed

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.

Status: Fixed » Closed (fixed)

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