Code Duplication    Length = 8-8 lines in 2 locations

src/PhpSpreadsheet/Writer/Excel2007.php 1 location

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

src/PhpSpreadsheet/Writer/OpenDocument.php 1 location

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