Code Duplication    Length = 26-34 lines in 2 locations

app/Vendor/PHPExcel/PHPExcel/Reader/Excel2007.php 2 locations

@@ 627-660 (lines=34) @@
624
						$numFmts->registerXPathNamespace("sml", "http://schemas.openxmlformats.org/spreadsheetml/2006/main");
625
					}
626
					if (!$this->_readDataOnly && $xmlStyles) {
627
						foreach ($xmlStyles->cellXfs->xf as $xf) {
628
							$numFmt = PHPExcel_Style_NumberFormat::FORMAT_GENERAL;
629
630
							if ($xf["numFmtId"]) {
631
								if (isset($numFmts)) {
632
									$tmpNumFmt = self::array_item($numFmts->xpath("sml:numFmt[@numFmtId=$xf[numFmtId]]"));
633
634
									if (isset($tmpNumFmt["formatCode"])) {
635
										$numFmt = (string) $tmpNumFmt["formatCode"];
636
									}
637
								}
638
639
								if ((int)$xf["numFmtId"] < 164) {
640
									$numFmt = PHPExcel_Style_NumberFormat::builtInFormatCode((int)$xf["numFmtId"]);
641
								}
642
							}
643
							//$numFmt = str_replace('mm', 'i', $numFmt);
644
							//$numFmt = str_replace('h', 'H', $numFmt);
645
646
							$style = (object) array(
647
								"numFmt" => $numFmt,
648
								"font" => $xmlStyles->fonts->font[intval($xf["fontId"])],
649
								"fill" => $xmlStyles->fills->fill[intval($xf["fillId"])],
650
								"border" => $xmlStyles->borders->border[intval($xf["borderId"])],
651
								"alignment" => $xf->alignment,
652
								"protection" => $xf->protection,
653
							);
654
							$styles[] = $style;
655
656
							// add style to cellXf collection
657
							$objStyle = new PHPExcel_Style;
658
							self::_readStyle($objStyle, $style);
659
							$excel->addCellXf($objStyle);
660
						}
661
662
						foreach ($xmlStyles->cellStyleXfs->xf as $xf) {
663
							$numFmt = PHPExcel_Style_NumberFormat::FORMAT_GENERAL;
@@ 662-687 (lines=26) @@
659
							$excel->addCellXf($objStyle);
660
						}
661
662
						foreach ($xmlStyles->cellStyleXfs->xf as $xf) {
663
							$numFmt = PHPExcel_Style_NumberFormat::FORMAT_GENERAL;
664
							if ($numFmts && $xf["numFmtId"]) {
665
								$tmpNumFmt = self::array_item($numFmts->xpath("sml:numFmt[@numFmtId=$xf[numFmtId]]"));
666
								if (isset($tmpNumFmt["formatCode"])) {
667
									$numFmt = (string) $tmpNumFmt["formatCode"];
668
								} else if ((int)$xf["numFmtId"] < 165) {
669
									$numFmt = PHPExcel_Style_NumberFormat::builtInFormatCode((int)$xf["numFmtId"]);
670
								}
671
							}
672
673
							$cellStyle = (object) array(
674
								"numFmt" => $numFmt,
675
								"font" => $xmlStyles->fonts->font[intval($xf["fontId"])],
676
								"fill" => $xmlStyles->fills->fill[intval($xf["fillId"])],
677
								"border" => $xmlStyles->borders->border[intval($xf["borderId"])],
678
								"alignment" => $xf->alignment,
679
								"protection" => $xf->protection,
680
							);
681
							$cellStyles[] = $cellStyle;
682
683
							// add style to cellStyleXf collection
684
							$objStyle = new PHPExcel_Style;
685
							self::_readStyle($objStyle, $cellStyle);
686
							$excel->addCellStyleXf($objStyle);
687
						}
688
					}
689
690
					$dxfs = array();