src/Flag.php
public static function getValues($count)
    {
        if (!Int::is($count) || $count < 1) {
            throw new \InvalidArgumentException("The \$count parameter must be of type int and greater than zero.");
        }

        $ret = [];
        $flag = 1;
        for ($i = 0; $i < $count; $i++) {
            $ret[] = $flag;
            $flag <<= 1;
        }

        return $ret;
    }
public static function getValues($count)
    {
        if (!Int::is($count) || $count < 1) {
            throw new \InvalidArgumentException("The \$count parameter must be of type int and greater than zero.");
        }

        $ret = [];
        $flag = 1;
        for ($i = 0; $i < $count; $i++) {
            $ret[] = $flag;
            $flag <<= 1;
        }

        return $ret;
    }
public static function getValues ( $ count ) { if ( ! Int :: is ( $ count ) || $ count < 1 ) { throw new \ InvalidArgumentException ( "The \$count parameter must be of type int and greater than zero." ) ; } $ ret = [ ] ; $ flag = 1 ; for ( $ i = 0 ; $ i < $ count ; $ i ++ ) { $ ret [ ] = $ flag ; $ flag <<= 1 ; } return $ ret ; }
Gets an array with n consecutive flag values.

@param int $count The number of flag values to return.

@return array The array containing the n flag values.
@throws \InvalidArgumentException
Gets an array with n consecutive flag values .