Code Duplication    Length = 3-3 lines in 2 locations

src/PhpSpreadsheet/Reader/Xlsx/Chart.php 1 location

@@ 410-412 (lines=3) @@
407
                $objText = $value->createTextRun((string) $titleDetailElement->t);
408
            }
409
            if (isset($titleDetailElement->rPr)) {
410
                if (isset($titleDetailElement->rPr->rFont['val'])) {
411
                    $objText->getFont()->setName((string) $titleDetailElement->rPr->rFont['val']);
412
                }
413
414
                $fontSize = (self::getAttribute($titleDetailElement->rPr, 'sz', 'integer'));
415
                if (!is_null($fontSize)) {

src/PhpSpreadsheet/Reader/Xlsx.php 1 location

@@ 2018-2020 (lines=3) @@
2015
                    } else {
2016
                        $objText = $value->createTextRun(\PhpOffice\PhpSpreadsheet\Shared\StringHelper::controlCharacterOOXML2PHP((string) $run->t));
2017
2018
                        if (isset($run->rPr->rFont['val'])) {
2019
                            $objText->getFont()->setName((string) $run->rPr->rFont['val']);
2020
                        }
2021
                        if (isset($run->rPr->sz['val'])) {
2022
                            $objText->getFont()->setSize((string) $run->rPr->sz['val']);
2023
                        }