GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Test Failed
Push — master ( 3e189a...03d551 )
by Mewes
15:04
created

Arrays   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 21
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A mergeRecursive() 0 9 5
1
<?php
2
3
namespace MewesK\TwigSpreadsheetBundle\Helper;
4
5
/**
6
 * Class Arrays.
7
 */
8
class Arrays
9
{
10
    /**
11
     * Merge two arrays recursively. Works the same as 'array_merge_recursive' but will only merge array values, other
12
     * values are overridden.
13
     *
14
     * @param array $array1
15
     * @param array $array2
16
     *
17
     * @return array
18
     */
19 2
    public static function mergeRecursive(array &$array1, array &$array2): array
20
    {
21 2
        foreach ($array2 as $key => &$value) {
22 2
            $array1[$key] = \is_array($value) && isset($array1[$key]) && \is_array($array1[$key]) ?
23 2
                self::mergeRecursive($array1[$key], $value) :
24 2
                $value;
25
        }
26 2
        return $array1;
27
    }
28
}
29