src/Enums/FlagEnumTrait.php
protected function getValuesFromFlagOrEnum($flag)
    {
        $values = [];

        if ($flag instanceof static) {
            foreach ($flag->getNames() as $enum) {
                $values[] = static::getNameValue($enum);
            }
        } elseif (static::isValidName((string) $flag)) {
            $values[] = static::getNameValue((string) $flag);
        } elseif (is_numeric($flag)) {
            $values[] = $flag;
        }

        return $values;
    }
protected function getValuesFromFlagOrEnum($flag)
    {
        $values = [];

        if ($flag instanceof static) {
            foreach ($flag->getNames() as $enum) {
                $values[] = static::getNameValue($enum);
            }
        } elseif (static::isValidName((string) $flag)) {
            $values[] = static::getNameValue((string) $flag);
        } elseif (is_numeric($flag)) {
            $values[] = $flag;
        }

        return $values;
    }
protected function getValuesFromFlagOrEnum ( $ flag ) { $ values = [ ] ; if ( $ flag instanceof static ) { foreach ( $ flag -> getNames ( ) as $ enum ) { $ values [ ] = static :: getNameValue ( $ enum ) ; } } elseif ( static :: isValidName ( ( string ) $ flag ) ) { $ values [ ] = static :: getNameValue ( ( string ) $ flag ) ; } elseif ( is_numeric ( $ flag ) ) { $ values [ ] = $ flag ; } return $ values ; }
Given an enum name, enum value, or flag enum instance, get the array of values it represents.

@param int|string|FlagEnumTrait $flag
@return array
Given an enum name enum value or flag enum instance get the array of values it represents .