src/Traits/Arrays.php
public static function repeat($object = '', int $times = null): array
    {
        $times = abs($times);
        if ($times == null) {
            return [];
        }

        return array_fill(0, $times, $object);
    }
public static function repeat($object = '', int $times = null): array
    {
        $times = abs($times);
        if ($times == null) {
            return [];
        }

        return array_fill(0, $times, $object);
    }
public static function repeat ( $ object = '' , int $ times = null ) : array { $ times = abs ( $ times ) ; if ( $ times == null ) { return [ ] ; } return array_fill ( 0 , $ times , $ object ) ; }
Generate array of repeated values

@usage __::repeat('foo', 3);
*       >> ['foo', 'foo', 'foo']

@param string $object The object to repeat.
@param int    $times  ow many times has to be repeated.

@return array Returns a new array of filled values.
Generate array of repeated values