Fix the issues reported by phpcs

Created on 4 July 2023, over 1 year ago
Updated 29 February 2024, 9 months ago

Problem/Motivation

There are some issues which are reported by PHP code sniffer within the .theme file.

FILE: /home/system/Documents/contribution/portfolio_theme_explore/portfolio_theme_explore.theme
-----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 15 WARNINGS AFFECTING 15 LINES
-----------------------------------------------------------------------------------------------
1260 | WARNING | Unused variable $update.
1269 | WARNING | Unused variable $update.
1288 | WARNING | Unused variable $oldweight.
1342 | WARNING | Unused variable $update.
1351 | WARNING | Unused variable $update.
1370 | WARNING | Unused variable $oldweight.
1393 | WARNING | Unused variable $files.
1394 | WARNING | Unused variable $test.
1399 | WARNING | Unused variable $files.
1400 | WARNING | Unused variable $test.
1409 | WARNING | Messages are user facing text and must run through t() for translation
1417 | WARNING | Messages are user facing text and must run through t() for translation
1426 | WARNING | Messages are user facing text and must run through t() for translation
1433 | WARNING | Unused variable $system_regions.
1436 | WARNING | Unused variable $build.
-----------------------------------------------------------------------------------------------

Time: 183ms; Memory: 22MB

Proposed resolution

Need to fix these issues by running php code standard commands.

๐Ÿ“Œ Task
Status

Needs work

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia Bhupendra_Raykhere indore mp

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 @Bhupendra_Raykhere
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Bhupendra_Raykhere indore mp

    Hello,

    I have created a patch to solve all the errors related to phpcs code standard within the .theme file.
    Please review and apply it .
    Thank You.

  • Status changed to Needs work 9 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Ashutosh Ahirwal India
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Anjali Mehta

    Anjali Mehta โ†’ made their first commit to this issueโ€™s fork.

  • Assigned to nitin_lama
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India

    Applied patch #2. I can still see there are issues in .theme file.

    Remaining issues:

    FILE: /home/system/Documents/contribution/portfolio_theme_explore/portfolio_theme_explore.theme
    -----------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 15 WARNINGS AFFECTING 15 LINES
    -----------------------------------------------------------------------------------------------
     1260 | WARNING | Unused variable $update.
     1269 | WARNING | Unused variable $update.
     1288 | WARNING | Unused variable $oldweight.
     1342 | WARNING | Unused variable $update.
     1351 | WARNING | Unused variable $update.
     1370 | WARNING | Unused variable $oldweight.
     1393 | WARNING | Unused variable $files.
     1394 | WARNING | Unused variable $test.
     1399 | WARNING | Unused variable $files.
     1400 | WARNING | Unused variable $test.
     1409 | WARNING | Messages are user facing text and must run through t() for translation
     1417 | WARNING | Messages are user facing text and must run through t() for translation
     1426 | WARNING | Messages are user facing text and must run through t() for translation
     1433 | WARNING | Unused variable $system_regions.
     1436 | WARNING | Unused variable $build.
    -----------------------------------------------------------------------------------------------
    
    Time: 183ms; Memory: 22MB
    
  • Issue was unassigned.
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia zkhan.aamir

    Issue summary updated.

Production build 0.71.5 2024