HasAccessor   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 4 1
1
<?php
2
3
namespace Underscore\Accessor;
4
5
use Underscore\Accessor;
6
use Underscore\Collection;
7
8
class HasAccessor extends Accessor
9
{
10
    /**
11
     * Determine if the given key exists in the collection.
12
     *
13
     * @param Collection $collection
14
     * @param string     $key
15
     * @return mixed
16
     */
17 1
    public function __invoke(Collection $collection, $key)
18
    {
19 1
        return $collection->offsetExists($key);
20
    }
21
}
22