Skip to content

Latest commit

 

History

History
16 lines (9 loc) · 602 Bytes

SlevomatCodingStandard.Classes.ModernClassNameReference.md

File metadata and controls

16 lines (9 loc) · 602 Bytes

Pattern: Missing use of ::class

Issue: -

Description

Reports use of __CLASS__, get_parent_class(), get_called_class(), get_class() and get_class($this). Class names should be referenced via ::class constant when possible.

Rule provides the following settings:

  • enableOnObjects: Enable ::class on all objects. It's on by default if you're on PHP 8.0+

Further Reading