Code Duplication    Length = 13-13 lines in 3 locations

src/PhpSpreadsheet/Style/Color.php 1 location

@@ 232-244 (lines=13) @@
229
     *
230
     * @return Color
231
     */
232
    public function setRGB($pValue = '000000')
233
    {
234
        if ($pValue == '') {
235
            $pValue = '000000';
236
        }
237
        if ($this->isSupervisor) {
238
            $styleArray = $this->getStyleArray(['argb' => 'FF' . $pValue]);
239
            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
240
        } else {
241
            $this->argb = 'FF' . $pValue;
242
        }
243
244
        return $this;
245
    }
246
247
    /**

src/PhpSpreadsheet/Style/Font.php 2 locations

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