Search code examples
phpvisual-studio-codephpstorm

From PhpStorm to VSCode. Is there 'best practice suggestion' like in PhpStorm


When I was using PhpStorm I got best practice suggestions with yellow underline and a light bulb to for example use const instead of define. Example:

define("MENU_MAIN", "main-menu");
define("MENU_MOBILE", "mobile-menu");
define("MENU_FOOTER_1", "footer1");

Now I am using VSCode and can't find any similar functionality. Is there any extension or something?


Solution

  • There may be extensions that can highlight sections like this for code quality (I could not find any popular ones doing a quick search). However, there is not anything native in VSCode that does what you are looking for.

    I'd suggest looking into a tool like PHP_CodeSniffer which doesn't care what IDE you use.