Passed
Push — master ( 0d508a...6e2a06 )
by Jens
16:22 queued 10s
created

ApiClient   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A fieldDefinitions() 0 15 1
1
<?php
2
/**
3
 */
4
5
namespace Commercetools\Core\Model\ApiClient;
6
7
use Commercetools\Core\Model\Common\DateDecorator;
8
use Commercetools\Core\Model\Common\DateTimeDecorator;
9
use Commercetools\Core\Model\Common\JsonObject;
10
use DateTime;
11
12
/**
13
 * @package Commercetools\Core\Model\ApiClient
14
 *
15
 * @method string getId()
16
 * @method ApiClient setId(string $id = null)
17
 * @method string getName()
18
 * @method ApiClient setName(string $name = null)
19
 * @method string getScope()
20
 * @method ApiClient setScope(string $scope = null)
21
 * @method DateTimeDecorator getCreatedAt()
22
 * @method ApiClient setCreatedAt(DateTime $createdAt = null)
23
 * @method DateDecorator getLastUsedAt()
24
 * @method ApiClient setLastUsedAt(DateTime $lastUsedAt = null)
25
 * @method string getSecret()
26
 * @method ApiClient setSecret(string $secret = null)
27
 */
28
class ApiClient extends JsonObject
29
{
30 3
    public function fieldDefinitions()
31
    {
32
        return [
33 3
            'id' => [static::TYPE => 'string'],
34 3
            'name' => [static::TYPE => 'string'],
35 3
            'scope' => [static::TYPE => 'string'],
36
            'createdAt' => [
37 3
                static::TYPE => DateTime::class,
38 3
                static::DECORATOR => DateTimeDecorator::class
39
            ],
40
            'lastUsedAt' => [
41 3
                static::TYPE => DateTime::class,
42 3
                static::DECORATOR => DateDecorator::class
43
            ],
44 3
            'secret' => [static::TYPE => 'string']
45
        ];
46
    }
47
}
48