Fix the issues reported by phpcs

Created on 10 June 2020, over 4 years ago
Updated 21 August 2024, 3 months ago

Running phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig for the 2.0.x branch shows the following warnings/errors that should be fixed.

FILE: ./modules/single_page_site_next_page/src/EventSubscriber/AlterSinglePageSiteOutput.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 16 | WARNING | The class short comment should describe what the
    |         | class does and not simply repeat the class name
----------------------------------------------------------------------


FILE: ./single_page_site.module
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 10 | 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: ./src/Controller/SinglePageSiteController.php
----------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------
   8 | ERROR   | [x] Use statements should be sorted alphabetically.
     |         |     The first wrong one is
     |         |     Drupal\Core\Controller\ControllerBase.
  20 | WARNING | [ ] The class short comment should describe what the
     |         |     class does and not simply repeat the class name
  96 | WARNING | [ ] Unused variable $menu.
 178 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ./src/Event/EventSinglePageSiteAlterOutput.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 11 | WARNING | The class short comment should describe what the
    |         | class does and not simply repeat the class name
----------------------------------------------------------------------


FILE: ./src/Event/SinglePageSiteEvents.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 9 | WARNING | The class short comment should describe what the class
   |         | does and not simply repeat the class name
----------------------------------------------------------------------


FILE: ./src/Form/SinglePageSiteConfigForm.php
----------------------------------------------------------------------
FOUND 3 ERRORS AND 31 WARNINGS AFFECTING 34 LINES
----------------------------------------------------------------------
   8 | ERROR   | [x] Use statements should be sorted alphabetically.
     |         |     The first wrong one is
     |         |     Drupal\Core\Form\ConfigFormBase.
  15 | WARNING | [ ] The class short comment should describe what the
     |         |     class does and not simply repeat the class name
  71 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
  76 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
  81 | 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
  89 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
  98 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 107 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 111 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 115 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 119 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 122 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 123 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 126 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 128 | ERROR   | [x] Use null coalesce operator instead of ternary
     |         |     operator.
 133 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 138 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 142 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 146 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 150 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 155 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 161 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 162 | ERROR   | [x] Use null coalesce operator instead of ternary
     |         |     operator.
 167 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 172 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 175 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 179 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 182 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 198 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 205 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 211 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 241 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 251 | WARNING | [ ] \Drupal calls should be avoided in classes, use
     |         |     dependency injection instead
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ./src/Manager/SinglePageSiteManager.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 27 | WARNING | The class short comment should describe what the
    |         | class does and not simply repeat the class name
----------------------------------------------------------------------

Time: 182ms; Memory: 10MB
📌 Task
Status

Needs work

Version

2.0

Component

Code

Created by

