noverify
noverify copied to clipboard
Pretty fast linter (code static analysis utility) for PHP
For functions that accept encoding strings, we can check for common misspellings or non-standard spellings that may not work as intended. This list includes some functions from `mb-string` extension, for...
PVS Studio is famous for its checks for copy/paste errors. For example, there is a chance of writing this kind of code: ```php $x[0] = $v0; $x[0] = $v1; ```...
## Code Example ```php function f() { try { $a = 100; } catch (Exception $e) { echo $e->getMessage(); } finally { echo $a; } } ``` ## Actual Behavior...
There is ambiguity in `X` type constraint when matched against `X|Y`. It should either fail because `X|Y` means that it's **not always** `X`, but sometimes we want it to succeed...
Features that we want to test. High priority: * Arrow functions * Anonymous classes Optional: * Typed properties (This list will be extended.)
PHP Corpus info: ```bash phpcorpus $ ls assert flysystem mustache.php string-encoder async glide options-resolver TrustedProxy Carbon html owncloud Twig closure httpful phabricator twitter-api-php CodeIgniter image php-enum TypeResolver composer inflector php-html-parser...
Given this rule: ```php $a[count($a)]; ``` We find only 1 issue in the code below: ```php if ($tabs[count($tabs)] == "") { unset($tabs[count($tabs)]); } ``` This is due to the fact...
## Code Example ```php class Element {} function f() { $result = []; $returnArray = true; $result[] = new Element(); return $returnArray ? $result : $result[0]; } ``` ## Actual...
Right now `ClassParseState.CurrentFunction` stores only a partial (base) function name instead of FQN. It's probably more useful to store FQN there. Since we store method names there as well, it...