Inspectopedia 2026.3 Help

Attributes

'#[ArrayShape]' attribute can be added  

Reports the methods and functions that are returning arrays with known non-trivial keys.

'#[Pure]' attribute can be added  

Reports the functions that are non-trivially pure.

Array key does not match array shape  

Reports the array keys that do not match the keys specified via the #[ArrayShape] attribute.

Attribute can be added to overriding member  

Reports the methods' and parameters' attributes that can be propagated to overriding methods/parameters.

Class cannot be used as attribute  

Reports the attributes that are resolved to a class not annotated with #[Attribute].

Comment is parsed as attribute in PHP 8.0  

Reports line comments starting with #[.

Expected values should be used  

Reports the values in assignment and comparison expressions that should be replaced with one of the expected values (that is, the values specified via the #[ExpectedValues] attribute).

Immutable property written in invalid scope  

Highlights write access references to properties, for which the write access scope declared via #[Immutable] is stricter than the reference scope.

Incomplete array according to shape declaration. Missing key(s): {0}  

Reports an array that does not provide all the required keys/entries defined in the array shape.

Mark overridden member with #[Override]  

Suggests adding the #[Override] attribute to methods, properties, class constants, and enum cases that override same-name members in a parent class or implemented interface.

Member marked with #[Override] does not override an inherited member  

Reports usage of the #[Override] attribute on a member that doesn't override a matching member in a parent class or implemented interface.

Non-applicable attribute target declaration  

Reports the attributes that do not have the appropriate Attribute::TARGET_* flag in their arguments declaration.

Non-repeatable attribute  

Reports repeated attributes without the Attribute::IS_REPEATABLE flag in their arguments declaration.

NoReturn attribute can be added  

Reports function without #[NoReturn] that are always halting their execution by calling other exitPoint functions attribute.

Pure function may produce side effects  

Reports the #[Pure] annotations used on functions that may produce side effects.

Redundant parentheses in attribute  

Reports empty arguments lists in attributes.

Last modified: 20 November 2026