Issue fork tca-3333680

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

samit.310@gmail.com created an issue. See original summary.

samitk’s picture

Assigned: samitk » Unassigned
Status: Needs work » Needs review
StatusFileSize
new11.14 KB

Error/warnings are fixed.

Sonal Gyanani’s picture

Assigned: Unassigned » Sonal Gyanani

Sonal Gyanani’s picture

Assigned: Sonal Gyanani » Unassigned
Status: Needs review » Reviewed & tested by the community

Patch #2 applied cleanly, all errors and warnings are fixed so moving it to RTBC.

avpaderno’s picture

Title: Drupal Coding Standards Issues | phpcs » Fix the issues reported by phpcs
Category: Bug report » Task
Priority: Normal » Minor
Status: Reviewed & tested by the community » Needs work
Issue tags: -, - +Coding standards
 /**
- * Class FormManglerService.
+ * The Class FormManglerService.
  *

That description is still repeating the class name without describing what the class does.

nitin_lama’s picture

Assigned: Unassigned » nitin_lama
nitin_lama’s picture

Assigned: nitin_lama » Unassigned
Status: Needs work » Needs review

Please review.

avpaderno’s picture

Status: Needs review » Needs work
 /**
- * Class FormManglerService.
+ * Service provider class.

That is a service class, not a service provider class.
Service class is too generic; the description must say what the class does.

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

dineshkumarbollu’s picture

Status: Needs work » Needs review

Hi

I change the #9 comment on class description please review.

Thanks

Jaspreet-Kaur’s picture

Reviewed! MR! 1 applied, all errors and warnings are fixed.

roberttabigue’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new544.59 KB
new76.83 KB

Hi,

Confirmed no PHPCS errors after applying Patch #2 and the latest MR! to the Token Content Access module with version 3.0.x-dev on Drupal core version 9.5.8.

Marking this now as RTBC.
Kindly refer to the attached screenshots, please.

avpaderno’s picture

Status: Reviewed & tested by the community » Needs work
 /**
- * Class FormManglerService.
+ * Defines FormManglerService class.

The description just repeats the class name; it does not say what the class does.

The report shows errors/warnings for eight files, but the MR changes just six files.

imustakim’s picture

Assigned: Unassigned » imustakim
imustakim’s picture

Assigned: imustakim » Unassigned
Status: Needs work » Needs review
avpaderno’s picture

Status: Needs review » Needs work
 /**
- * Class FormManglerService.
+ * The form mengler service.
  *
  * @package Drupal\tca
  */
 class FormManglerService {

There is a typo in the description.

+  /**
+   * Constructs a new Drupal\tca\FormManglerService object.
    */
   public function __construct(
     EntityTypeManagerInterface $etm,
     EntityTypeBundleInfo $etbi,
     TcaPluginManager $tca_plugin_manager,
     TcaSettingsManager $tca_settings_manager,
-    TranslationInterface $translation) {
+    TranslationInterface $translation,
+    ModuleHandlerInterface $module_handler,
+    MessengerInterface $messenger) {
+  /**
+   * Constructs a new \Drupal\tca\TcaSettingsManager object.
    */
   public function __construct(
     EntityTypeManagerInterface $etm,
-    ConfigFactory $config_factory) {
+    ConfigFactory $config_factory,
+    PrivateKey $private_key) {

The parameters must be described, in the documentation comment.

nitin_lama’s picture

Assigned: Unassigned » nitin_lama
nitin_lama’s picture

Assigned: nitin_lama » Unassigned
nitin_lama’s picture

Status: Needs work » Needs review
avpaderno’s picture

Status: Needs review » Needs work
zkhan.aamir’s picture

Status: Needs work » Needs review
roberttabigue’s picture

Status: Needs review » Needs work

Hi,

After reviewing and applying the MR!1 to the Token Content Access module with 3.0.x-dev on Drupal 10, not all of the PHPCS errors were resolved.
Please see below:

FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/tca/tca.module
-----------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------
 9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface.
-----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/tca/modules/tca_commerce_product/tca_commerce_product.module
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------------------
 11 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\views\Plugin\views\query\QueryPluginBase.
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/tca/modules/tca_node/tca_node.module
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
 10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\views\Plugin\views\query\QueryPluginBase.
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/tca/src/TcaSettingsManager.php
--------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Config\ConfigFactory.
--------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/tca/src/FormManglerService.php
---------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------
 139 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/tca/src/Access/TcaAccessCheck.php
-------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Access\AccessResult.
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/tca/src/Entity/TcaSettings.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\tca\Exception\InvalidTcaSettingException.
-----------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/tca/src/Plugin/TcaPluginManager.php
---------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Cache\CacheBackendInterface.
---------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/tca/src/TcaPermissionGenerator.php
-----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\DependencyInjection\ContainerInjectionInterface.
-----------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------

I ran this command on the module:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml tca/

I'm moving this to ‘Needs work’ for now.

Thank you!

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

akshaydalvi212’s picture

Assigned: Unassigned » akshaydalvi212

I had worked and solved the phpcs issues.

akshaydalvi212’s picture

Assigned: akshaydalvi212 » Unassigned
Status: Needs work » Needs review
roberttabigue’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new41.86 KB

Hi,

I have applied the MR!1 again and confirmed all PHPCS errors have been fixed.

Please see the attached file for reference.

I'm moving this now to ‘RTBC’.

Thank you!

avpaderno’s picture

Issue summary: View changes

avpaderno changed the visibility of the branch 3333680-gitlab-ci-reports to hidden.

avpaderno’s picture

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

lobodakyrylo’s picture

Status: Reviewed & tested by the community » Fixed

Good job guys.

Status: Fixed » Closed (fixed)

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

jaswinsingh’s picture

This has not been released yet. Can we include it in the release?

bceyssens’s picture

StatusFileSize
new486 bytes

Removal of this line breaks functionality https://git.drupalcode.org/project/tca/-/commit/857c29f1118156ac87c2b32f...

The attached patch adds this back in place.