Completed
Pull Request — master (#48)
by Greg
02:24
created

AnnotationData   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 17
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 4 2
A has() 0 4 1
A keys() 0 4 1
1
<?php
2
namespace Consolidation\AnnotatedCommand;
3
4
class AnnotationData extends \ArrayObject
5
{
6
    public function get($key, $default)
7
    {
8
        return $this->has($key) ? $this[$key] : $default;
9
    }
10
11
    public function has($key)
12
    {
13
        return isset($this[$key]);
14
    }
15
16
    public function keys()
17
    {
18
        return array_keys($this->getArrayCopy());
19
    }
20
}
21