Code Duplication    Length = 8-8 lines in 2 locations

src/PhpSpreadsheet/Writer/Ods.php 1 location

@@ 77-84 (lines=8) @@
74
     *
75
     * @return Ods\WriterPart|null
76
     */
77
    public function getWriterPart($pPartName = '')
78
    {
79
        if ($pPartName != '' && isset($this->writerParts[strtolower($pPartName)])) {
80
            return $this->writerParts[strtolower($pPartName)];
81
        }
82
83
        return null;
84
    }
85
86
    /**
87
     * Save PhpSpreadsheet to file.

src/PhpSpreadsheet/Writer/Xlsx.php 1 location

@@ 159-166 (lines=8) @@
156
     *
157
     * @return \PhpOffice\PhpSpreadsheet\Writer\Xlsx\WriterPart
158
     */
159
    public function getWriterPart($pPartName = '')
160
    {
161
        if ($pPartName != '' && isset($this->writerParts[strtolower($pPartName)])) {
162
            return $this->writerParts[strtolower($pPartName)];
163
        }
164
165
        return null;
166
    }
167
168
    /**
169
     * Save PhpSpreadsheet to file.