1.2.893. Overwritten Constant

This command adds OVERWRITE link between class constant definitions.

A constant is overwritten by another when it is defined in one of the parent class or parent interface.

The A constant will be linked between classes x and y, with an OVERWRITE link.

<?php

class x {
    protected const A = 1;
}

class y extends x {
    protected const A = 1;
}

?>

1.2.893.1. Specs

Short name

Complete/OverwrittenConstants

Rulesets

All, CE, NoDoc

Exakat since

1.9.2

PHP Version

All

Severity

Time To Fix

Precision

Very high

Features

inheritance, final, class, class-constant

Available in

Entreprise Edition, Community Edition, Exakat Cloud