Completed
Push — develop ( b6cb2c...9ca58c )
by Jens
15:17 queued 07:08
created

Extension   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 13
dl 0
loc 18
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A fieldDefinitions() 0 16 1
1
<?php
2
/**
3
 */
4
5
namespace Commercetools\Core\Model\Extension;
6
7
use Commercetools\Core\Model\Common\DateTimeDecorator;
8
use Commercetools\Core\Model\Common\Resource;
9
use DateTime;
10
11
/**
12
 * @package Commercetools\Core\Model\Extension
13
 *
14
 * @method string getId()
15
 * @method Extension setId(string $id = null)
16
 * @method int getVersion()
17
 * @method Extension setVersion(int $version = null)
18
 * @method DateTimeDecorator getCreatedAt()
19
 * @method Extension setCreatedAt(DateTime $createdAt = null)
20
 * @method DateTimeDecorator getLastModifiedAt()
21
 * @method Extension setLastModifiedAt(DateTime $lastModifiedAt = null)
22
 * @method string getKey()
23
 * @method Extension setKey(string $key = null)
24
 * @method Destination getDestination()
25
 * @method Extension setDestination(Destination $destination = null)
26
 * @method TriggerCollection getTriggers()
27
 * @method Extension setTriggers(TriggerCollection $triggers = null)
28
 */
29
class Extension extends Resource
30
{
31 5
    public function fieldDefinitions()
32
    {
33
        return [
34 5
            'id' => [static::TYPE => 'string'],
35 5
            'version' => [static::TYPE => 'int'],
36
            'createdAt' => [
37 5
                static::TYPE => DateTime::class,
38 5
                static::DECORATOR => DateTimeDecorator::class
39
            ],
40
            'lastModifiedAt' => [
41 5
                static::TYPE => DateTime::class,
42 5
                static::DECORATOR => DateTimeDecorator::class
43
            ],
44 5
            'key' => [static::TYPE => 'string'],
45 5
            'destination' => [static::TYPE => Destination::class],
46 5
            'triggers' => [static::TYPE => TriggerCollection::class],
47
        ];
48
    }
49
}
50