1.2.422. Enum Case Values

Adds a DEFINITION`link between a `static Enumeration case and its actual defined value.

No link is added when no value is defined.

<?php

enum E: string {
   case Foo = 'foo';
}

// Constants
const C = E::Foo->name;

?>

1.2.422.1. Specs

Short name

Complete/EnumCaseValues

Rulesets

All

Exakat since

2.4.7

PHP Version

With PHP 8.1 and more recent

Severity

Minor

Time To Fix

Quick (30 mins)

Precision

High

Features

enum, enum-backed

Available in

Entreprise Edition, Exakat Cloud