Questions tagged [codesniffer]

This tag is for questions having to do with the PHP_CodeSniffer PEAR package from Squiz Labs, which is used for static analysis of PHP code.

The PHP_CodeSniffer tool is a PHP PEAR package for static analysis of PHP code, developed and maintained by Squiz Labs.

Useful Links

231 questions
0
votes
1 answer

JS Lexer to detect function calls

In order to localize strings used within my javascript, I want scan all my js files for such strings. I am using a t() function to request string translations as follows: t("Hello world"); or with dynamic portions: t("Hello @user", {"@user":…
d_inevitable
  • 4,239
  • 27
  • 46
0
votes
1 answer

Find string rule in PHP_CodeSniffer

I wish to scan files for the string Firebug, but this is not enought. I also wish to make a difference between QFirebug::log and QFirebug::error static methods. How I can I extract the method name after the class name ? public function…
johnlemon
  • 18,991
  • 36
  • 111
  • 174
-1
votes
1 answer

Any way to ignore `Missing file doc comment` Yii2 using PHp Strom?

How i can remove the error so i don't have to add file tag before namespace and class tag for after name space namespace backend\controllers; use common\models\helpers\Frontend\DropdownHelper; use common\models\Lookup; use…
rajwa766
  • 584
  • 7
  • 23
-1
votes
2 answers

Include Excluded rule

I want to include the PSR12 ruleset (which includes the rule "PSR1.Methods.CamelCapsMethodName.NotCamelCaps") but I don't want that rule to run on a specific file. so I tried the following ruleset:
-1
votes
2 answers

View source code and sniff images with PHP?

I would like to implement a PHP web page that, given a certain URL, is going to sniff some images from that page. Do to so, I need : 1) to access the html source-code of that page and find out the URLs of the images I want. 2) to download these…
phenetas
  • 109
  • 7
-2
votes
1 answer

PHP_CodeSniffer: How to reset line length on newline?

I've made a custom standard because my coding style is far from anything anyone would call normal. In fact, I reject about 90% of what many people consider good standards as whitespace spam. That being said, I do think that if I'm going to use a…
krowe
  • 1,994
  • 15
  • 16
1 2 3
15
16