Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save booskills/3560491923bbd7a6d0d0855ee0365f9f to your computer and use it in GitHub Desktop.
Save booskills/3560491923bbd7a6d0d0855ee0365f9f to your computer and use it in GitHub Desktop.

Add phpCodeSniffer to PhpStorm:

  1. In the Settings/Preferences dialog (Ctrl+Alt+S),

    Languages & Frameworks | PHP | Quality Tools.

  2. On the Quality Tools page that opens, expand the Code Sniffer area. From the Configuration list, choose the PHP Code Sniffer script that we just installed in our utilities directory.

    You need to select > \phphcs\bin\phpcs.bat

WordPressCodingStandards: select code sniffer validation in: In the Settings/Preferences dialog (Ctrl+Alt+S) , navigate to:

Editor | inspections | PHP code sniffer validation | Coding Standards | Select required Wordpress Coding Standard

Inspect the Code:

to inspect code, navigate to:

Topbar | Code | inspect code

  • or use short key:

    • Windows:
      Ctrl + Alt + Shift + i
    • Mac: Cmd + Alt + Shift + i
  • or you may map custom keys for it.

Configuring WordPress code style:

In the Settings/Preferences dialog (Ctrl+Alt+S), navigate to Editor | Code Style | PHP.

On the Code Style. PHP page that opens, click the Set from... link.

On the context menu, choose Predefined Style, then choose WordPress.

@fastmarketo
Copy link

Cna you create gif for this → On the context menu, choose Predefined Style, then choose WordPress.

@booskills
Copy link
Author

Cna you create gif for this → On the context menu, choose Predefined Style, then choose WordPress.

Here is the Screen recording: https://recordit.co/xhh9Q7sPLr

@fastmarketo
Copy link

fastmarketo commented Jan 9, 2021

Currently Pursuing this course on Udemy. Excellent course. Can you create one course focussing on wp→ database classes and its membership/subscription system = Wordpress Roles? It is one of the most difficult section and unless one has good understanding should not attempt playing around with that part.

@fastmarketo
Copy link

fastmarketo commented Jan 9, 2021

Replace in path option is not available in PHP storm? No solution is available over the Internet.

phpmailer

I have also raised a ticket here →
https://intellij-support.jetbrains.com/hc/en-us/community/posts/360010236939-Replace-in-path-option-is-not-available-in-PHP-storm-No-solution-is

@booskills
Copy link
Author

Replace in path option is not available in PHP storm? No solution is available over the Internet.

phpmailer

I have also raised a ticket here →
https://intellij-support.jetbrains.com/hc/en-us/community/posts/360010236939-Replace-in-path-option-is-not-available-in-PHP-storm-No-solution-is

This option is not renamed as "Replace in Files" and "Find in Files" respectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment