marc-mabe / php-enum

Simple and fast implementation of enumerations with native PHP
BSD 3-Clause "New" or "Revised" License
464 stars 36 forks source link

Add description to assert() #95

Closed tdtm closed 6 years ago

tdtm commented 6 years ago

Assert has no description at vendor/marc-mabe/php-enum/src/Enum.php:368 on assert(self::noAmbiguousValues($publicConstants));

Should it fail, adding a description would clearly tell what's the issue without having to dig in the source.

I can look at doing a PR for it.

marc-mabe commented 6 years ago

fine by me - PR would be nice

elenaHristova commented 6 years ago

Hi there, I ran across the same issue when using byValue(). It seems like it doesn't work at all.

In Enum.php line 368: Warning: assert(): assert(self::noAmbiguousValues($publicConstants)) failed