Inspectopedia 2024.3 Help

Attributes

'#[ArrayShape]' attribute can be added   New in this release

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

'#[Pure]' attribute can be added   New in this release

Reports the functions that are non-trivially pure.

Array key does not match array shape   New in this release

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

Attribute can be added to overriding member   New in this release

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

Class cannot be used as attribute   New in this release

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

Comment is parsed as attribute in PHP 8.0   New in this release

Reports line comments starting with #[.

Expected values should be used   New in this release

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   New in this release

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

Mark overridden method with #[Override]   New in this release

Suggests adding the #[Override] attribute to the methods that override same name methods in the parent class or any of the implemented interfaces.

Method does not override the method from its superclass   New in this release

Reports usage of the #[Override] attribute with a method that doesn't have a parent method to override.

NoReturn attribute can be added   New in this release

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

Non-applicable attribute target declaration   New in this release

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

Non-repeatable attribute   New in this release

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

Pure function may produce side effects   New in this release

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

Redundant parentheses in attribute   New in this release

Reports empty arguments lists in attributes.

Last modified: 03 December 2024