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

AnnotationData::has()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 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