🇮🇳India pavnish

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

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, show which command has been used, which arguments have been used, and which report that command shown.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India Ashutosh Ahirwal India

    Providing updated patch with phpcs issue fixes.
    please review.

  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, show which command has been used, which arguments have been used, and which report that command shown.

    The issue summary must still be updated.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    Also, the report shows warnings/errors for 13 files; the last patch changes 17 files. Either the report in the issue summary is not complete or the patch changes more files than necessary.

  • Status changed to Needs review over 1 year ago
  • 🇮🇳India Ashutosh Ahirwal India

    Issue summary updated Please review.

  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The warnings/errors should be fixed in the 2.0.x branch.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • First commit to issue fork.
  • Assigned to bharath-kondeti
  • 🇮🇳India bharath-kondeti Hyderabad

    There are only issues in 8 files against 2.0.x as mentioned below:

    FILE: C:\Practice\xampp\htdocs\locald9site\web\modules\contrib\single_page_site-3150482\modules\single_page_site_next_page\src\EventSubscriber\AlterSinglePageSiteOutput.php
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
    16 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    FILE: C:\Practice\xampp\htdocs\locald9site\web\modules\contrib\single_page_site-3150482\single_page_site.install
    ----------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------
    1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
    ----------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------

    FILE: C:\Practice\xampp\htdocs\locald9site\web\modules\contrib\single_page_site-3150482\single_page_site.module
    ---------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------
    1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
    ---------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------

    FILE: C:\Practice\xampp\htdocs\locald9site\web\modules\contrib\single_page_site-3150482\src\Controller\SinglePageSiteController.php
    ----------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
    ----------------------------------------------------------------------------------------------------------------------------------------------
    1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
    20 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
    96 | WARNING | [ ] Unused variable $menu.
    178 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    ----------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------------------------

    FILE: C:\Practice\xampp\htdocs\locald9site\web\modules\contrib\single_page_site-3150482\src\Event\EventSinglePageSiteAlterOutput.php
    ------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    ------------------------------------------------------------------------------------------------------------------------------------
    1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
    11 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
    ------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------------------------

    FILE: C:\Practice\xampp\htdocs\locald9site\web\modules\contrib\single_page_site-3150482\src\Event\SinglePageSiteEvents.php
    --------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    --------------------------------------------------------------------------------------------------------------------------
    1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
    9 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
    --------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------------------------------

    FILE: C:\Practice\xampp\htdocs\locald9site\web\modules\contrib\single_page_site-3150482\src\Form\SinglePageSiteConfigForm.php
    ----------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AND 31 WARNINGS AFFECTING 34 LINES
    ----------------------------------------------------------------------------------------------------------------------------------------------
    1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
    15 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
    71 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    76 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    81 | 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
    89 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    98 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    107 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    111 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    115 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    119 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    122 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    123 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    126 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    128 | ERROR | [x] Use null coalesce operator instead of ternary operator.
    133 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    138 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    142 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    146 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    150 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    155 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    161 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    162 | ERROR | [x] Use null coalesce operator instead of ternary operator.
    167 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    172 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    175 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    179 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    182 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    198 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    205 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    211 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    241 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    251 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
    ----------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------------------------

    FILE: C:\Practice\xampp\htdocs\locald9site\web\modules\contrib\single_page_site-3150482\src\Manager\SinglePageSiteManager.php
    -----------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    -----------------------------------------------------------------------------------------------------------------------------
    1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
    27 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
    -----------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------------------

    Time: 644ms; Memory: 4MB

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India bharath-kondeti Hyderabad

    Updated the patch with changes. Please review

  • 🇮🇳India Anjali Mehta

    Hello @bharath-kondeti
    Tested patch on Drupal 9.5.9 and php version 8.1. Patch applied cleanly. But getting error on running the phpcs. Adding screenshot for Your references. Please have a look.
    Thank You for your support.

  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
    - * Class AlterSinglePageSiteOutput.
    + * Class to providing functionality for AlterSinglePageSiteOutput.

    No, a class does not provide functionality for itself. That does not explain which functionality it provides, though.

    +  /**
    +   * The Entity Query Factory service.
    +   *
    +   * @var \Drupal\Core\Entity\Query\QueryFactoryInterface
    +   */
    +  protected $entityQueryFactory;

    The entity query service. is sufficient.

        *   Config factory to load/save config.
        * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
        *   Core module handler.
    +   * @param \Drupal\Core\Entity\Query\QueryFactoryInterface $entityQueryFactory
    +   *   The Entity Query Factory.
        */
    

    Since that documentation comment is changed, Core module handler. should be replaced with The module handler.

  • Status changed to Needs review over 1 year ago
  • 🇮🇳India Anjali Mehta

    Updated the patch with changes.

    Please review.
    Thank You.

  • 🇮🇳India Anjali Mehta

    Updated the patch with changes.

    Please review.
    Thank You.

  • Status changed to RTBC over 1 year ago
  • 🇵🇭Philippines roberttabigue

    Hi,

    I reviewed the changes and confirmed the Patch was applied cleanly to the Single Page Site module against 2.0.x-dev on Drupal 9.5.10.

    Checking patch modules/single_page_site_next_page/src/EventSubscriber/AlterSinglePageSiteOutput.php...
    Checking patch single_page_site.module...
    Checking patch src/Controller/SinglePageSiteController.php...
    Checking patch src/Event/EventSinglePageSiteAlterOutput.php...
    Checking patch src/Event/SinglePageSiteEvents.php...
    Checking patch src/Form/SinglePageSiteConfigForm.php...
    Checking patch src/Manager/SinglePageSiteManager.php...
    Applied patch modules/single_page_site_next_page/src/EventSubscriber/AlterSinglePageSiteOutput.php cleanly.
    Applied patch single_page_site.module cleanly.
    Applied patch src/Controller/SinglePageSiteController.php cleanly.
    Applied patch src/Event/EventSinglePageSiteAlterOutput.php cleanly.
    Applied patch src/Event/SinglePageSiteEvents.php cleanly.
    Applied patch src/Form/SinglePageSiteConfigForm.php cleanly.
    Applied patch src/Manager/SinglePageSiteManager.php cleanly.

    And all PHPCS errors have been fixed.

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

    Please see the attached files for reference.

    I'm moving this now to RTBC.

    Thank you!

  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The patch could apply, but the changes are not correct.

     /**
    - * Class SinglePageSiteController.
    + * Class to providing functionality for SinglePageSiteController.
      *
      * @package Drupal\single_page_site\Controller
      */
    @@ -93,7 +93,7 @@ class SinglePageSiteController extends ControllerBase {
    

    The description is still saying the class provides functionality for itself, which is not correct, and it does not explain which functionality the class provides.

    -    if ($menu = $this->manager->getMenu()) {
    +    if ($this->manager->getMenu()) {
    

    Given the method name, that change does not seem correct. If the $menu variable is not used from render(), there is a bug that needs to be fixed.

     /**
    - * Class EventSinglePageSiteAlterOutput.
    + * Class to providing functionality for EventSinglePageSiteAlterOutput.
      *
      * @package Drupal\single_page_site\Event
      */
     /**
    - * Class SinglePageSiteEvents.
    + * Class to providing functionality for SinglePageSiteEvents.
      *
      * @package Drupal\single_page_site\Event
      */
     /**
    - * Class SinglePageSiteConfigForm.
    + * Class to providing functionality for SinglePageSiteConfigForm.
      *
      * @package Drupal\single_page_site\Form
      */

    What I reported for a previous change holds true in these cases too.

    +  /**
    +   * The entity query service.
    +   *
    +   * @var \Drupal\Core\Entity\Query\QueryFactoryInterface
    +   */
    +  protected $entityQueryFactory;

    The entity query factory. is better, since the entity query service is a different thing.

    +   * @param \Drupal\Core\Entity\Query\QueryFactoryInterface $entityQueryFactory
    +   *   The Entity Query Factory.

    Only the first word must be capitalized.

  • Status changed to Needs review 9 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • First commit to issue fork.
  • First commit to issue fork.
  • 🇮🇳India Shank115

    I ran this command phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml single_page_site/ and found no issues or warnings.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    apaderno changed the visibility of the branch 3150482-fix-the-issues to hidden.

  • Pipeline finished with Failed
    8 months ago
    Total: 43s
    #119295
  • Status changed to Needs work 3 months ago
  • 🇵🇭Philippines roberttabigue

    Hi @avpaderno,

    The Gitlab CI failed to run the Jobs: https://git.drupalcode.org/issue/single_page_site-3150482/-/jobs/1066014.

    Please see the attached file for reference.

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

    Thank you.

Production build 0.71.5 2024