Code Duplication    Length = 8-8 lines in 2 locations

src/PhpSpreadsheet/Writer/Ods.php 1 location

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

src/PhpSpreadsheet/Writer/Xlsx.php 1 location

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