original_string: protected function _attachFiles($boundary = null)
      {
          if ($boundary === null) {
              $boundary = $this->_boundary;
          }
  
          $msg = [];
          foreach ($this->_attachments as $filename => $fileInfo) {
              if (!empty($fileInfo['contentId'])) {
                  continue;
              }
              $data = isset($fileInfo['data']) ? $fileInfo['data'] : $this->_readFile($fileInfo['file']);
              $hasDisposition = (
                  !isset($fileInfo['contentDisposition']) ||
                  $fileInfo['contentDisposition']
              );
              $part = new FormDataPart(false, $data, false);
  
              if ($hasDisposition) {
                  $part->disposition('attachment');
                  $part->filename($filename);
              }
              $part->transferEncoding('base64');
              $part->type($fileInfo['mimetype']);
  
              $msg[] = '--' . $boundary;
              $msg[] = (string)$part;
              $msg[] = '';
          }
  
          return $msg;
      }
code: protected function _attachFiles($boundary = null)
      {
          if ($boundary === null) {
              $boundary = $this->_boundary;
          }
  
          $msg = [];
          foreach ($this->_attachments as $filename => $fileInfo) {
              if (!empty($fileInfo['contentId'])) {
                  continue;
              }
              $data = isset($fileInfo['data']) ? $fileInfo['data'] : $this->_readFile($fileInfo['file']);
              $hasDisposition = (
                  !isset($fileInfo['contentDisposition']) ||
                  $fileInfo['contentDisposition']
              );
              $part = new FormDataPart(false, $data, false);
  
              if ($hasDisposition) {
                  $part->disposition('attachment');
                  $part->filename($filename);
              }
              $part->transferEncoding('base64');
              $part->type($fileInfo['mimetype']);
  
              $msg[] = '--' . $boundary;
              $msg[] = (string)$part;
              $msg[] = '';
          }
  
          return $msg;
      }
code_tokens: protected function _attachFiles ( $ boundary = null ) { if ( $ boundary === null ) { $ boundary = $ this -> _boundary ; } $ msg = [ ] ; foreach ( $ this -> _attachments as $ filename => $ fileInfo ) { if ( ! empty ( $ fileInfo [ 'contentId' ] ) ) { continue ; } $ data = isset ( $ fileInfo [ 'data' ] ) ? $ fileInfo [ 'data' ] : $ this -> _readFile ( $ fileInfo [ 'file' ] ) ; $ hasDisposition = ( ! isset ( $ fileInfo [ 'contentDisposition' ] ) || $ fileInfo [ 'contentDisposition' ] ) ; $ part = new FormDataPart ( false , $ data , false ) ; if ( $ hasDisposition ) { $ part -> disposition ( 'attachment' ) ; $ part -> filename ( $ filename ) ; } $ part -> transferEncoding ( 'base64' ) ; $ part -> type ( $ fileInfo [ 'mimetype' ] ) ; $ msg [ ] = '--' . $ boundary ; $ msg [ ] = ( string ) $ part ; $ msg [ ] = '' ; } return $ msg ; }
docstring: Attach non-embedded files by adding file contents inside boundaries.
  
  @param string|null $boundary Boundary to use. If null, will default to $this->_boundary
  @return array An array of lines to add to the message
docstring_tokens: Attach non - embedded files by adding file contents inside boundaries .