Code Duplication    Length = 22-22 lines in 2 locations

src/PhpSpreadsheet/Chart/GridLines.php 1 location

@@ 326-347 (lines=22) @@
323
     *
324
     * @return GridLines
325
     */
326
    private function setShadowProperiesMapValues(array $properties_map, &$reference = null)
327
    {
328
        $base_reference = $reference;
329
        foreach ($properties_map as $property_key => $property_val) {
330
            if (is_array($property_val)) {
331
                if ($reference === null) {
332
                    $reference = &$this->shadowProperties[$property_key];
333
                } else {
334
                    $reference = &$reference[$property_key];
335
                }
336
                $this->setShadowProperiesMapValues($property_val, $reference);
337
            } else {
338
                if ($base_reference === null) {
339
                    $this->shadowProperties[$property_key] = $property_val;
340
                } else {
341
                    $reference[$property_key] = $property_val;
342
                }
343
            }
344
        }
345
346
        return $this;
347
    }
348
349
    /**
350
     * Set Shadow Color.

src/PhpSpreadsheet/Chart/Axis.php 1 location

@@ 375-396 (lines=22) @@
372
     *
373
     * @return Axis
374
     */
375
    private function setShadowProperiesMapValues(array $properties_map, &$reference = null)
376
    {
377
        $base_reference = $reference;
378
        foreach ($properties_map as $property_key => $property_val) {
379
            if (is_array($property_val)) {
380
                if ($reference === null) {
381
                    $reference = &$this->shadowProperties[$property_key];
382
                } else {
383
                    $reference = &$reference[$property_key];
384
                }
385
                $this->setShadowProperiesMapValues($property_val, $reference);
386
            } else {
387
                if ($base_reference === null) {
388
                    $this->shadowProperties[$property_key] = $property_val;
389
                } else {
390
                    $reference[$property_key] = $property_val;
391
                }
392
            }
393
        }
394
395
        return $this;
396
    }
397
398
    /**
399
     * Set Shadow Color.