phpunit is required for development.
removing unused parameter in closure
checking for default case first to save a few cpu cycles
check for default case first
speed optimization
detection for internal PHP classes fails for traits. This fixes it.