Event::jsonSerialize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
ccs 6
cts 6
cp 1
crap 1
1
<?php
2
3
namespace DJStarCOM\NewRelic\Entity\Insights;
4
5
use Respect\Validation\Validator;
6
7
class Event implements \JsonSerializable
8
{
9
    public $eventType;
10
11
    /**
12
     * @inheritdoc
13
     */
14 4
    public function jsonSerialize()
15
    {
16 4
        Validator::stringType()
17 4
            ->notEmpty()
18 4
            ->setName('eventType')
19 4
            ->check($this->eventType);
20
21 1
        return $this;
22
    }
23
}
24