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.

ArrayUtils   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 24
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B isArrayAssoc() 0 13 6
1
<?php
2
/**
3
 * This file is part of the Global Trading Technologies Ltd workflow-extension-bundle package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * (c) fduch <[email protected]>
9
 *
10
 * Date: 22.09.16
11
 */
12
13
namespace Gtt\Bundle\WorkflowExtensionsBundle\Utils;
14
15
/**
16
 * Service array utils
17
 *
18
 * @author fduch <[email protected]>
19
 */
20
class ArrayUtils
21
{
22
    /**
23
     * Recursively checks that passed array is associative or not
24
     *
25
     * @param array $array          input array
26
     * @param bool  $recursiveCheck whether to perform recursive check or not
27
     *
28
     * @return bool
29
     */
30
    public static function isArrayAssoc(array $array, $recursiveCheck = true)
31
    {
32
        foreach ($array as $key => $value) {
33
            if (is_string($key)) {
34
                return true;
35
            }
36
            if ($recursiveCheck && is_array($value) && static::isArrayAssoc($value)) {
37
                return true;
38
            }
39
        }
40
41
        return false;
42
    }
43
}