Passed
Push — master ( da0795...78880b )
by Jens
14:45 queued 18s
created

Store   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 12
dl 0
loc 16
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A fieldDefinitions() 0 14 1
1
<?php
2
/**
3
 */
4
5
namespace Commercetools\Core\Model\Store;
6
7
use Commercetools\Core\Model\Common\DateTimeDecorator;
8
use Commercetools\Core\Model\Common\LocalizedString;
9
use Commercetools\Core\Model\Common\Resource;
10
use DateTime;
11
12
/**
13
 * @package Commercetools\Core\Model\Store
14
 * @link https://docs.commercetools.com/http-api-projects-stores#store
15
 * @method string getId()
16
 * @method Store setId(string $id = null)
17
 * @method int getVersion()
18
 * @method Store setVersion(int $version = null)
19
 * @method string getKey()
20
 * @method Store setKey(string $key = null)
21
 * @method LocalizedString getName()
22
 * @method Store setName(LocalizedString $name = null)
23
 * @method DateTimeDecorator getCreatedAt()
24
 * @method Store setCreatedAt(DateTime $createdAt = null)
25
 * @method DateTimeDecorator getLastModifiedAt()
26
 * @method Store setLastModifiedAt(DateTime $lastModifiedAt = null)
27
 * @method StoreReference getReference()
28
 */
29
class Store extends Resource
30
{
31 20
    public function fieldDefinitions()
32
    {
33
        return [
34 20
            'id' => [static::TYPE => 'string'],
35 20
            'version' => [static::TYPE => 'int'],
36 20
            'key' => [static::TYPE => 'string'],
37 20
            'name' => [static::TYPE => LocalizedString::class],
38
            'createdAt' => [
39 20
                static::TYPE => DateTime::class,
40 20
                static::DECORATOR => DateTimeDecorator::class
41
            ],
42
            'lastModifiedAt' => [
43 20
                static::TYPE => DateTime::class,
44 20
                static::DECORATOR => DateTimeDecorator::class
45
            ],
46
        ];
47
    }
48
}
49