Remove the unused variable and method

Created on 21 June 2023, about 1 year ago
Updated 23 June 2023, about 1 year ago

FILE: D:\xampp\htdocs\drupal_10\web\modules\contrib\advagg\advagg_validator\src\Form\BaseValidatorForm.php
----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------
61 | WARNING | Unused variable $point.
----------------------------------------------------------------------------------------------------------

FILE: D:\xampp\htdocs\drupal_10\web\modules\contrib\advagg\src\Form\InfoForm.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
164 | WARNING | Unused private method formatList()
--------------------------------------------------------------------------------

📌 Task
Status

RTBC

Version

6.0

Component

Code

Created by

🇮🇳India arti_parmar

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @arti_parmar
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 8
    last update about 1 year ago
    54 pass
  • 🇮🇳India arti_parmar

    Kindly review patch.

  • Status changed to RTBC about 1 year ago
  • 🇵🇭Philippines kenyoOwen

    Hi arti_parmar

    I applied your patch and confirmed that the phpcs issues mentioned are resolved. Please see the screenshots attached.

    Thank you.

  • Status changed to Needs work about 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
    -      $point = &$form;
    +      $point = $form;

    Actually, the report is suggesting to remove the $point variable, not to remove & from that line.

    -  private function formatList(array $list, $depth = 1) {
    +  public function formatList(array $list, $depth = 1) {
         $spacer = '<br />' . str_repeat('&nbsp;', 2 * $depth);
         $output = $spacer . Xss::filter(implode($spacer, $list), ['br']);
         return $output;
    

    The report is saying that method is not used. Fixing that does not mean making the method public.

  • Status changed to Needs review about 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 8
    last update about 1 year ago
    54 pass
  • 🇮🇳India Ajeet Tiwari

    tried to resolve the comment #4 and uploading patch for the same.

  • Status changed to RTBC about 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The last patch is correct as per issue topic.

Production build 0.69.0 2024