AbstractEnum::is( self $other ): bool

In this article

Checks if this enum is the same instance type and value as another enum.

Parameters

$otherselfrequired
The other enum to compare.

Return

bool True if enums are identical.

Source

final public function is(self $other): bool
{
    return $this === $other;
    // Since we're using singletons, we can use identity comparison
}

Changelog

VersionDescription
0.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.