Problem with php file and linter


#1

hi , i used atom editor but when type example:

if ($state == dallas) {
    array_push($city,"dallas","other");
}

linter not work for if ($state == dallas) so correct this if ($state == "dallas")
in other editor like phpstorm warning for this! how to active this?


#2

The linter package requires for you to install additional packages for specific linters you want to use with it. You may want to take a look at the full linters list on the website for the package to determine which one you want to use.


#3

i use the linter-php but not show warning


#4

Does the underlying linter that linter-php uses catch this issue? If not, then you may want to consider another linter provider. If so, then you should file a bug on the linter-php package.


#5

how to solve this problem?


#6

linter-php runs php’s own syntax check (you can run it in the command line with php -l) which, if I’m correct, will just check if your syntax is valid. Since your syntax is valid it won’t complain.


#7

you say i cant do it? even manual?


#8

Sadly, yes that’s what I’m saying


#9

There are two other linters for PHP listed on the linter page I mentioned above. Have you tried either of those, like I suggested?


#10

not work for this progress