original_string: public function join($glue, $finalGlue = '')
      {
          if ($finalGlue === '') {
              return $this->implode($glue);
          }
  
          $count = $this->count();
  
          if ($count === 0) {
              return '';
          }
  
          if ($count === 1) {
              return $this->last();
          }
  
          $collection = new static($this->items);
  
          $finalItem = $collection->pop();
  
          return $collection->implode($glue).$finalGlue.$finalItem;
      }
code: public function join($glue, $finalGlue = '')
      {
          if ($finalGlue === '') {
              return $this->implode($glue);
          }
  
          $count = $this->count();
  
          if ($count === 0) {
              return '';
          }
  
          if ($count === 1) {
              return $this->last();
          }
  
          $collection = new static($this->items);
  
          $finalItem = $collection->pop();
  
          return $collection->implode($glue).$finalGlue.$finalItem;
      }
code_tokens: public function join ( $ glue , $ finalGlue = '' ) { if ( $ finalGlue === '' ) { return $ this -> implode ( $ glue ) ; } $ count = $ this -> count ( ) ; if ( $ count === 0 ) { return '' ; } if ( $ count === 1 ) { return $ this -> last ( ) ; } $ collection = new static ( $ this -> items ) ; $ finalItem = $ collection -> pop ( ) ; return $ collection -> implode ( $ glue ) . $ finalGlue . $ finalItem ; }
docstring: Join all items from the collection using a string. The final items can use a separate glue string.
  
  @param  string  $glue
  @param  string  $finalGlue
  @return string
docstring_tokens: Join all items from the collection using a string . The final items can use a separate glue string .