#[non_exhaustive]pub enum IssueKind {
Show 240 variants
NonStaticSelfCall {
class: String,
method: String,
},
InvalidScope {
in_class: bool,
},
UndefinedVariable {
name: String,
},
UndefinedFunction {
name: String,
},
UndefinedMethod {
class: String,
method: String,
},
PossiblyUndefinedMethod {
class: String,
method: String,
},
UndefinedClass {
name: String,
},
UndefinedProperty {
class: String,
property: String,
},
InaccessibleProperty {
class: String,
property: String,
},
UndefinedConstant {
name: String,
},
InaccessibleClassConstant {
class: String,
constant: String,
},
PossiblyUndefinedVariable {
name: String,
},
UndefinedTrait {
name: String,
},
TraitConstantAccessedDirectly {
trait_name: String,
constant: String,
},
UndefinedTraitAliasMethod {
trait_name: Option<String>,
method: String,
},
ParentNotFound,
InvalidStringClass {
actual: String,
},
NotAnInterface {
name: String,
},
NullArgument {
param: String,
fn_name: String,
},
NullPropertyFetch {
property: String,
},
NullMethodCall {
method: String,
},
NullArrayAccess,
PossiblyNullArgument {
param: String,
fn_name: String,
},
PossiblyInvalidArgument {
param: String,
fn_name: String,
expected: String,
actual: String,
},
PossiblyNullPropertyFetch {
property: String,
},
PossiblyNullMethodCall {
method: String,
},
PossiblyNullArrayAccess,
NullableReturnStatement {
expected: String,
actual: String,
},
InvalidReturnType {
expected: String,
actual: String,
},
LessSpecificReturnStatement {
expected: String,
actual: String,
},
InvalidArgument {
param: String,
fn_name: String,
expected: String,
actual: String,
},
InvalidScalarArgument {
param: String,
fn_name: String,
expected: String,
actual: String,
},
TooFewArguments {
fn_name: String,
expected: usize,
actual: usize,
},
TooManyArguments {
fn_name: String,
expected: usize,
actual: usize,
},
InvalidNamedArgument {
fn_name: String,
name: String,
overwrites: bool,
},
InvalidNamedArguments {
fn_name: String,
},
InvalidPassByReference {
fn_name: String,
param: String,
},
InvalidPropertyFetch {
ty: String,
},
InvalidMethodCall {
method: String,
ty: String,
},
InvalidMemberName {
member: String,
ty: String,
},
NativeResourceType {
class: String,
},
InvalidUnpack {
ty: String,
},
InvalidArrayAccess {
ty: String,
},
PossiblyInvalidArrayAccess {
ty: String,
},
InvalidArrayAssignment {
ty: String,
},
InvalidPropertyAssignment {
property: String,
expected: String,
actual: String,
},
PossiblyNullPropertyAssignmentValue {
property: String,
expected: String,
actual: String,
},
PossiblyFalsePropertyAssignmentValue {
property: String,
expected: String,
actual: String,
},
PossiblyInvalidPropertyAssignmentValue {
property: String,
expected: String,
actual: String,
},
InvalidCast {
from: String,
to: String,
},
InvalidStaticInvocation {
class: String,
method: String,
},
InvalidOperand {
op: String,
left: String,
right: String,
},
PossiblyInvalidOperand {
op: String,
left: String,
right: String,
},
PossiblyNullOperand {
op: String,
ty: String,
},
DivisionByZero {
op: String,
},
RawObjectIteration {
ty: String,
},
PossiblyRawObjectIteration {
ty: String,
},
InvalidGeneratorIteration {
ty: String,
send: String,
},
MismatchingDocblockReturnType {
declared: String,
inferred: String,
},
MismatchingDocblockParamType {
param: String,
declared: String,
inferred: String,
},
TypeCheckMismatch {
var: String,
expected: String,
actual: String,
},
Trace {
variable: String,
type_info: String,
},
InvalidArrayOffset {
expected: String,
actual: String,
},
NonExistentArrayOffset {
key: String,
},
PossiblyInvalidArrayOffset {
expected: String,
actual: String,
},
DuplicateArrayKey {
key: String,
},
RedundantCondition {
always_true: bool,
unreachable: Option<String>,
},
RedundantCast {
from: String,
to: String,
},
UnnecessaryVarAnnotation {
var: String,
},
TypeDoesNotContainType {
left: String,
right: String,
},
ParadoxicalCondition {
value: String,
},
DocblockTypeContradiction {
expr: String,
declared: String,
},
ImpossibleIdenticalComparison {
op: String,
left: String,
right: String,
},
ImpossibleLooseComparison {
op: String,
left: String,
right: String,
},
UnevaluatedCode {
reason: String,
},
UnusedVariable {
name: String,
},
UnusedParam {
name: String,
},
UnreachableCode,
UnhandledMatchCondition {
detail: String,
},
UnusedMethod {
class: String,
method: String,
},
UnusedProperty {
class: String,
property: String,
},
UnusedFunction {
name: String,
},
UnusedForeachValue {
name: String,
},
UnusedClass {
class: String,
},
UnusedConstant {
class: String,
constant: String,
},
UnusedSuppress {
kind: String,
},
ArgumentTypeCoercion {
param: String,
fn_name: String,
expected: String,
actual: String,
},
PropertyTypeCoercion {
property: String,
expected: String,
actual: String,
},
ImpurePropertyAssignment {
property: String,
},
ImpureMethodCall {
method: String,
},
ImpureGlobalVariable {
variable: String,
},
ImpureStaticVariable {
variable: String,
},
ImpureStaticPropertyAssignment {
class: String,
property: String,
},
ImpureStaticPropertyAccess {
class: String,
property: String,
},
ImpureByRefAssignment {
variable: String,
},
ImpureFunctionCall {
fn_name: String,
},
ImmutablePropertyModification {
receiver: String,
property: String,
},
ReadonlyPropertyAssignment {
class: String,
property: String,
unset: bool,
},
ReadonlyPropertyAlreadyInitialized {
class: String,
property: String,
},
UnimplementedAbstractMethod {
class: String,
method: String,
},
UnimplementedInterfaceMethod {
class: String,
interface: String,
method: String,
},
MethodSignatureMismatch {
class: String,
method: String,
detail: String,
},
OverriddenMethodAccess {
class: String,
method: String,
parent: String,
visibility: String,
},
OverriddenPropertyAccess {
class: String,
property: String,
parent: String,
visibility: String,
},
PropertyTypeRedeclarationMismatch {
class: String,
property: String,
parent: String,
expected: String,
covariant: bool,
before_php85: bool,
},
NonInvariantDocblockPropertyType {
class: String,
property: String,
parent: String,
expected: String,
actual: String,
},
ReadonlyPropertyRedeclarationMismatch {
parent_class: String,
class: String,
property: String,
parent_readonly: bool,
},
StaticPropertyRedeclarationMismatch {
parent_class: String,
class: String,
property: String,
parent_static: bool,
},
ReadonlyClassExtendsMismatch {
parent: String,
child: String,
parent_readonly: bool,
},
InvalidReadonlyPropertyDeclaration {
class: String,
property: String,
},
BackedEnumCaseTypeMismatch {
enum_name: String,
case_name: String,
expected: String,
actual: String,
},
DuplicateEnumCaseValue {
enum_name: String,
first_case: String,
case_name: String,
},
DirectConstructorCall {
class: String,
},
InvalidExtendClass {
parent: String,
child: String,
reason: Option<String>,
},
FinalMethodOverridden {
class: String,
method: String,
parent: String,
},
AbstractInstantiation {
class: String,
},
AbstractMethodCall {
class: String,
method: String,
},
InterfaceInstantiation {
class: String,
},
EnumInstantiation {
class: String,
},
TraitInstantiation {
class: String,
},
InvalidDynamicProperty {
class: String,
property: String,
},
InvalidOverride {
class: String,
member: String,
},
TaintedInput {
sink: String,
},
TaintedHtml,
TaintedSql,
TaintedShell,
TaintedLlmPrompt,
TaintedHeader,
TaintedCookie,
TaintedSsrf,
TaintedLdap,
TaintedXpath,
TaintedCallable,
TaintedFile,
TaintedInclude,
TaintedEval,
TaintedUnserialize,
InsecurePasswordHash {
reason: String,
},
WeakCryptography {
reason: String,
},
InsecureSessionConfig {
reason: String,
},
InsecureRandomness {
context: String,
},
TaintedXml,
UnsafeUnserialize,
UnserializeGadget {
class: String,
method: String,
},
MissingSensitiveParameter {
param: String,
},
TaintedMassAssignment {
target: String,
},
TaintedCommandArgument,
QuotedShellEscape,
UnrestrictedFileUpload,
HostHeaderInjection {
target: String,
},
TaintedNoSql,
TaintedRegex,
TaintedEnvironment,
UnescapedLikeWildcard,
UnquotedSqlEscape,
InsufficientHtmlEscape,
MissingAuthorizationCheck {
handler: String,
missing: String,
who: String,
},
UntracedTaint {
call: String,
reason: String,
},
TaintedCsv,
TaintedLog,
ResourceExhaustion {
function: String,
},
SpoofableClientIp,
CodeAfterRedirect,
InsecureCheckResult {
reason: String,
},
LdapAnonymousBind,
InsecureFilePermissions {
reason: String,
},
HardcodedCredential {
what: String,
},
InsecureCors,
PredictableSeed {
function: String,
},
ObfuscatedCode,
InsecureTls {
reason: String,
},
TimingUnsafeComparison {
what: String,
},
InvalidTemplateParam {
name: String,
expected_bound: String,
actual: String,
},
ShadowedTemplateParam {
name: String,
},
IfThisIsMismatch {
class: String,
method: String,
expected: String,
actual: String,
},
DeprecatedCall {
name: String,
message: Option<Arc<str>>,
},
DeprecatedProperty {
class: String,
property: String,
message: Option<Arc<str>>,
},
DeprecatedConstant {
class: String,
constant: String,
message: Option<Arc<str>>,
},
OptionalParameterBeforeRequired {
message: String,
},
ImplicitlyNullableParameter {
message: String,
},
DeprecatedSyntax {
message: String,
},
DynamicPropertyCreation {
class: String,
property: String,
},
DeprecatedInterface {
name: String,
message: Option<Arc<str>>,
},
DeprecatedTrait {
name: String,
message: Option<Arc<str>>,
},
DeprecatedMethodCall {
class: String,
method: String,
message: Option<Arc<str>>,
},
DeprecatedMethod {
class: String,
method: String,
message: Option<Arc<str>>,
},
DeprecatedClass {
name: String,
message: Option<Arc<str>>,
},
InternalMethod {
class: String,
method: String,
},
MissingReturnType {
fn_name: String,
},
MissingClosureReturnType,
MissingParamType {
fn_name: String,
param: String,
},
MissingPropertyType {
class: String,
property: String,
},
InvalidThrow {
ty: String,
},
InvalidCatch {
ty: String,
},
UnreachableCatch {
ty: String,
shadowed_by: String,
},
MissingThrowsDocblock {
class: String,
},
UndefinedThrowsDocblock {
name: String,
},
ImplicitToStringCast {
class: String,
},
ImplicitFloatToIntCast {
from: String,
},
ParseError {
message: String,
code: String,
},
CompileError {
message: String,
code: String,
},
InvalidDocblock {
message: String,
},
InvalidDocblockType {
message: String,
},
MixedArgument {
param: String,
fn_name: String,
},
MixedAssignment {
var: String,
},
MixedMethodCall {
method: String,
},
UnsupportedReferenceUsage,
NoInterfaceProperties {
property: String,
},
UndefinedDocblockClass {
name: String,
},
MissingConstructor {
class: String,
},
PropertyPossiblyUninitialized {
class: String,
property: String,
},
MixedFunctionCall,
MixedReturnStatement {
declared: String,
},
MixedPropertyFetch {
property: String,
},
MixedPropertyAssignment {
property: String,
},
MixedArrayAccess,
MixedArrayOffset,
MixedClone,
InvalidClone {
ty: String,
reason: CloneFailure,
},
PossiblyInvalidClone {
ty: String,
},
InvalidToString {
class: String,
},
CircularInheritance {
class: String,
},
InvalidTraitUse {
trait_name: String,
reason: String,
},
ForbiddenCode {
message: String,
},
InvalidAttribute {
message: String,
},
UndefinedAttributeClass {
name: String,
},
WrongCaseFunction {
used: String,
canonical: String,
},
WrongCaseMethod {
class: String,
used: String,
canonical: String,
},
WrongCaseClass {
used: String,
canonical: String,
},
DuplicateClass {
name: String,
},
DuplicateInterface {
name: String,
},
DuplicateTrait {
name: String,
},
DuplicateEnum {
name: String,
},
DuplicateFunction {
name: String,
},
UseStatementHasNoEffect {
name: String,
},
PrivateFinalMethod {
class: String,
method: String,
},
NonPublicMagicMethod {
class: String,
method: String,
},
NoDiscardReturnIgnored {
callee: String,
message: Option<String>,
},
AnalyzerError {
message: String,
},
PluginIssue {
name: String,
message: String,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NonStaticSelfCall
Emitted by mir-analyzer/src/expr/variables.rs.
Fixtures: tests/fixtures/by-kind/invalid_scope/.
Emitted by mir-analyzer/src/call/static_call.rs.
Fixtures: tests/fixtures/by-kind/invalid_scope/self_non_static_invocation.phpt.
InvalidScope
UndefinedVariable
Emitted by mir-analyzer/src/expr/variables.rs.
Fixtures: tests/fixtures/by-kind/undefined_variable/.
UndefinedFunction
Emitted by mir-analyzer/src/call/function.rs.
Fixtures: tests/fixtures/by-kind/undefined_function/.
UndefinedMethod
Emitted by mir-analyzer/src/call/static_call.rs.
Fixtures: tests/fixtures/by-kind/undefined_method/.
PossiblyUndefinedMethod
Emitted by mir-analyzer/src/call/method.rs.
Fixtures: tests/fixtures/by-kind/undefined_method/.
UndefinedClass
Emitted by mir-analyzer/src/batch/mod.rs.
Fixtures: tests/fixtures/by-kind/undefined_class/.
UndefinedProperty
Emitted by mir-analyzer/src/expr/objects.rs.
Fixtures: tests/fixtures/by-kind/undefined_property/.
InaccessibleProperty
A private or protected property is read from outside the scope PHP
visibility rules allow — a fatal error at runtime.
Emitted by mir-analyzer/src/expr/objects.rs.
Fixtures: tests/fixtures/by-kind/inaccessible_property/.
UndefinedConstant
Emitted by mir-analyzer/src/expr/variables.rs.
Fixtures: tests/fixtures/by-kind/undefined_constant/.
InaccessibleClassConstant
Emitted by mir-analyzer/src/expr/objects.rs.
Fixtures: tests/fixtures/by-kind/invalid_argument/invalid_*_class_const_fetch*.phpt.
PossiblyUndefinedVariable
Emitted by mir-analyzer/src/expr/variables.rs.
Fixtures: tests/fixtures/by-kind/possibly_undefined_variable/.
UndefinedTrait
Emitted by mir-analyzer/src/body_analysis/mod.rs.
Fixtures: tests/fixtures/by-kind/undefined_trait/.
TraitConstantAccessedDirectly
A trait’s constant is fetched directly (SomeTrait::CONST) rather
than through a class that uses it — a PHP fatal error regardless of
whether the constant exists, since a trait is never itself a valid
constant-access target.
Emitted by mir-analyzer/src/expr/objects.rs.
Fixtures: tests/fixtures/by-kind/undefined_class/trait_constant_accessed_directly*.phpt.
UndefinedTraitAliasMethod
A trait use adaptation (use T { T::missing as alias; }, or an
unqualified as naming no method any used trait declares) aliases a
method that doesn’t exist — a PHP fatal error at class-declaration
time, checked the same way a bad insteadof/undefined trait already
is by check_trait_constraints.
Emitted by mir-analyzer/src/body_analysis/classes.rs.
Fixtures: tests/fixtures/by-kind/undefined_method/trait_alias*.phpt.
ParentNotFound
Emitted when parent is used in a class that has no parent (the parser’s ParentWithoutParentClass).
Fixtures: tests/fixtures/by-kind/parent_not_found/.
InvalidStringClass
Emitted by mir-analyzer/src/expr/objects.rs.
Fixtures: tests/fixtures/by-kind/invalid_string_class/.
NotAnInterface
Emitted by mir-analyzer/src/call/args/types.rs when an interface-string-typed
argument names a class or trait that exists but is not an interface.
Fixtures: tests/fixtures/by-kind/invalid_argument/interface_string_*.phpt.
NullArgument
Emitted by mir-analyzer/src/call/args.rs.
Fixtures: tests/fixtures/by-kind/null_argument/.
NullPropertyFetch
Emitted by mir-analyzer/src/expr/objects.rs.
Fixtures: tests/fixtures/by-kind/null_property_fetch/.
NullMethodCall
Emitted by mir-analyzer/src/call/method.rs.
Fixtures: tests/fixtures/by-kind/null_method_call/.
NullArrayAccess
Emitted by mir-analyzer/src/expr/arrays.rs.
Fixtures: tests/fixtures/by-kind/null_array_access/.
PossiblyNullArgument
Emitted by mir-analyzer/src/call/args.rs.
Fixtures: tests/fixtures/by-kind/possibly_null_argument/.
PossiblyInvalidArgument
Emitted by mir-analyzer/src/call/args.rs.
Fixtures: tests/fixtures/by-kind/possibly_invalid_argument/.
PossiblyNullPropertyFetch
Emitted by mir-analyzer/src/expr/objects.rs.
Fixtures: tests/fixtures/by-kind/possibly_null_property_fetch/.
PossiblyNullMethodCall
Emitted by mir-analyzer/src/call/method.rs.
Fixtures: tests/fixtures/by-kind/possibly_null_method_call/.
PossiblyNullArrayAccess
Emitted by mir-analyzer/src/expr/arrays.rs.
Fixtures: tests/fixtures/by-kind/possibly_null_array_access/.
NullableReturnStatement
Emitted by mir-analyzer/src/stmt/flow.rs.
Fixtures: tests/fixtures/by-kind/nullable_return_statement/.
InvalidReturnType
Emitted by mir-analyzer/src/stmt/flow.rs.
Fixtures: tests/fixtures/by-kind/invalid_return_type/.
LessSpecificReturnStatement
Emitted by mir-analyzer/src/stmt/flow.rs.
Fixtures: tests/fixtures/by-kind/less_specific_return_statement/.
InvalidArgument
Emitted by mir-analyzer/src/call/args.rs.
Fixtures: tests/fixtures/by-kind/invalid_argument/.
InvalidScalarArgument
Emitted by mir-analyzer/src/call/args/types.rs.
Fixtures: tests/fixtures/by-kind/invalid_scalar_argument/.
TooFewArguments
Emitted by mir-analyzer/src/call/callable.rs.
Fixtures: tests/fixtures/by-kind/too_few_arguments/.
TooManyArguments
Emitted by mir-analyzer/src/call/function.rs.
Fixtures: tests/fixtures/by-kind/too_many_arguments/.
InvalidNamedArgument
Emitted by mir-analyzer/src/call/args.rs.
Fixtures: tests/fixtures/by-kind/invalid_named_argument/.
InvalidNamedArguments
Emitted when a function/method tagged @no-named-arguments is called with named args.
Fixtures: tests/fixtures/by-kind/invalid_named_argument/.
InvalidPassByReference
Emitted by mir-analyzer/src/call/args.rs.
Fixtures: tests/fixtures/by-kind/invalid_pass_by_reference/.
InvalidPropertyFetch
Emitted by mir-analyzer/src/expr/objects.rs.
Fixtures: tests/fixtures/by-kind/invalid_property_fetch/bad_fetch.phpt.
InvalidMethodCall
Emitted by mir-analyzer/src/call/method.rs.
Fixtures: tests/fixtures/by-kind/invalid_method_call/.
InvalidMemberName
Emitted by mir-analyzer/src/expr/mod.rs for an object used as $obj->{$name}.
Fixtures: tests/fixtures/by-kind/invalid_member_name/.
NativeResourceType
Emitted by mir-analyzer/src/diagnostics.rs for resource used as a native type.
Fixtures: tests/fixtures/by-kind/native_resource_type/.
InvalidUnpack
Emitted by mir-analyzer/src/call/args.rs for f(...$x) with a scalar or null.
Fixtures: tests/fixtures/by-kind/invalid_unpack/.
InvalidArrayAccess
Emitted by mir-analyzer/src/expr/arrays.rs.
Fixtures: tests/fixtures/by-kind/invalid_array_access/.
PossiblyInvalidArrayAccess
Emitted by mir-analyzer/src/expr/arrays.rs.
Fixtures: tests/fixtures/by-kind/possibly_invalid_array_access/.
InvalidArrayAssignment
Emitted by mir-analyzer/src/expr/assignment.rs.
Fixtures: tests/fixtures/by-kind/invalid_array_assignment/.
InvalidPropertyAssignment
Emitted by mir-analyzer/src/expr/assignment.rs.
Fixtures: tests/fixtures/by-kind/invalid_property_assignment/.
PossiblyNullPropertyAssignmentValue
Emitted by mir-analyzer/src/expr/assignment.rs.
Fixtures: tests/fixtures/by-kind/possibly_invalid_property_assignment/.
PossiblyFalsePropertyAssignmentValue
Emitted by mir-analyzer/src/expr/assignment.rs.
Fixtures: tests/fixtures/by-kind/possibly_invalid_property_assignment/.
PossiblyInvalidPropertyAssignmentValue
Emitted by mir-analyzer/src/expr/assignment.rs.
Fixtures: tests/fixtures/by-kind/possibly_invalid_property_assignment/.
InvalidCast
Emitted by mir-analyzer/src/expr/casts.rs.
Fixtures: tests/fixtures/by-kind/invalid_cast/.
InvalidStaticInvocation
Emitted by mir-analyzer/src/call/static_call.rs.
Fixtures: tests/fixtures/by-kind/undefined_method/static_invocation*.phpt.
InvalidOperand
Emitted by mir-analyzer/src/expr/binary.rs and unary.rs for operations on
non-numeric or non-bitwise-compatible operands.
Fixtures: tests/fixtures/by-kind/invalid_operand/.
PossiblyInvalidOperand
Emitted when a union-typed operand has some non-numeric/non-stringifiable members.
Fixtures: tests/fixtures/by-kind/invalid_operand/.
PossiblyNullOperand
Emitted when a divisor operand could be null (potential division by zero).
Fixtures: tests/fixtures/by-kind/invalid_operand/.
DivisionByZero
Emitted when a divisor operand is DEFINITELY the literal 0 — an
unconditional runtime DivisionByZeroError.
Fixtures: tests/fixtures/by-kind/invalid_operand/.
RawObjectIteration
Emitted when yield from is used with a non-iterable object (no Traversable).
Fixtures: tests/fixtures/by-kind/invalid_operand/.
PossiblyRawObjectIteration
Emitted when yield from might be used with a non-iterable object.
Fixtures: tests/fixtures/by-kind/invalid_operand/.
InvalidGeneratorIteration
foreach over a generator whose send type does not accept the null each step sends.
Emitted by mir-analyzer/src/stmt/control_flow.rs.
Fixtures: tests/fixtures/by-kind/invalid_generator_iteration/.
MismatchingDocblockReturnType
Emitted by mir-analyzer/src/body_analysis/mod.rs.
Fixtures: tests/fixtures/by-kind/mismatching_docblock_return_type/.
MismatchingDocblockParamType
Emitted by mir-analyzer/src/body_analysis/mod.rs.
Fixtures: tests/fixtures/by-kind/mismatching_docblock_param_type/.
TypeCheckMismatch
Emitted by @mir-check EXPR is TYPE docblock directives (test-only —
never raised by real analysis of user code). var is the checked
expression’s source text verbatim (e.g. $x, $h->status,
self::$prop), already including any $ it needs.
Fixtures: tests/fixtures/by-kind/type_check_mismatch/.
Trace
Emitted by @trace $var docblock annotation. Shows inferred type.
Fixtures: tests/fixtures/by-kind/trace/.
InvalidArrayOffset
Emitted by mir-analyzer/src/expr/arrays.rs.
Fixtures: tests/fixtures/by-kind/invalid_array_offset/.
NonExistentArrayOffset
Emitted by mir-analyzer/src/expr/arrays.rs when a TKeyedArray is accessed with
a literal key that does not exist in the shape.
Fixtures: tests/fixtures/by-kind/invalid_array_offset/.
PossiblyInvalidArrayOffset
Emitted by mir-analyzer/src/expr/assignment.rs.
Fixtures: tests/fixtures/by-kind/possibly_invalid_array_offset/.
DuplicateArrayKey
Emitted by mir-analyzer/src/expr/arrays.rs when an array literal repeats
the same key — the earlier entry is silently overwritten at runtime,
almost always a copy-paste mistake.
Fixtures: tests/fixtures/by-kind/duplicate_array_key/.
RedundantCondition
Emitted by mir-analyzer/src/stmt/control_flow.rs and mir-analyzer/src/expr/conditional.rs.
Fixtures: tests/fixtures/by-kind/redundant_condition/.
Fields
RedundantCast
Emitted by mir-analyzer/src/expr/casts.rs.
Fixtures: tests/fixtures/by-kind/redundant_cast/.
UnnecessaryVarAnnotation
Emitted by mir-analyzer/src/stmt/mod.rs.
Fixtures: tests/fixtures/by-kind/unnecessary_var_annotation/.
TypeDoesNotContainType
Emitted by mir-analyzer/src/stmt/control_flow.rs and mir-analyzer/src/expr/conditional.rs.
Fixtures: tests/fixtures/by-kind/type_does_not_contain_type/.
ParadoxicalCondition
Emitted by mir-analyzer/src/stmt/control_flow.rs and mir-analyzer/src/expr/conditional.rs.
Fixtures: tests/fixtures/by-kind/paradoxical_condition/.
DocblockTypeContradiction
A docblock-declared type makes a subsequent assertion or comparison
impossible (e.g. assert($a < 4) on a @param int<5, max> $a).
Emitted by mir-analyzer/src/narrowing.rs.
Fixtures: tests/fixtures/by-kind/docblock_type_contradiction/.
ImpossibleIdenticalComparison
A === or !== comparison between two types that can never be strictly
equal — e.g. $int === $string or $obj !== null where $obj is a
non-nullable typed value.
Emitted by mir-analyzer/src/expr/binary.rs.
Fixtures: tests/fixtures/by-kind/impossible_identical_comparison/.
ImpossibleLooseComparison
A == or != comparison between two types that can never be loosely
equal in PHP — e.g. $obj == null, $arr == "foo", or a non-empty
array == false. PHP’s type-juggling rules make these always false (or
always true for !=), which almost certainly indicates a logic bug.
Emitted by mir-analyzer/src/expr/binary.rs.
Fixtures: tests/fixtures/by-kind/impossible_loose_comparison/.
UnevaluatedCode
A switch/match arm that can never be reached given the subject’s
inferred type — most often a gettype() arm tested against a string
that gettype() never returns (e.g. case "int" — it returns
"integer").
Emitted by mir-analyzer/src/stmt/control_flow.rs and mir-analyzer/src/expr/conditional.rs.
Fixtures: tests/fixtures/by-kind/unevaluated_code/.
UnusedVariable
Emitted by mir-analyzer/src/diagnostics.rs.
Fixtures: tests/fixtures/by-kind/unused_variable/.
UnusedParam
Emitted by mir-analyzer/src/diagnostics.rs.
Fixtures: tests/fixtures/by-kind/unused_param/.
UnreachableCode
Emitted by mir-analyzer/src/stmt/mod.rs.
Fixtures: tests/fixtures/by-kind/unreachable_code/.
UnhandledMatchCondition
Emitted by mir-analyzer/src/expr/conditional.rs.
Fixtures: tests/fixtures/by-kind/unreachable_code/.
UnusedMethod
Emitted by mir-analyzer/src/dead_code.rs.
Fixtures: tests/fixtures/by-kind/unused_method/.
UnusedProperty
Emitted by mir-analyzer/src/dead_code.rs.
Fixtures: tests/fixtures/by-kind/unused_property/.
UnusedFunction
Emitted by mir-analyzer/src/dead_code.rs.
Fixtures: tests/fixtures/by-kind/unused_function/.
UnusedForeachValue
Emitted by mir-analyzer/src/diagnostics.rs.
Fixtures: tests/fixtures/by-kind/unused_foreach_value/.
UnusedClass
Emitted by mir-analyzer/src/dead_code.rs.
Fixtures: tests/fixtures/by-kind/unused_class/.
UnusedConstant
Emitted by mir-analyzer/src/dead_code.rs.
Fixtures: tests/fixtures/by-kind/unused_constant/.
UnusedSuppress
Emitted by mir-analyzer/src/batch/mod.rs when a @psalm-suppress /
@mir-suppress / @suppress annotation does not match any actual issue.
Fixtures: tests/fixtures/by-kind/unused_suppress/.
ArgumentTypeCoercion
Emitted by mir-analyzer/src/call/args/types.rs.
Fixtures: tests/fixtures/by-kind/argument_type_coercion/.
PropertyTypeCoercion
Emitted by mir-analyzer/src/expr/assignment.rs.
Fixtures: tests/fixtures/by-kind/property_type_coercion/.
ImpurePropertyAssignment
Emitted when a @pure function assigns to a parameter’s property.
ImpureMethodCall
Emitted when a @pure function calls an impure method on a parameter.
ImpureGlobalVariable
Emitted when a @pure function uses a global variable.
ImpureStaticVariable
Emitted when a @pure function uses a static variable.
ImpureStaticPropertyAssignment
Emitted when a @pure function assigns to a class static property
(self::$x = ..., Foo::$x = ...) — static properties are shared
external state, same as a global variable.
ImpureStaticPropertyAccess
Emitted when a @pure function reads a class static property
(self::$x, Foo::$x) — reading shared external state is just as
non-deterministic across calls as writing it, mirroring
ImpureGlobalVariable’s treatment of a superglobal read.
ImpureByRefAssignment
Emitted when a @pure function assigns to one of its own by-reference
parameters (function f(int &$x) { $x = 1; }) — this mutates
caller-visible state through the reference, a side effect @pure
forbids just as much as a global/static-variable write.
ImpureFunctionCall
Emitted by mir-analyzer/src/call/function.rs when a @pure function calls a
non-pure named function.
Fixtures: tests/fixtures/by-kind/impure_function_call/.
ImmutablePropertyModification
Emitted when a non-constructor method of a @psalm-immutable class assigns to a
$this property, or when ANY code writes to a property of an object whose class is
@psalm-immutable (receiver is the rendered receiver expression — $this for the
former, the actual receiver’s source text, e.g. $b, for the latter).
Fixtures: tests/fixtures/by-kind/immutable_property_modification/.
ReadonlyPropertyAssignment
Emitted by mir-analyzer/src/expr/assignment.rs.
Fixtures: tests/fixtures/by-kind/readonly_property_assignment/.
ReadonlyPropertyAlreadyInitialized
A second write to a readonly property in a scope where writes are
otherwise allowed (the declaring constructor, or any method for a
native readonly property) — PHP throws Error: Cannot modify readonly property ... once initialized on the second write.
Emitted by mir-analyzer/src/expr/assignment.rs.
Fixtures: tests/fixtures/by-kind/readonly_property_already_initialized/.
UnimplementedAbstractMethod
Emitted by mir-analyzer/src/class/mod.rs.
Fixtures: tests/fixtures/by-kind/unimplemented_abstract_method/.
UnimplementedInterfaceMethod
Emitted by mir-analyzer/src/class/mod.rs.
Fixtures: tests/fixtures/by-kind/unimplemented_interface_method/.
MethodSignatureMismatch
Emitted by mir-analyzer/src/class/mod.rs.
Fixtures: tests/fixtures/by-kind/method_signature_mismatch/.
OverriddenMethodAccess
Emitted by mir-analyzer/src/class/mod.rs.
Fixtures: tests/fixtures/by-kind/overridden_method_access/.
OverriddenPropertyAccess
Emitted by mir-analyzer/src/class/mod.rs.
Fixtures: tests/fixtures/by-kind/overridden_property_access/.
PropertyTypeRedeclarationMismatch
Emitted by mir-analyzer/src/class/overrides.rs.
Fixtures: tests/fixtures/by-kind/property_type_redeclaration_mismatch/.
Fields
NonInvariantDocblockPropertyType
Emitted by mir-analyzer/src/class/overrides.rs.
Fixtures: tests/fixtures/by-kind/non_invariant_docblock_property_type/.
ReadonlyPropertyRedeclarationMismatch
Emitted by mir-analyzer/src/class/overrides.rs.
Fixtures: tests/fixtures/by-kind/readonly_property_redeclaration_mismatch/.
Fields
StaticPropertyRedeclarationMismatch
Emitted by mir-analyzer/src/class/overrides.rs.
Fixtures: tests/fixtures/by-kind/static_property_redeclaration_mismatch/.
Fields
ReadonlyClassExtendsMismatch
A readonly class extends a non-readonly parent, or vice versa — PHP
requires both sides of an extends relationship to agree on the
whole-class readonly modifier.
Emitted by mir-analyzer/src/class/mod.rs.
Fixtures: tests/fixtures/by-kind/readonly_class_extends_mismatch/.
Fields
InvalidReadonlyPropertyDeclaration
A native readonly property declaration carries a default value — a
PHP fatal. (The sibling untyped-readonly-property fatal is already
caught by the parser itself as a CompileError.)
Emitted by mir-analyzer/src/collector/class.rs.
Fixtures: tests/fixtures/by-kind/invalid_readonly_property_declaration/.
BackedEnumCaseTypeMismatch
Emitted by mir-analyzer/src/collector/enum.rs.
Fixtures: tests/fixtures/by-kind/backed_enum_case_type_mismatch/.
DuplicateEnumCaseValue
Two cases of a backed enum have the same value — a PHP fatal.
Emitted by mir-analyzer/src/collector/enum.rs.
Fixtures: tests/fixtures/by-kind/duplicate_enum_case_value/.
DirectConstructorCall
Emitted by mir-analyzer/src/call/method.rs.
Fixtures: tests/fixtures/by-kind/undefined_method/direct_constructor_call*.phpt.
InvalidExtendClass
Emitted by mir-analyzer/src/class/mod.rs.
Fixtures: tests/fixtures/by-kind/invalid_extend_class/.
Fields
FinalMethodOverridden
Emitted by mir-analyzer/src/class/mod.rs.
Fixtures: tests/fixtures/by-kind/final_method_overridden/.
AbstractInstantiation
Emitted by mir-analyzer/src/expr/objects.rs.
Fixtures: tests/fixtures/by-kind/abstract_instantiation/.
AbstractMethodCall
Emitted by mir-analyzer/src/call/static_call.rs.
Fixtures: tests/fixtures/by-kind/abstract_instantiation/prevent_abstract_method_call.phpt.
InterfaceInstantiation
Emitted by mir-analyzer/src/expr/objects.rs.
Fixtures: tests/fixtures/by-kind/abstract_instantiation/interface_instantiation.phpt.
EnumInstantiation
Emitted by mir-analyzer/src/expr/objects.rs.
Fixtures: tests/fixtures/by-kind/abstract_instantiation/enum_instantiation.phpt.
TraitInstantiation
Emitted by mir-analyzer/src/expr/objects.rs.
Fixtures: tests/fixtures/by-kind/abstract_instantiation/trait_instantiation.phpt.
InvalidDynamicProperty
A write creates an undeclared property on an enum or readonly class, which throws.
Emitted by mir-analyzer/src/expr/assignment.rs.
Fixtures: tests/fixtures/by-kind/dynamic_property_creation/.
InvalidOverride
Emitted by mir-analyzer/src/class/overrides.rs when #[Override] is declared
but no overridable parent method (or, from PHP 8.5, property) exists.
member is name() for a method, $name for a property.
Fixtures: tests/fixtures/by-kind/invalid_override/.
TaintedInput
Emitted for a @taint-sink kind with no dedicated issue.
Fixtures: tests/fixtures/by-kind/tainted_input/.
TaintedHtml
Emitted by mir-analyzer/src/call/function.rs.
Fixtures: tests/fixtures/by-kind/tainted_html/.
TaintedSql
Emitted by mir-analyzer/src/call/function.rs.
Fixtures: tests/fixtures/by-kind/tainted_sql/.
TaintedShell
Emitted by mir-analyzer/src/call/function.rs.
Fixtures: tests/fixtures/by-kind/tainted_shell/.
TaintedLlmPrompt
Emitted by mir-analyzer/src/call/method.rs when a tainted value reaches a
@taint-sink llm_prompt annotated parameter.
Fixtures: tests/fixtures/by-kind/tainted_llm_prompt/.
TaintedHeader
Emitted by mir-analyzer/src/call/function.rs.
Fixtures: tests/fixtures/by-kind/tainted_header/.
TaintedCookie
Emitted by mir-analyzer/src/call/function.rs.
Fixtures: tests/fixtures/by-kind/tainted_cookie/.
TaintedSsrf
Emitted by mir-analyzer/src/call/function.rs.
Fixtures: tests/fixtures/by-kind/tainted_ssrf/.
TaintedLdap
Emitted by mir-analyzer/src/call/function.rs.
Fixtures: tests/fixtures/by-kind/tainted_ldap/.
TaintedXpath
Emitted by mir-analyzer/src/call/method.rs.
Fixtures: tests/fixtures/by-kind/tainted_xpath/.
TaintedCallable
Emitted by mir-analyzer/src/call/function.rs.
Fixtures: tests/fixtures/by-kind/tainted_callable/.
TaintedFile
Emitted by mir-analyzer/src/call/function.rs for filesystem path arguments.
Fixtures: tests/fixtures/by-kind/tainted_file/.
TaintedInclude
Emitted by mir-analyzer/src/expr/mod.rs for include/require paths.
Fixtures: tests/fixtures/by-kind/tainted_include/.
TaintedEval
Emitted by mir-analyzer/src/expr/mod.rs for eval() code.
Fixtures: tests/fixtures/by-kind/tainted_eval/.
TaintedUnserialize
Emitted by mir-analyzer/src/call/function.rs for unserialize() payloads.
Fixtures: tests/fixtures/by-kind/tainted_unserialize/.
InsecurePasswordHash
password_hash() is called with options or input that weaken it.
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/insecure_password_hash/.
WeakCryptography
openssl_encrypt() or openssl_decrypt() is called with a broken cipher, a hardcoded key or IV, or an AEAD cipher without its tag.
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/weak_cryptography/.
InsecureSessionConfig
Code turns off a session protection that PHP’s secure defaults rely on, or takes the session ID from the request.
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/insecure_session_config/.
InsecureRandomness
A session ID or a security token comes from a guessable random generator.
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/insecure_randomness/.
TaintedXml
User-controlled XML is parsed with flags that load external entities or lift libxml’s size limits.
Emitted by mir-analyzer/src/call/function.rs.
Fixtures: tests/fixtures/by-kind/tainted_xml/.
UnsafeUnserialize
unserialize() of data that isn’t a literal, without an allowed_classes restriction.
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/unsafe_unserialize/.
UnserializeGadget
A magic method that runs on unserialized objects passes one of its properties to a dangerous call.
Emitted by mir-analyzer/src/call/function.rs.
Fixtures: tests/fixtures/by-kind/unserialize_gadget/.
MissingSensitiveParameter
A parameter named like a password, secret, token or API key lacks #[\SensitiveParameter].
Emitted by mir-analyzer/src/attributes.rs.
Fixtures: tests/fixtures/by-kind/missing_sensitive_parameter/.
TaintedMassAssignment
User input chooses which property, variable, session key or named argument a write sets.
Emitted by mir-analyzer/src/taint/sinks.rs.
Fixtures: tests/fixtures/by-kind/tainted_mass_assignment/.
TaintedCommandArgument
User input becomes an argument of a program run without a shell and can pass it an option.
Emitted by mir-analyzer/src/taint/sinks.rs.
Fixtures: tests/fixtures/by-kind/tainted_command_argument/.
QuotedShellEscape
An escapeshellarg() result is wrapped in another pair of quotes in a shell command.
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/quoted_shell_escape/.
UnrestrictedFileUpload
An uploaded file is saved under the name the client sent, with no check of its extension or content.
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/unrestricted_file_upload/.
HostHeaderInjection
An email body or outgoing request URL contains a value built from the Host header the client sent.
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/host_header_injection/.
TaintedNoSql
User input reaches a MongoDB $where clause, or may be an array in a MongoDB filter.
Emitted by mir-analyzer/src/taint/sinks.rs.
Fixtures: tests/fixtures/by-kind/tainted_no_sql/.
TaintedRegex
User input is compiled as a regular expression: catastrophic backtracking or a changed match.
Emitted by mir-analyzer/src/taint/sinks.rs.
Fixtures: tests/fixtures/by-kind/tainted_regex/.
TaintedEnvironment
User input is written to the process environment, where it can switch the app’s mode or inject LD_PRELOAD.
Emitted by mir-analyzer/src/taint/sinks.rs.
Fixtures: tests/fixtures/by-kind/tainted_environment/.
UnescapedLikeWildcard
Request data is bound into a LIKE pattern without escaping its % and _ wildcards.
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/unescaped_like_wildcard/.
UnquotedSqlEscape
A quote-escaping function’s result is placed in SQL text outside quotes, where it escapes nothing.
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/unquoted_sql_escape/.
InsufficientHtmlEscape
An HTML-escaping function’s result is placed where it doesn’t stop markup or script:
an attribute whose quotes it leaves raw, an unquoted attribute, or an event handler.
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/insufficient_html_escape/.
MissingAuthorizationCheck
A WordPress AJAX, admin-post or REST handler changes site state without a capability
or nonce check, or a Laravel or Symfony action changes a record the URL selects without
an authorization check. Opt-in (--audit access-control).
Emitted by mir-analyzer/src/frameworks/wordpress/access_control.rs and
mir-analyzer/src/frameworks/controller_access.rs.
Fixtures: tests/fixtures/by-kind/missing_authorization_check/.
UntracedTaint
Tainted data is passed to a call whose callee can’t be resolved, so no sink or callee
summary is checked behind it. Opt-in (--audit taint-coverage).
Emitted by mir-analyzer/src/taint/untraced.rs.
Fixtures: tests/fixtures/by-kind/untraced_taint/.
TaintedCsv
User input is written as a CSV field that a spreadsheet may run as a formula.
Emitted by mir-analyzer/src/taint/sinks.rs.
Fixtures: tests/fixtures/by-kind/tainted_csv/.
TaintedLog
User input reaches a log message, where a line break forges log entries.
Emitted by mir-analyzer/src/taint/sinks.rs.
Fixtures: tests/fixtures/by-kind/tainted_log/.
ResourceExhaustion
A size, count or duration from the request reaches a builtin whose cost grows with it.
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/resource_exhaustion/.
SpoofableClientIp
A condition decides on a client IP taken from X-Forwarded-For, Client-IP or X-Real-IP.
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/spoofable_client_ip/.
CodeAfterRedirect
A header('Location: ...') redirect is followed by output on a path with no exit.
Emitted by mir-analyzer/src/call/function.rs.
Fixtures: tests/fixtures/by-kind/code_after_redirect/.
InsecureCheckResult
A security check treats a function’s error result as success.
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/insecure_check_result/.
LdapAnonymousBind
ldap_bind() takes a password from the request that isn’t checked to be non-empty.
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/ldap_anonymous_bind/.
InsecureFilePermissions
chmod() or umask() with a literal value leaves files writable by every user.
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/insecure_file_permissions/.
HardcodedCredential
A password, key or token is written in the source code.
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/hardcoded_credential/.
InsecureCors
Access-Control-Allow-Origin echoes the request’s Origin header unchecked while credentials are allowed.
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/insecure_cors/.
PredictableSeed
mt_srand() or srand() gets a literal or clock-based seed.
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/predictable_seed/.
ObfuscatedCode
Code passed to eval() or a function called by name comes out of a decoder such as base64_decode().
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/obfuscated_code/.
InsecureTls
A curl or stream context option turns off checking the server’s TLS certificate or host name.
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/insecure_tls/.
TimingUnsafeComparison
A hash_hmac() digest or a stored secret is compared with == or === instead of hash_equals().
Emitted by mir-analyzer/src/security.rs.
Fixtures: tests/fixtures/by-kind/timing_unsafe_comparison/.
InvalidTemplateParam
Emitted by mir-analyzer/src/call/function.rs.
Fixtures: tests/fixtures/by-kind/invalid_template_param/.
ShadowedTemplateParam
Emitted by mir-analyzer/src/call/method.rs.
Fixtures: tests/fixtures/by-kind/shadowed_template_param/.
IfThisIsMismatch
A method annotated @if-this-is X<Y> was called on a receiver whose
type does not satisfy that constraint.
Emitted by mir-analyzer/src/call/method.rs.
Fixtures: tests/fixtures/by-kind/if_this_is_mismatch/.
DeprecatedCall
Emitted by mir-analyzer/src/call/function.rs.
Fixtures: tests/fixtures/by-kind/deprecated_call/.
DeprecatedProperty
Emitted by mir-analyzer/src/expr/objects.rs.
Fixtures: tests/fixtures/by-kind/undefined_property/deprecated_property_*.phpt.
DeprecatedConstant
Emitted by mir-analyzer/src/expr/objects.rs.
Fixtures: tests/fixtures/by-kind/deprecated_call/deprecated_class_const_fetch*.phpt.
OptionalParameterBeforeRequired
An optional parameter before a required one, which PHP deprecates from 8.0; the
message follows the target version.
Emitted by mir-analyzer/src/body_analysis/mod.rs.
Fixtures: tests/fixtures/by-kind/optional_parameter_before_required/.
ImplicitlyNullableParameter
A typed parameter made nullable only by its null default (int $a = null), which
PHP deprecates from 8.4.
Emitted by mir-analyzer/src/body_analysis/mod.rs.
Fixtures: tests/fixtures/by-kind/implicitly_nullable_parameter/.
DeprecatedSyntax
A declaration or statement form PHP deprecates at compile time, with PHP’s message.
Emitted by mir-analyzer/src/body_analysis/deprecated_syntax.rs.
Fixtures: tests/fixtures/by-kind/deprecated_syntax/.
DynamicPropertyCreation
A write creates an undeclared property, which PHP deprecates from 8.2.
Emitted by mir-analyzer/src/expr/assignment.rs.
Fixtures: tests/fixtures/by-kind/dynamic_property_creation/.
DeprecatedInterface
Emitted by mir-analyzer/src/class/mod.rs.
Fixtures: tests/fixtures/by-kind/deprecated_interface/.
DeprecatedTrait
Emitted by mir-analyzer/src/class/mod.rs.
Fixtures: tests/fixtures/by-kind/deprecated_trait/.
DeprecatedMethodCall
Emitted by mir-analyzer/src/call/method.rs.
Fixtures: tests/fixtures/by-kind/deprecated_method_call/.
DeprecatedMethod
Emitted by mir-analyzer/src/call/method.rs.
Fixtures: tests/fixtures/by-kind/deprecated_method/.
DeprecatedClass
Emitted by mir-analyzer/src/class/mod.rs.
Fixtures: tests/fixtures/by-kind/deprecated_class/.
InternalMethod
Emitted by mir-analyzer/src/call/method.rs.
Fixtures: tests/fixtures/by-kind/internal_method/.
MissingReturnType
Emitted by mir-analyzer/src/body_analysis/mod.rs.
Fixtures: tests/fixtures/by-kind/missing_return_type/.
MissingClosureReturnType
Emitted by mir-analyzer/src/expr/closures.rs.
Fixtures: tests/fixtures/by-kind/missing_closure_return_type/.
MissingParamType
Emitted by mir-analyzer/src/body_analysis/mod.rs.
Fixtures: tests/fixtures/by-kind/missing_param_type/.
MissingPropertyType
Emitted by mir-analyzer/src/body_analysis/mod.rs.
Fixtures: tests/fixtures/by-kind/missing_param_type/ (property variants).
InvalidThrow
Emitted by mir-analyzer/src/stmt/flow.rs.
Fixtures: tests/fixtures/by-kind/invalid_throw/.
InvalidCatch
Emitted by mir-analyzer/src/stmt/control_flow.rs.
Fixtures: tests/fixtures/by-kind/invalid_catch/.
UnreachableCatch
Emitted by mir-analyzer/src/stmt/control_flow.rs when a catch type is a
subtype of (or identical to) a type already caught by an earlier catch
clause on the same try — the later block can never run.
Fixtures: tests/fixtures/by-kind/invalid_catch/.
MissingThrowsDocblock
Emitted by mir-analyzer/src/stmt/flow.rs.
Fixtures: tests/fixtures/by-kind/missing_throws_docblock/.
UndefinedThrowsDocblock
@throws declares an exception class that does not exist in the
workspace — the class the docblock promises to raise never was.
Emitted by mir-analyzer/src/body_analysis/mod.rs.
Fixtures: tests/fixtures/by-kind/undefined_throws_docblock/.
ImplicitToStringCast
Emitted by mir-analyzer/src/stmt/expressions.rs.
Fixtures: tests/fixtures/by-kind/implicit_to_string_cast/.
ImplicitFloatToIntCast
Emitted by mir-analyzer/src/call/args.rs.
Fixtures: tests/fixtures/by-kind/implicit_float_to_int_cast/.
ParseError
Emitted by mir-analyzer/src/parser/mod.rs.
Fixtures: tests/fixtures/by-kind/parse_error/.
CompileError
Emitted by mir-analyzer/src/parser/mod.rs.
Fixtures: tests/fixtures/by-kind/compile_error/.
Fields
InvalidDocblock
Emitted by mir-analyzer/src/collector/annotation.rs.
Fixtures: tests/fixtures/by-kind/invalid_docblock/.
InvalidDocblockType
A docblock type is invalid. Not currently emitted; kept for configuration compatibility.
MixedArgument
Emitted by mir-analyzer/src/call/args/types.rs.
Fixtures: tests/fixtures/by-kind/mixed_argument/.
MixedAssignment
Emitted by mir-analyzer/src/expr/assignment.rs and mir-analyzer/src/stmt/control_flow.rs.
Fixtures: tests/fixtures/by-kind/mixed_assignment/.
MixedMethodCall
Emitted by mir-analyzer/src/call/method.rs.
Fixtures: tests/fixtures/by-kind/mixed_method_call/.
UnsupportedReferenceUsage
Emitted when a PHP reference assignment is used (e.g. $b = &$arr[$x]).
Fixtures: tests/fixtures/by-kind/unsupported_reference_usage/.
NoInterfaceProperties
Emitted when a property is accessed on an interface that has @seal-properties
but the property is not declared with @property/@property-read/@property-write.
Fixtures: tests/fixtures/by-kind/undefined_property/magic_interface_*.phpt.
UndefinedDocblockClass
Emitted when a class referenced only in a docblock (@return, @param, etc.)
does not exist.
Fixtures: tests/fixtures/by-kind/mixed_clone/missing_class.phpt.
MissingConstructor
Emitted when a class with non-nullable uninitialized properties has no constructor.
Fixtures: tests/fixtures/by-kind/missing_constructor/.
PropertyPossiblyUninitialized
Emitted when the constructor has a reachable exit path that doesn’t
assign a native-typed, non-nullable, default-less property declared
directly on the class — reading it afterward throws PHP’s “must not
be accessed before initialization”. Scoped to the class’s own
properties only (a property inherited from a parent class is that
parent’s own constructor’s concern) and abstains entirely if the
constructor calls out to any method/function that could have
initialized the property on its behalf, to avoid flagging common
delegating-init patterns it can’t see into.
Emitted by mir-analyzer/src/body_analysis/classes.rs.
Fixtures: tests/fixtures/by-kind/property_possibly_uninitialized/.
MixedFunctionCall
Emitted by mir-analyzer/src/call/function.rs when a dynamic call target is mixed.
Fixtures: tests/fixtures/by-kind/mixed_function_call/.
MixedReturnStatement
Emitted by mir-analyzer/src/stmt/flow.rs.
Fixtures: tests/fixtures/by-kind/mixed_return_statement/.
MixedPropertyFetch
Emitted by mir-analyzer/src/expr/objects.rs.
Fixtures: tests/fixtures/by-kind/mixed_property_fetch/.
MixedPropertyAssignment
Emitted by mir-analyzer/src/expr/assignment.rs.
Fixtures: tests/fixtures/by-kind/mixed_property_assignment/.
MixedArrayAccess
Emitted by mir-analyzer/src/expr/arrays.rs.
Fixtures: tests/fixtures/by-kind/mixed_array_access/.
MixedArrayOffset
Emitted by mir-analyzer/src/expr/arrays.rs.
Fixtures: tests/fixtures/by-kind/mixed_array_offset/.
MixedClone
Emitted by mir-analyzer/src/expr/mod.rs.
Fixtures: tests/fixtures/by-kind/mixed_clone/.
InvalidClone
clone of a value that is definitely not an object (e.g. int, string),
of an enum, or of an object whose private __clone() is out of scope.
Emitted by mir-analyzer/src/expr/mod.rs.
Fixtures: tests/fixtures/by-kind/mixed_clone/, tests/fixtures/by-kind/invalid_clone/.
PossiblyInvalidClone
clone of a union where some members are not objects (e.g. int|Exception).
Emitted by mir-analyzer/src/expr/mod.rs.
Fixtures: tests/fixtures/by-kind/mixed_clone/.
InvalidToString
A __toString method that does not return a string.
Emitted by mir-analyzer/src/body_analysis/mod.rs.
Fixtures: tests/fixtures/by-kind/implicit_to_string_cast/.
CircularInheritance
Emitted by mir-analyzer/src/class/mod.rs.
Fixtures: tests/fixtures/by-kind/circular_inheritance/.
InvalidTraitUse
Emitted by mir-analyzer/src/body_analysis/mod.rs.
Fixtures: tests/fixtures/by-kind/invalid_trait_use/.
ForbiddenCode
Emitted by mir-analyzer/src/expr/mod.rs and mir-analyzer/src/call/function.rs.
Fixtures: tests/fixtures/by-kind/invalid_operand/ (var_dump, shell_exec, backtick).
InvalidAttribute
Emitted by mir-analyzer/src/attributes.rs.
Fixtures: tests/fixtures/by-kind/invalid_attribute/.
UndefinedAttributeClass
Emitted by mir-analyzer/src/attributes.rs.
Fixtures: tests/fixtures/by-kind/undefined_class/missing_attribute_on_*.phpt.
WrongCaseFunction
Emitted by mir-analyzer/src/call/function.rs.
Fixtures: tests/fixtures/by-kind/wrong_case_function/.
WrongCaseMethod
Emitted by mir-analyzer/src/call/method.rs and src/call/static_call.rs.
Fixtures: tests/fixtures/by-kind/wrong_case_method/.
WrongCaseClass
Emitted by mir-analyzer/src/expr/objects.rs and src/call/static_call.rs.
Fixtures: tests/fixtures/by-kind/wrong_case_class/.
DuplicateClass
Emitted by mir-analyzer/src/body_analysis/mod.rs.
Fixtures: tests/fixtures/by-kind/invalid_argument/class_redefinition*.phpt.
DuplicateInterface
Emitted by mir-analyzer/src/body_analysis/mod.rs.
Fixtures: tests/fixtures/by-kind/invalid_argument/interface_redefinition*.phpt.
DuplicateTrait
Emitted by mir-analyzer/src/body_analysis/mod.rs.
Fixtures: tests/fixtures/by-kind/invalid_argument/trait_redefinition*.phpt.
DuplicateEnum
Emitted by mir-analyzer/src/body_analysis/mod.rs.
Fixtures: tests/fixtures/by-kind/invalid_argument/enum_redefinition*.phpt.
DuplicateFunction
Emitted by mir-analyzer/src/body_analysis/mod.rs.
Fixtures: tests/fixtures/by-kind/invalid_argument/function_redefinition*.phpt.
UseStatementHasNoEffect
A use of a single-segment name with no alias outside any namespace —
PHP warns that it has no effect.
Emitted by mir-analyzer/src/collector/mod.rs.
Fixtures: tests/fixtures/by-kind/use_statement_has_no_effect/.
PrivateFinalMethod
A method other than the constructor is declared both private and
final — PHP warns since a private method is never overridden.
Emitted by mir-analyzer/src/collector/mod.rs.
Fixtures: tests/fixtures/by-kind/private_final_method/.
NonPublicMagicMethod
A magic method PHP calls from outside the class (__get, __call,
__toString, …) is not public — PHP warns.
Emitted by mir-analyzer/src/collector/mod.rs.
Fixtures: tests/fixtures/by-kind/non_public_magic_method/.
NoDiscardReturnIgnored
The result of a #[\NoDiscard] function or method is discarded (PHP 8.5+ warning).
Emitted by mir-analyzer/src/expr/mod.rs.
Fixtures: tests/fixtures/by-kind/no_discard_return_ignored/.
AnalyzerError
The analyzer panicked on this file; its other issues are missing.
Emitted by mir-analyzer/src/batch/run.rs.
PluginIssue
Raised by a registered plugin (mir-plugin). name is the plugin’s own
issue identifier, used for display and suppression matching.
Implementations§
Source§impl IssueKind
impl IssueKind
Sourcepub fn is_constant_condition(&self) -> bool
pub fn is_constant_condition(&self) -> bool
Diagnostics claiming a condition always (or never) holds.
Sourcepub fn default_severity(&self) -> Severity
pub fn default_severity(&self) -> Severity
Default severity for this issue kind.
Sourcepub fn code(&self) -> &'static str
pub fn code(&self) -> &'static str
Stable error code (e.g. "MIR0005").
Codes are assigned in bands by category and are part of the public API: once a code ships, it must never be reused for a different issue kind. New variants take the next free slot in their band; obsolete variants retire their code (the slot stays burnt). Bands have headroom for growth.
Bands:
| Range | Category |
|---|---|
| 0001 – 0099 | Undefined symbols |
| 0100 – 0199 | Nullability |
| 0200 – 0299 | Type mismatches |
| 0300 – 0399 | Array / offset |
| 0400 – 0499 | Redundancy |
| 0500 – 0599 | Dead code |
| 0600 – 0699 | Readonly |
| 0700 – 0799 | Inheritance |
| 0800 – 0899 | Security (taint) |
| 0900 – 0999 | Generics |
| 1000 – 1099 | Deprecation / internal |
| 1100 – 1199 | Missing types / docblocks |
| 1200 – 1299 | Mixed |
| 1300 – 1399 | Trait |
| 1400 – 1499 | Parse |
| 1500 – 1599 | Other |
| 1600 – 1699 | Attribute / duplicate declarations |
| 1700 – 1799 | Purity |
Sourcepub fn default_severity_for_code(code: &str) -> Option<Severity>
pub fn default_severity_for_code(code: &str) -> Option<Severity>
Sourcepub fn name(&self) -> &'static str
pub fn name(&self) -> &'static str
Identifier name used in config and @psalm-suppress / @suppress annotations.
Sourcepub fn referenced_symbol(&self) -> Option<String>
pub fn referenced_symbol(&self) -> Option<String>
The symbol Psalm’s <referencedClass>-style issue-handler filters match.
Sourcepub fn display_name(&self) -> &str
pub fn display_name(&self) -> &str
Like IssueKind::name, but for plugin-raised issues returns the
plugin’s own issue name. Use this for suppression / issue-handler
matching so @mir-suppress MyPluginIssue works.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IssueKind
impl<'de> Deserialize<'de> for IssueKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for IssueKind
impl StructuralPartialEq for IssueKind
Auto Trait Implementations§
impl Forget for IssueKind
impl Freeze for IssueKind
impl Move for IssueKind
impl RefUnwindSafe for IssueKind
impl Send for IssueKind
impl Sync for IssueKind
impl Unpin for IssueKind
impl UnsafeUnpin for IssueKindwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
impl UnwindSafe for IssueKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.