Completed
Push — develop ( 61213d...79f8cb )
by Jens
09:21
created

Reference::jsonSerialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 7
Ratio 100 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
dl 7
loc 7
ccs 4
cts 4
cp 1
rs 9.4285
c 2
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * @author @jayS-de <[email protected]>
4
 * @created: 27.01.15, 14:53
5
 */
6
7
namespace Commercetools\Core\Model\Common;
8
9
/**
10
 * @package Commercetools\Core\Model\Common
11
 * @link https://dev.commercetools.com/http-api-types.html#reference
12
 * @method string getTypeId()
13
 * @method string getId()
14
 * @method Reference setTypeId(string $typeId = null)
15
 * @method Reference setId(string $id = null)
16
 * @method JsonObject getObj()
17
 * @method Reference setObj(JsonObject $obj = null)
18
 * @method string getKey()
19
 * @method Reference setKey(string $key = null)
20
 */
21
class Reference extends ResourceIdentifier
22
{
23
    const OBJ = 'obj';
24
25
    const TYPE_CLASS = '\Commercetools\Core\Model\Common\JsonObject';
26
27 100
    public function fieldDefinitions()
28
    {
29 100
        $fieldDefinitions = parent::fieldDefinitions();
30 100
        $fieldDefinitions[static::OBJ] = [static::TYPE => static::TYPE_CLASS];
31
32 100
        return $fieldDefinitions;
33
    }
34
}
35