Code Duplication    Length = 12-13 lines in 2 locations

src/PhpSpreadsheet/Chart/GridLines.php 1 location

@@ 289-301 (lines=13) @@
286
     * @param int $sh_angle
287
     * @param float $sh_distance
288
     */
289
    public function setShadowProperties($sh_presets, $sh_color_value = null, $sh_color_type = null, $sh_color_alpha = null, $sh_blur = null, $sh_angle = null, $sh_distance = null)
290
    {
291
        $this->activateObject()
292
            ->setShadowPresetsProperties((int) $sh_presets)
293
            ->setShadowColor(
294
                is_null($sh_color_value) ? $this->shadowProperties['color']['value'] : $sh_color_value,
295
                is_null($sh_color_alpha) ? (int) $this->shadowProperties['color']['alpha'] : $this->getTrueAlpha($sh_color_alpha),
296
                is_null($sh_color_type) ? $this->shadowProperties['color']['type'] : $sh_color_type
297
            )
298
            ->setShadowBlur($sh_blur)
299
            ->setShadowAngle($sh_angle)
300
            ->setShadowDistance($sh_distance);
301
    }
302
303
    /**
304
     * Set Shadow Presets Properties.

src/PhpSpreadsheet/Chart/Axis.php 1 location

@@ 339-350 (lines=12) @@
336
     * @param int $sh_angle
337
     * @param float $sh_distance
338
     */
339
    public function setShadowProperties($sh_presets, $sh_color_value = null, $sh_color_type = null, $sh_color_alpha = null, $sh_blur = null, $sh_angle = null, $sh_distance = null)
340
    {
341
        $this->setShadowPresetsProperties((int) $sh_presets)
342
            ->setShadowColor(
343
                is_null($sh_color_value) ? $this->shadowProperties['color']['value'] : $sh_color_value,
344
                is_null($sh_color_alpha) ? (int) $this->shadowProperties['color']['alpha'] : $sh_color_alpha,
345
                is_null($sh_color_type) ? $this->shadowProperties['color']['type'] : $sh_color_type
346
            )
347
            ->setShadowBlur($sh_blur)
348
            ->setShadowAngle($sh_angle)
349
            ->setShadowDistance($sh_distance);
350
    }
351
352
    /**
353
     * Set Shadow Color.