BenSampo / laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.
https://sampo.co.uk/blog/using-enums-in-laravel
MIT License
1.99k stars 163 forks source link

Add PHPStan rule to detect duplicate enum values #343

Closed spawnia closed 10 months ago

spawnia commented 10 months ago

Related Issue/Intent

Duplicate enum values lead to runtime errors, e.g. getInstances().

Changes

Adds a PHPStan rule that detects duplicate enum values.

Breaking changes

None.