noverify
noverify copied to clipboard
Pretty fast linter (code static analysis utility) for PHP
## Code Example ```php
## Code Example ```php foreach (new \RecursiveIteratorIterator($directoryIt, \RecursiveIteratorIterator::CHILD_FIRST) as $file) { echo $file->getPathname(); } ``` ## Actual Behavior Warning about the undefined method `getPathname()`, `$file` type is not resolved (mixed...
https://plugins.jetbrains.com/plugin/7622-php-inspections-ea-extended-
## Code Example ```php
It's implemented in some other PHP static analyzers: https://medium.com/@ondrejmirtes/union-types-vs-intersection-types-fd44a8eacbb Newer phpdoc grammar includes intersection types with `&` notation: https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc.md#appendix-a-types Intersection type `A&B` is a type that includes both properties and...
## Code Example ```php public function isEmpty($value, $trim = false) { $value = is_array($value) ? reset($value) : $value; return !($value instanceof UploadedFile) || $value->error == UPLOAD_ERR_NO_FILE; } ``` ## Actual...
Currently, it can be hard to track which type is a normal string and which one is a wrap'ed type string. For example, type `mixed[]` can expressed as a string...
In PHP, there is no easy way to distinguish entry points ("scripts") and library code. This difference is important for the analysis, because scripts may reside in the same folder...
**Idea**: adapt [go/analysis](https://godoc.org/golang.org/x/tools/go/analysis) for NoVerify as an interface for checkers implementations ("custom checks"). **Rationale**: make builtin checks and cache/meta mechanisms less bound with each other. Right now external checkers are...
## Code Example ```php stat($filename, $flags); ``` ## Actual Behavior No warnings. ## Expected Behavior Warning about the extra (excessive) argument passed to `stat` (or any other) function. Seems reasonable...