Completed
Push — master ( 297d81...f5b8f3 )
by Alexandr
01:26
created

ArrHelper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 15
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A isStrKeysArray() 0 8 1
1
<?php
2
3
namespace Bricks\Helper;
4
5
6
class ArrHelper
7
{
8
    /**
9
     * @param array $array
10
     * @return bool
11
     */
12
    public static function isStrKeysArray(array $array): bool
13
    {
14 9
        $filtered = array_filter($array, function ($key) {
15 8
            return !is_string($key);
16 9
        }, ARRAY_FILTER_USE_KEY);
17
18 9
        return empty($filtered);
19
    }
20
}