Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 336 Bytes

Immutable.md

File metadata and controls

21 lines (14 loc) · 336 Bytes

Immutable Attribute

This attribute is the equivalent of the @immutable annotation for classes, traits and interfaces.

Arguments

The attribute accepts no arguments.

Example usage

<?php

use PhpStaticAnalysis\Attributes\Immutable;

#[Immutable] // All properties are readonly
class ImmutableExample
{
    ...
}