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     \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

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