Fix the issues reported by phpcs

Created on 22 February 2023, over 1 year ago
Updated 30 May 2024, 25 days ago

GitLab CI reports PHP_CodeSniffer warnings/errors. The ones still to be fixed are the following ones.

FILE: ...modules/custom/convert_bundles-3343785/src/Controller/EntityController.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 54 | ERROR | [x] Multi-line function declarations must have a trailing comma
    |       |     after the last parameter
    |       |     (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 246ms; Memory: 6MB

 
 

๐Ÿ“Œ Task
Status

Needs review

Version

2.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia TanujJain-TJ

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @TanujJain-TJ
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia TanujJain-TJ

    Fixed the above mentioned phpcs issues, please review.

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sahil.goyal

    Thanx @TanujJain-TJ for resolve phpcs issues, but there are some issues are errors/warning left, so applying a new patch with interdiff file.

  • Status changed to RTBC over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Ranjit1032002

    I had Reviewed the patch and it's working as expected mentioned in comment #4

  • First commit to issue fork.
  • @urvashi_vora opened merge request.
  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
    -  // TODO: tried to do this as suggested at https://www.drupal.org/node/2020549
    +  // @todo tried to do this as suggested at https://www.drupal.org/node/2020549
    

    What follows @todo is a sentence.

    -    _create_action($entity_type_machine_name, $entity_type->getLabel());
    +    convert_bundles_create_action($entity_type_machine_name, $entity_type->getLabel());

    While function names should be prefixed by the module machine name, starting a function name with an underscore is possible. It is usually used to mean the function should not be considered part of the public API. That is reported in the Drupal coding standards, if I recall correctly.

    /**
    - * ConvertBundles.
    + * {@inheritdoc}
      */
     class ConvertBundles {

    {@inheritdoc} is not used for class documentation comments.

  • Igor Mashevskyi โ†’ made their first commit to this issueโ€™s fork.

  • @igor-mashevskyi opened merge request.
  • Status changed to Needs review about 1 year ago
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joseph.olstad

    Great work above, however the merge request is now blocked.

    Merge blocked: fast-forward merge is not possible. To merge this request, first rebase locally.

    please resolve this and I'll review and then merge.

  • Status changed to Needs work 5 months ago
  • Assigned to nitin_lama
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama

    I've rebased and fixed the conflicts. MR is ready for review. Thanks.

  • Status changed to Needs review 5 months ago
  • Issue was unassigned.
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    apaderno โ†’ changed the visibility of the branch 3343785-fix-the-issues to hidden.

  • Status changed to Needs work 27 days ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines paraderojether

    Hi

    I reviewed MR!18, it is applied cleanly however there are still remaining phpcs 2 errors shown below:

    convert_bundles git:(2.0.x) curl https://git.drupalcode.org/project/convert_bundles/-/merge_requests/18.diff | git apply -v
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 37895    0 37895    0     0  76538      0 --:--:-- --:--:-- --:--:-- 77336
    Checking patch convert_bundles.api.php...
    Checking patch convert_bundles.install...
    Checking patch convert_bundles.module...
    Checking patch src/Controller/EntityController.php...
    Checking patch src/ConvertBundles.php...
    Checking patch src/Form/ConvertBundlesForm.php...
    Checking patch src/Plugin/Action/ConvertBundlesActionBase.php...
    Checking patch src/Plugin/Derivative/ConvertBundlesLocalTask.php...
    Checking patch src/Routing/RouteSubscriber.php...
    Applied patch convert_bundles.api.php cleanly.
    Applied patch convert_bundles.install cleanly.
    Applied patch convert_bundles.module cleanly.
    Applied patch src/Controller/EntityController.php cleanly.
    Applied patch src/ConvertBundles.php cleanly.
    Applied patch src/Form/ConvertBundlesForm.php cleanly.
    Applied patch src/Plugin/Action/ConvertBundlesActionBase.php cleanly.
    Applied patch src/Plugin/Derivative/ConvertBundlesLocalTask.php cleanly.
    Applied patch src/Routing/RouteSubscriber.php cleanly.
    โžœ  convert_bundles git:(2.0.x) โœ— cd ..
    โžœ  contrib git:(main) โœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig convert_bundles
    
    FILE: /Users/jetherparadero/d_o/drupal-issues/web/modules/contrib/convert_bundles/convert_bundles.module
    -----------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------
     9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Database\Database.
    -----------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/jetherparadero/d_o/drupal-issues/web/modules/contrib/convert_bundles/src/Form/ConvertBundlesForm.php
    ------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------------
     14 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Routing\RouteBuilderInterface.
    ------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 375ms; Memory: 12MB

    Please check and advise.
    Thank you.

  • Status changed to Needs review 27 days ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines paraderojether

    I fix the remaining issues, please review.
    Thank you.

  • Status changed to Needs work 26 days ago
  • Hi @paraderojether,

    Applied MR !18 successfully, however it still resulted one error.

    convert_bundles git:(2.0.x) curl https://git.drupalcode.org/project/convert_bundles/-/merge_requests/18.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 38131    0 38131    0     0  62794      0 --:--:-- --:--:-- --:--:-- 63657
    patching file convert_bundles.api.php
    patching file convert_bundles.install
    patching file convert_bundles.module
    patching file src/Controller/EntityController.php
    patching file src/ConvertBundles.php
    patching file src/Form/ConvertBundlesForm.php
    patching file src/Plugin/Action/ConvertBundlesActionBase.php
    patching file src/Plugin/Derivative/ConvertBundlesLocalTask.php
    patching file src/Routing/RouteSubscriber.php
    โžœ  convert_bundles git:(2.0.x) โœ— cd ..
    โžœ  contrib git:(main) โœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig convert_bundles
    
    FILE: ...ue/web/modules/contrib/convert_bundles/src/Controller/EntityController.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     54 | ERROR | [x] Multi-line function declarations must have a trailing comma
        |       |     after the last parameter
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    Time: 523ms; Memory: 12MB

    Kindly check.

    Thanks,
    Jake

  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines paraderojether

    Hello a.aaronjake, I can't replicate the issue on my end.

  • Pipeline finished with Success
    25 days ago
    Total: 187s
    #185944
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • Status changed to Needs review 25 days ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • Pipeline finished with Success
    25 days ago
    Total: 209s
    #185956
Production build 0.69.0 2024