public function push($value, int $repeat = null): self
    {
        if ($repeat !== null && $repeat <= 0) {
            throw new InvalidArgumentException(sprintf(static::MSG_NEGATIVE_ARGUMENT_NOT_ALLOWED, 2, 1));
        }

        for ($i = 0; $i < ($repeat ?? 1); $i++) {
            $this->values[] = $value;
        }

        return $this;
    }
public function push($value, int $repeat = null): self
    {
        if ($repeat !== null && $repeat <= 0) {
            throw new InvalidArgumentException(sprintf(static::MSG_NEGATIVE_ARGUMENT_NOT_ALLOWED, 2, 1));
        }

        for ($i = 0; $i < ($repeat ?? 1); $i++) {
            $this->values[] = $value;
        }

        return $this;
    }
public function push ( $ value , int $ repeat = null ) : self { if ( $ repeat !== null && $ repeat <= 0 ) { throw new InvalidArgumentException ( sprintf ( static :: MSG_NEGATIVE_ARGUMENT_NOT_ALLOWED , 2 , 1 ) ) ; } for ( $ i = 0 ; $ i < ( $ repeat ?? 1 ) ; $ i ++ ) { $ this -> values [ ] = $ value ; } return $ this ; }
Pushes specified value into array

@param mixed    $value
@param int|null $repeat
@return static
@throws InvalidArgumentException
Pushes specified value into array