original_string: protected function getCellXML($cellValue, $styleIndex, $numTimesValueRepeated)
      {
          $data = '<table:table-cell table:style-name="ce' . $styleIndex . '"';
  
          if ($numTimesValueRepeated !== 1) {
              $data .= ' table:number-columns-repeated="' . $numTimesValueRepeated . '"';
          }
  
          if (CellHelper::isNonEmptyString($cellValue)) {
              $data .= ' office:value-type="string" calcext:value-type="string">';
  
              $cellValueLines = explode("\n", $cellValue);
              foreach ($cellValueLines as $cellValueLine) {
                  $data .= '<text:p>' . $this->stringsEscaper->escape($cellValueLine) . '</text:p>';
              }
  
              $data .= '</table:table-cell>';
          } else if (CellHelper::isBoolean($cellValue)) {
              $data .= ' office:value-type="boolean" calcext:value-type="boolean" office:boolean-value="' . $cellValue . '">';
              $data .= '<text:p>' . $cellValue . '</text:p>';
              $data .= '</table:table-cell>';
          } else if (CellHelper::isNumeric($cellValue)) {
              $data .= ' office:value-type="float" calcext:value-type="float" office:value="' . $cellValue . '">';
              $data .= '<text:p>' . $cellValue . '</text:p>';
              $data .= '</table:table-cell>';
          } else if (empty($cellValue)) {
              $data .= '/>';
          } else {
              throw new InvalidArgumentException('Trying to add a value with an unsupported type: ' . gettype($cellValue));
          }
  
          return $data;
      }
code: protected function getCellXML($cellValue, $styleIndex, $numTimesValueRepeated)
      {
          $data = '<table:table-cell table:style-name="ce' . $styleIndex . '"';
  
          if ($numTimesValueRepeated !== 1) {
              $data .= ' table:number-columns-repeated="' . $numTimesValueRepeated . '"';
          }
  
          if (CellHelper::isNonEmptyString($cellValue)) {
              $data .= ' office:value-type="string" calcext:value-type="string">';
  
              $cellValueLines = explode("\n", $cellValue);
              foreach ($cellValueLines as $cellValueLine) {
                  $data .= '<text:p>' . $this->stringsEscaper->escape($cellValueLine) . '</text:p>';
              }
  
              $data .= '</table:table-cell>';
          } else if (CellHelper::isBoolean($cellValue)) {
              $data .= ' office:value-type="boolean" calcext:value-type="boolean" office:boolean-value="' . $cellValue . '">';
              $data .= '<text:p>' . $cellValue . '</text:p>';
              $data .= '</table:table-cell>';
          } else if (CellHelper::isNumeric($cellValue)) {
              $data .= ' office:value-type="float" calcext:value-type="float" office:value="' . $cellValue . '">';
              $data .= '<text:p>' . $cellValue . '</text:p>';
              $data .= '</table:table-cell>';
          } else if (empty($cellValue)) {
              $data .= '/>';
          } else {
              throw new InvalidArgumentException('Trying to add a value with an unsupported type: ' . gettype($cellValue));
          }
  
          return $data;
      }
code_tokens: protected function getCellXML ( $ cellValue , $ styleIndex , $ numTimesValueRepeated ) { $ data = '<table:table-cell table:style-name="ce' . $ styleIndex . '"' ; if ( $ numTimesValueRepeated !== 1 ) { $ data .= ' table:number-columns-repeated="' . $ numTimesValueRepeated . '"' ; } if ( CellHelper :: isNonEmptyString ( $ cellValue ) ) { $ data .= ' office:value-type="string" calcext:value-type="string">' ; $ cellValueLines = explode ( "\n" , $ cellValue ) ; foreach ( $ cellValueLines as $ cellValueLine ) { $ data .= '<text:p>' . $ this -> stringsEscaper -> escape ( $ cellValueLine ) . '</text:p>' ; } $ data .= '</table:table-cell>' ; } else if ( CellHelper :: isBoolean ( $ cellValue ) ) { $ data .= ' office:value-type="boolean" calcext:value-type="boolean" office:boolean-value="' . $ cellValue . '">' ; $ data .= '<text:p>' . $ cellValue . '</text:p>' ; $ data .= '</table:table-cell>' ; } else if ( CellHelper :: isNumeric ( $ cellValue ) ) { $ data .= ' office:value-type="float" calcext:value-type="float" office:value="' . $ cellValue . '">' ; $ data .= '<text:p>' . $ cellValue . '</text:p>' ; $ data .= '</table:table-cell>' ; } else if ( empty ( $ cellValue ) ) { $ data .= '/>' ; } else { throw new InvalidArgumentException ( 'Trying to add a value with an unsupported type: ' . gettype ( $ cellValue ) ) ; } return $ data ; }
docstring: Returns the cell XML content, given its value.
  
  @param mixed $cellValue The value to be written
  @param int $styleIndex Index of the used style
  @param int $numTimesValueRepeated Number of times the value is consecutively repeated
  @return string The cell XML content
  @throws \Box\Spout\Common\Exception\InvalidArgumentException If a cell value's type is not supported
docstring_tokens: Returns the cell XML content given its value .