1.2.660. Makes Class Constant Definition

This rule adds DEFINITION link between class constant definitions and their usage. These links are used later to identify the values delivered by the constant.

<?php

class x {
    public const A = 1;
}

// Link to the constant definition
echo x::A;

// Cannot find the original class
echo $x::A;

?>

1.2.660.1. Specs

Short name

Complete/MakeClassConstantDefinition

Rulesets

All, CE, Changed Behavior, NoDoc

Exakat since

1.9.2

PHP Version

All

Severity

Minor

Time To Fix

Quick (30 mins)

Precision

High

Features

class-constant

Available in

Entreprise Edition, Community Edition, Exakat Cloud