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
Comments
Comment #2
sahil.goyal commentedResolving all the coding standard issues/warning in this patch, Please review.
Comment #3
skt-001 commentedafter the applying the patch #2 there is no phpcs error. it looks good
Comment #4
avpadernoComment #5
bernardopaulino commentedThe 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.
Comment #8
atul_ghate commentedComment #9
bernardopaulino commented@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.
Comment #10
atul_ghate commentedHi @bernardopaulino i have resolved conflict please review.
Comment #11
bernardopaulino commentedThanks 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.
Comment #12
avpadernoFor 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.
Comment #13
avpaderno(This happens because the new branch has been created after this issue was created.)
Comment #15
orkutmuratyilmazI'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".
Comment #16
orkutmuratyilmaz