EventCollection::add()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
ccs 3
cts 3
cp 1
crap 1
1
<?php
2
3
namespace DJStarCOM\NewRelic\Entity\Insights;
4
5
class EventCollection extends \ArrayObject implements \JsonSerializable
6
{
7
    /**
8
     * @param Event $event
9
     * @return $this
10
     */
11 4
    public function add(Event $event)
12
    {
13 4
        $this->append($event);
14 4
        return $this;
15
    }
16
17
    /**
18
     * @inheritdoc
19
     */
20 6
    public function jsonSerialize()
21
    {
22 6
        return $this->getArrayCopy();
23
    }
24
}
25