original_string: public function random($number = null)
      {
          if (is_null($number)) {
              return Arr::random($this->items);
          }
  
          return new static(Arr::random($this->items, $number));
      }
code: public function random($number = null)
      {
          if (is_null($number)) {
              return Arr::random($this->items);
          }
  
          return new static(Arr::random($this->items, $number));
      }
code_tokens: public function random ( $ number = null ) { if ( is_null ( $ number ) ) { return Arr :: random ( $ this -> items ) ; } return new static ( Arr :: random ( $ this -> items , $ number ) ) ; }
docstring: Get one or a specified number of items randomly from the collection.
  
  @param  int|null  $number
  @return static|mixed
  
  @throws \InvalidArgumentException
docstring_tokens: Get one or a specified number of items randomly from the collection .