Code Lens

CodeLens appears above functions, classes, interfaces, traits, properties, and constants. This margin provides quick contextual information about your code - references, implementations, overrides, or the method prototype. Upon clicking onto the text, the detailed window is opened.

This feature can be disabled/enabled in user-scope setting php.codeLens.enabled.

References & Implementations

Every PHP declaration is decorated with references code lens. References provides the same list as the contextual command Find all references.

Additionally, interfaces and classes are decorated with implementations code lens providing list of all the types that extend or implement this type.

PHP references and implementations

Trait Uses

In case of trait declaration, the trait heading is decorated with uses code lens. This allows to quickly list all the places within the workspace where the trait is used as a part of a class or another trait.

PHP trait uses

Method Overrides & Prototype

Non-private methods are decorated with overrides code lens providing list of method that override this implementation.

Additionally, there is prototype code lens quickly navigating you to the base implementation of the method, if there is any.

PHP method overrides and method prototype

See also