original_string: private function writePatternFill(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_Fill $pFill = null)
      {
          // fill
          $objWriter->startElement('fill');
  
          // patternFill
          $objWriter->startElement('patternFill');
          $objWriter->writeAttribute('patternType', $pFill->getFillType());
  
          if ($pFill->getFillType() !== PHPExcel_Style_Fill::FILL_NONE) {
              // fgColor
              if ($pFill->getStartColor()->getARGB()) {
                  $objWriter->startElement('fgColor');
                  $objWriter->writeAttribute('rgb', $pFill->getStartColor()->getARGB());
                  $objWriter->endElement();
              }
          }
          if ($pFill->getFillType() !== PHPExcel_Style_Fill::FILL_NONE) {
              // bgColor
              if ($pFill->getEndColor()->getARGB()) {
                  $objWriter->startElement('bgColor');
                  $objWriter->writeAttribute('rgb', $pFill->getEndColor()->getARGB());
                  $objWriter->endElement();
              }
          }
  
          $objWriter->endElement();
  
          $objWriter->endElement();
      }
code: private function writePatternFill(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_Fill $pFill = null)
      {
          // fill
          $objWriter->startElement('fill');
  
          // patternFill
          $objWriter->startElement('patternFill');
          $objWriter->writeAttribute('patternType', $pFill->getFillType());
  
          if ($pFill->getFillType() !== PHPExcel_Style_Fill::FILL_NONE) {
              // fgColor
              if ($pFill->getStartColor()->getARGB()) {
                  $objWriter->startElement('fgColor');
                  $objWriter->writeAttribute('rgb', $pFill->getStartColor()->getARGB());
                  $objWriter->endElement();
              }
          }
          if ($pFill->getFillType() !== PHPExcel_Style_Fill::FILL_NONE) {
              // bgColor
              if ($pFill->getEndColor()->getARGB()) {
                  $objWriter->startElement('bgColor');
                  $objWriter->writeAttribute('rgb', $pFill->getEndColor()->getARGB());
                  $objWriter->endElement();
              }
          }
  
          $objWriter->endElement();
  
          $objWriter->endElement();
      }
code_tokens: private function writePatternFill ( PHPExcel_Shared_XMLWriter $ objWriter = null , PHPExcel_Style_Fill $ pFill = null ) { // fill $ objWriter -> startElement ( 'fill' ) ; // patternFill $ objWriter -> startElement ( 'patternFill' ) ; $ objWriter -> writeAttribute ( 'patternType' , $ pFill -> getFillType ( ) ) ; if ( $ pFill -> getFillType ( ) !== PHPExcel_Style_Fill :: FILL_NONE ) { // fgColor if ( $ pFill -> getStartColor ( ) -> getARGB ( ) ) { $ objWriter -> startElement ( 'fgColor' ) ; $ objWriter -> writeAttribute ( 'rgb' , $ pFill -> getStartColor ( ) -> getARGB ( ) ) ; $ objWriter -> endElement ( ) ; } } if ( $ pFill -> getFillType ( ) !== PHPExcel_Style_Fill :: FILL_NONE ) { // bgColor if ( $ pFill -> getEndColor ( ) -> getARGB ( ) ) { $ objWriter -> startElement ( 'bgColor' ) ; $ objWriter -> writeAttribute ( 'rgb' , $ pFill -> getEndColor ( ) -> getARGB ( ) ) ; $ objWriter -> endElement ( ) ; } } $ objWriter -> endElement ( ) ; $ objWriter -> endElement ( ) ; }
docstring: Write Pattern Fill
  
  @param     PHPExcel_Shared_XMLWriter            $objWriter         XML Writer
  @param     PHPExcel_Style_Fill                    $pFill            Fill style
  @throws     PHPExcel_Writer_Exception
docstring_tokens: Write Pattern Fill