Code Duplication    Length = 7-7 lines in 2 locations

src/PhpSpreadsheet/Writer/Xls/Parser.php 2 locations

@@ 1466-1472 (lines=7) @@
1463
            $tree = $this->parseTree;
1464
        }
1465
1466
        if (is_array($tree['left'])) {
1467
            $converted_tree = $this->toReversePolish($tree['left']);
1468
            $polish .= $converted_tree;
1469
        } elseif ($tree['left'] != '') { // It's a final node
1470
            $converted_tree = $this->convert($tree['left']);
1471
            $polish .= $converted_tree;
1472
        }
1473
        if (is_array($tree['right'])) {
1474
            $converted_tree = $this->toReversePolish($tree['right']);
1475
            $polish .= $converted_tree;
@@ 1473-1479 (lines=7) @@
1470
            $converted_tree = $this->convert($tree['left']);
1471
            $polish .= $converted_tree;
1472
        }
1473
        if (is_array($tree['right'])) {
1474
            $converted_tree = $this->toReversePolish($tree['right']);
1475
            $polish .= $converted_tree;
1476
        } elseif ($tree['right'] != '') { // It's a final node
1477
            $converted_tree = $this->convert($tree['right']);
1478
            $polish .= $converted_tree;
1479
        }
1480
        // if it's a function convert it here (so we can set it's arguments)
1481
        if (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/", $tree['value']) and
1482
            !preg_match('/^([A-Ia-i]?[A-Za-z])(\d+)$/', $tree['value']) and