Code Duplication    Length = 15-15 lines in 4 locations

src/PhpSpreadsheet/Writer/Xls/Worksheet.php 4 locations

@@ 1895-1909 (lines=15) @@
1892
    /**
1893
     * Store the LEFTMARGIN BIFF record.
1894
     */
1895
    private function writeMarginLeft()
1896
    {
1897
        $record = 0x0026; // Record identifier
1898
        $length = 0x0008; // Bytes to follow
1899
1900
        $margin = $this->phpSheet->getPageMargins()->getLeft(); // Margin in inches
1901
1902
        $header = pack('vv', $record, $length);
1903
        $data = pack('d', $margin);
1904
        if (self::getByteOrder()) { // if it's Big Endian
1905
            $data = strrev($data);
1906
        }
1907
1908
        $this->append($header . $data);
1909
    }
1910
1911
    /**
1912
     * Store the RIGHTMARGIN BIFF record.
@@ 1914-1928 (lines=15) @@
1911
    /**
1912
     * Store the RIGHTMARGIN BIFF record.
1913
     */
1914
    private function writeMarginRight()
1915
    {
1916
        $record = 0x0027; // Record identifier
1917
        $length = 0x0008; // Bytes to follow
1918
1919
        $margin = $this->phpSheet->getPageMargins()->getRight(); // Margin in inches
1920
1921
        $header = pack('vv', $record, $length);
1922
        $data = pack('d', $margin);
1923
        if (self::getByteOrder()) { // if it's Big Endian
1924
            $data = strrev($data);
1925
        }
1926
1927
        $this->append($header . $data);
1928
    }
1929
1930
    /**
1931
     * Store the TOPMARGIN BIFF record.
@@ 1933-1947 (lines=15) @@
1930
    /**
1931
     * Store the TOPMARGIN BIFF record.
1932
     */
1933
    private function writeMarginTop()
1934
    {
1935
        $record = 0x0028; // Record identifier
1936
        $length = 0x0008; // Bytes to follow
1937
1938
        $margin = $this->phpSheet->getPageMargins()->getTop(); // Margin in inches
1939
1940
        $header = pack('vv', $record, $length);
1941
        $data = pack('d', $margin);
1942
        if (self::getByteOrder()) { // if it's Big Endian
1943
            $data = strrev($data);
1944
        }
1945
1946
        $this->append($header . $data);
1947
    }
1948
1949
    /**
1950
     * Store the BOTTOMMARGIN BIFF record.
@@ 1952-1966 (lines=15) @@
1949
    /**
1950
     * Store the BOTTOMMARGIN BIFF record.
1951
     */
1952
    private function writeMarginBottom()
1953
    {
1954
        $record = 0x0029; // Record identifier
1955
        $length = 0x0008; // Bytes to follow
1956
1957
        $margin = $this->phpSheet->getPageMargins()->getBottom(); // Margin in inches
1958
1959
        $header = pack('vv', $record, $length);
1960
        $data = pack('d', $margin);
1961
        if (self::getByteOrder()) { // if it's Big Endian
1962
            $data = strrev($data);
1963
        }
1964
1965
        $this->append($header . $data);
1966
    }
1967
1968
    /**
1969
     * Write the PRINTHEADERS BIFF record.