Skip to content

phpstan rules in Sudsy

PHPversion level 0 (no inventory yet: only the identifiers Sudsy reproduces are listed)36% of its findings also reported0 covered7 partial10 planned0 deferred

Every rule and setting of phpstan in the parity catalog, with the Sudsy equivalent. The lint share is the part of phpstan’s default set (in scope) whose findings Sudsy also reports on real-world code, with the preset that mirrors it. Where the tool has a page for an entry, the id links to it.

Status: covered; partial (the note says what differs); not yet (planned); deferred; not planned; SDK (a .NET SDK diagnostic does it).

Id Sudsy Status Note
variable.undefined undefined-variable partial Only a variable that nothing in its function assigns (PHPStan’s level 0 reports exactly those); a variable passed to a call counts as assigned, and a function with extract, parse_str, include or $$x is not checked.
new.static unsafe-new-static partial A class without a final class or final or abstract constructor of its own; a constructor or final parent in another file, and a @phpstan-ignore comment, cannot be seen (about 17 findings of the 317).
function.inner no-inner-function partial A named function declared in a function, method or closure.
parameter.implicitlyNullable implicit-nullable-parameter partial A typed parameter with a null default and no ? or null in its type.
unset.possiblyHookedProperty no-unset-hookable-property partial unset($this->p) of a property the class declares; a property declared in a parent in another file is not seen.
property.uninitializedReadonly - not yet core-flow definite assignment, also C#, Java and Kotlin; a readonly property that no path of the constructor assigns.
return.missing missing-return partial A native or @return type that is not void, never, mixed or null and a reachable end of the body; exit and die end a path; a call of a @return never function in another file (bail(), abort()), a type narrowed to every case, and a loop with an inner break are not seen (27 extra against 19 covered, so the rule is not in the preset).
class.notFound class-not-found partial Only a name that a Composer autoload prefix of the project or its installed packages owns, whose file is missing; a class of an optional package that is not installed (no prefix owns it), the class of Foo::CONST, and the names of extends, implements and use are not looked at.
method.void - not yet needs-project-index, the result of a call is used and the method is void; the callee is a method of the class in most cases but also one in another file.
staticMethod.void - not yet needs-project-index, as method.void, for a static call.
function.void - not yet needs-project-index, as method.void, for a function.
method.finalPrivate - not yet needs-project-index, a final private method comes from a trait alias in the using class, in another file.
arguments.count - not yet needs-project-index, the parameters of the constructor or function called live in another file.
unset.offset - not yet needs-project-index, needs the type of the unset operand.
unset.variable - not yet needs-project-index, needs a scope pass for the variable unset (one finding).
unset.readOnlyProperty - not yet needs-project-index, a readonly property inherited from another class (one finding).
method.templateTypeNotInParameter - not yet needs-project-index, needs the @template tags and the parameter types of the phpdoc.
ignore.unmatchedLine - not planned a complaint about PHPStan’s own @phpstan-ignore comment, which Sudsy does not read; not a finding about the code (user decision)
ignore.unmatchedIdentifier - not planned as ignore.unmatchedLine