Code Duplication    Length = 14-14 lines in 3 locations

src/PhpSpreadsheet/Style/Font.php 2 locations

@@ 241-254 (lines=14) @@
238
     *
239
     * @return Font
240
     */
241
    public function setName($pValue)
242
    {
243
        if ($pValue == '') {
244
            $pValue = 'Calibri';
245
        }
246
        if ($this->isSupervisor) {
247
            $styleArray = $this->getStyleArray(['name' => $pValue]);
248
            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
249
        } else {
250
            $this->name = $pValue;
251
        }
252
253
        return $this;
254
    }
255
256
    /**
257
     * Get Size.
@@ 277-290 (lines=14) @@
274
     *
275
     * @return Font
276
     */
277
    public function setSize($pValue)
278
    {
279
        if ($pValue == '') {
280
            $pValue = 10;
281
        }
282
        if ($this->isSupervisor) {
283
            $styleArray = $this->getStyleArray(['size' => $pValue]);
284
            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
285
        } else {
286
            $this->size = $pValue;
287
        }
288
289
        return $this;
290
    }
291
292
    /**
293
     * Get Bold.

src/PhpSpreadsheet/Style/Color.php 1 location

@@ 218-231 (lines=14) @@
215
     *
216
     * @return Color
217
     */
218
    public function setRGB($pValue)
219
    {
220
        if ($pValue == '') {
221
            $pValue = '000000';
222
        }
223
        if ($this->isSupervisor) {
224
            $styleArray = $this->getStyleArray(['argb' => 'FF' . $pValue]);
225
            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
226
        } else {
227
            $this->argb = 'FF' . $pValue;
228
        }
229
230
        return $this;
231
    }
232
233
    /**
234
     * Get a specified colour component of an RGB value.