Skip to content

Version 2.6: New 'IsClassArrayEnumType'

Choose a tag to compare

@FireMidge FireMidge released this 25 Nov 23:23
· 1 commit to master since this release
6dcdba3

Feature: Added new type IsClassArrayEnumType, which is a convenience type between ArrayEnumType and ClassCollectionType.
It's used for collections of instances which in turn are enum types, i.e. there is a finite list of valid values. It also offers an easy way to create a new collection holding all valid variations of the underlying enum type (withAll()).

Feature: Added methods to navigate through the values of IsCollectionType with current, previous, next, first and last. This is, by extension, also available to instances using the IsClassCollectionType, IsArrayEnumType, IsClassArrayEnumType and all other related traits. Unlike the equivalent built-in PHP methods, these new methods return null for non-existing elements instead of false.

Dev: Improved @covers annotations and re-imported certain traits to improve accuracy of code coverage reports. Added tests for all new functionality as well as addressed all true positives in the Infection log. MSI improved from 94% to 97% and CCM from 95% to 98%.