Sublime Forum

PHP Codensiffer

#1

On this link → https://github.com/squizlabs/sublime-PHP_CodeSniffer

It is given to install PHP code sniffer → https://github.com/squizlabs/PHP_CodeSniffer

On which sublime text 3 directory should I clone the GITHUB repository?

0 Likes

#2

In my XAMPP the pho is installed here →
G:\Installations\xampp\php

Should I clone PHP sniffer here through my GITBash?

0 Likes

#3

Since it’s a package, looking at it’s installation section, it’s asking you to clone to the Packages directory. To get to the Packages directory, from the main menu, go to Preferences -> Browse Packages .... The directory it opens is the Packages directory. Clone it there.

1 Like

#4

I think it is done now:

0 Likes

#5

The sublime PHP code sniffer plugin is installed →

But I think I should verifhy if my system alreayd has PHP sniffer. I read on Internet that XAMPP already installs PHP sniffers?

Is there a way I can check in gitbash or CMD? By using some command?

0 Likes

#6

Sorry but I have no idea what that package does. I am not a PHP user either. Someone with more knowledge on PHP or one who is familiar with that package maybe able to tell.

1 Like

#7

Thanks for your help.

0 Likes

#8

Like almost all interesting packages, this package communicates with an external process and turns it into presentable data in Sublime Text somehow.

As such, it’s best if you first make sure that you can run phpcs from the command-line (cmd.exe).

1 Like

#9

How? Please advise me?

0 Likes

#10

I’m not on a Windows machine at the moment but you can open cmd.exe by pressing [windows key] + [R], then type cmd.exe in the little window prompt. Press enter. Then type phpcs in the terminal.

1 Like

#11

I know CMD. It doesnt seems to be working with that command directly:

image

0 Likes

#12

If the php executable is located there, then most likely the phpcs executable is located at G:\Installations\xampp?

1 Like