Completed
Push — master ( 44676f...b7bc18 )
by Jens
13:18
created

Project::fieldDefinitions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 15

Duplication

Lines 20
Ratio 100 %

Code Coverage

Tests 12
CRAP Score 1

Importance

Changes 0
Metric Value
dl 20
loc 20
ccs 12
cts 12
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 15
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * @author @jayS-de <[email protected]>
4
 */
5
6
namespace Commercetools\Core\Model\Project;
7
8
use Commercetools\Core\Model\Common\JsonObject;
9
use Commercetools\Core\Model\Common\Collection;
10
use Commercetools\Core\Model\Common\DateTimeDecorator;
11
use Commercetools\Core\Model\Message\MessagesConfiguration;
12
use DateTime;
13
14
/**
15
 * @package Commercetools\Core\Model\Project
16
 * @link https://dev.commercetools.com/http-api-projects-project.html#project
17
 * @method string getKey()
18
 * @method Project setKey(string $key = null)
19
 * @method string getName()
20
 * @method Project setName(string $name = null)
21
 * @method Collection getCountries()
22
 * @method Project setCountries(Collection $countries = null)
23
 * @method Collection getCurrencies()
24
 * @method Project setCurrencies(Collection $currencies = null)
25
 * @method Collection getLanguages()
26
 * @method Project setLanguages(Collection $languages = null)
27
 * @method DateTimeDecorator getCreatedAt()
28
 * @method Project setCreatedAt(DateTime $createdAt = null)
29
 * @method DateTimeDecorator getTrialUntil()
30
 * @method Project setTrialUntil(DateTime $trialUntil = null)
31
 * @method MessagesConfiguration getMessages()
32
 * @method Project setMessages(MessagesConfiguration $messages = null)
33
 * @method int getVersion()
34
 * @method Project setVersion(int $version = null)
35
 */
36 View Code Duplication
class Project extends JsonObject
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
37
{
38 7
    public function fieldDefinitions()
39
    {
40
        return [
41 7
            'version' => [static::TYPE => 'int'],
42 7
            'key' => [static::TYPE => 'string'],
43 7
            'name' => [static::TYPE => 'string'],
44 7
            'countries' => [static::TYPE => Collection::class],
45 7
            'currencies' => [static::TYPE => Collection::class],
46 7
            'languages' => [static::TYPE => Collection::class],
47
            'createdAt' => [
48 7
                static::TYPE => DateTime::class,
49 7
                static::DECORATOR => DateTimeDecorator::class
50
            ],
51
            'trialUntil' => [
52 7
                static::TYPE => DateTime::class,
53 7
                static::DECORATOR => DateTimeDecorator::class
54
            ],
55 7
            'messages' => [static::TYPE => MessagesConfiguration::class]
56
        ];
57
    }
58
}
59