Fix the warnings/errors reported by PHP_CodeSniffer

Created on 10 July 2023, over 1 year ago
Updated 15 March 2024, 8 months ago
📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇮🇳India roshni27

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

Comments & Activities

  • Issue created by @roshni27
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.1 & MariaDB 10.3.22
    last update over 1 year ago
    57 pass
  • Status changed to Needs work about 1 year ago
  • Hello, @roshni27 thanks for the patch, I have applied your patch.

    These are the steps I followed:

    1. Took clone from git version 2.0.x in drupal 10.1.x

    2. Ran this command:

    ./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig modules/contrib/timesup/

    3. Applied your patch and, again ran phpcs command

    found errors.

    Needs Work.

  • Status changed to Needs review about 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.1 & MariaDB 10.3.22
    last update about 1 year ago
    57 pass
  • 🇮🇳India aayushDrupal

    hi,
    I have fixed remaining errors after #2, please review. Moving status to "Needs review".

  • Status changed to Needs work about 1 year ago
  • 🇨🇭Switzerland wengerk Lausanne

    Thanks for your contribution ! Here are my comments before merging

    1. +++ b/CHANGELOG.md
      -- fix Issue #3318856 by solantoast: The 'core_version_requirement' constraint (^9) requires the 'core' key not be set
      +- fix Issue #3318856 by solantoast: The 'core_version_requirement'
      +constraint (^9) requires the 'core' key not be set
      

      Changelog should not be impcated by multiline changes please revert this

    2. +++ b/CONTRIBUTING.md
      @@ -33,30 +33,38 @@ on your environment:
      -    docker-compose exec -u www-data drupal drush site-install standard --db-url="mysql://drupal:drupal@db/drupal" --site-name=Example -y
      +    docker-compose exec -u www-data drupal drush site-install standard
      +    --db-url="mysql://drupal:drupal@db/drupal" --site-name=Example -y
      

      if wanna break commande line in multiple lines, then use the leading \ in order to keep them working when copy/past

    3. +++ b/CONTRIBUTING.md
      @@ -33,30 +33,38 @@ on your environment:
      +We use the [Docker for Drupal Contrib images]
      +(https://hub.docker.com/r/wengerk/drupal-for-contrib) to run testing on our
      

      don't break link Markdown

    4. +++ b/CONTRIBUTING.md
      @@ -33,30 +33,38 @@ on your environment:
      +    docker-compose exec -u www-data drupal phpunit --group=timesup
      +    --no-coverage --stop-on-failure --configuration=/var/www/html/phpunit.xml
      

      keep commande line working by using leading \

    5. +++ b/CONTRIBUTING.md
      @@ -86,7 +97,8 @@ PHP_CodeSniffer is an essential development tool that ensures your code remains
      +  $ docker-compose exec drupal ./vendor/bin/phpcbf
      +  ./web/modules/contrib/timesup/
      

      keep commande line working with leading \

    6. +++ b/CONTRIBUTING.md
      @@ -96,8 +108,9 @@ https://github.com/phpmd/phpmd
      +  $ docker-compose exec drupal phpmd ./web/modules/contrib/timesup/
      +  text ./phpmd.xml \ --suffixes php,module,inc,install,test,profile,
      +  theme,css,info,txt --exclude *Test.php,*vendor/*
      

      missing leading \

    7. +++ b/CONTRIBUTING.md
      @@ -107,7 +120,11 @@ https://github.com/sebastianbergmann/phpcpd
      +  $ docker-compose exec drupal phpcpd ./web/modules/contrib/timesup/src
      +  --suffix .php --suffix .module --suffix .inc --suffix .install
      +  --suffix .test --suffix .profile --suffix .theme --suffix .css --suffix .info
      +  --suffix .txt --exclude *.md --exclude *.info.yml --exclude tests
      +  --exclude vendor/
      

      missing leading \ making the cli unworking when copy-pasta

    8. +++ b/CONTRIBUTING.md
      @@ -118,7 +135,8 @@ A scanner that checks compatibility of your code with PHP interpreter versions.
      +    --file-extensions php,module,inc,install,test,profile,theme,info
      +    --exclude vendor
      

      missing leading \ making the cli unworking when copy-pasta

  • Assigned to nitin_lama
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.1 & MariaDB 10.3.22
    last update about 1 year ago
    57 pass
  • 🇮🇳India nitin_lama India

    Addressed comment #5. Providing updated patch.

  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
    • wengerk committed 48e84557 on 20x/gitlab-ci
      fix phpcs use statements should be sorted alphabetically - Issue #...
    • wengerk committed 48e84557 on 2.0.x
      fix phpcs use statements should be sorted alphabetically - Issue #...
  • Status changed to Fixed 9 months ago
  • 🇨🇭Switzerland wengerk Lausanne
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024