Completed
Push — master ( 3dee16...2bf36e )
by Andy
02:57
created

ArrayGetterTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A arrGet() 0 4 2
1
<?php
2
3
namespace EveryPolitician\EveryPoliticianPopolo\Traits;
4
5
trait ArrayGetterTrait
6
{
7 279
    public function arrGet($arr, $key, $default = null)
8
    {
9 279
        return array_key_exists($key, $arr) ? $arr[$key] : $default;
10
    }
11
}
12