Completed
Push — develop ( e5510f...295319 )
by
unknown
08:01
created

Review::fieldDefinitions()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 27
Code Lines 22

Duplication

Lines 27
Ratio 100 %

Code Coverage

Tests 22
CRAP Score 1

Importance

Changes 3
Bugs 0 Features 2
Metric Value
dl 27
loc 27
ccs 22
cts 22
cp 1
rs 8.8571
c 3
b 0
f 2
cc 1
eloc 22
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * @author @jayS-de <[email protected]>
4
 */
5
6
namespace Commercetools\Core\Model\Review;
7
8
use Commercetools\Core\Model\Common\Resource;
9
use Commercetools\Core\Model\Common\DateTimeDecorator;
10
use Commercetools\Core\Model\State\StateReference;
11
use Commercetools\Core\Model\Common\ResourceIdentifier;
12
use Commercetools\Core\Model\Customer\CustomerReference;
13
use Commercetools\Core\Model\CustomField\CustomFieldObject;
14
15
/**
16
 * @package Commercetools\Core\Model\Review
17
 * @method string getId()
18
 * @method Review setId(string $id = null)
19
 * @method int getVersion()
20
 * @method Review setVersion(int $version = null)
21
 * @method DateTimeDecorator getCreatedAt()
22
 * @method Review setCreatedAt(\DateTime $createdAt = null)
23
 * @method DateTimeDecorator getLastModifiedAt()
24
 * @method Review setLastModifiedAt(\DateTime $lastModifiedAt = null)
25
 * @method string getProductId()
26
 * @method Review setProductId(string $productId = null)
27
 * @method string getCustomerId()
28
 * @method Review setCustomerId(string $customerId = null)
29
 * @method string getAuthorName()
30
 * @method Review setAuthorName(string $authorName = null)
31
 * @method string getTitle()
32
 * @method Review setTitle(string $title = null)
33
 * @method string getText()
34
 * @method Review setText(string $text = null)
35
 * @method float getScore()
36
 * @method Review setScore(float $score = null)
37
 * @method StateReference getState()
38
 * @method Review setState(StateReference $state = null)
39
 * @method string getKey()
40
 * @method Review setKey(string $key = null)
41
 * @method string getUniquenessValue()
42
 * @method Review setUniquenessValue(string $uniquenessValue = null)
43
 * @method string getLocale()
44
 * @method Review setLocale(string $locale = null)
45
 * @method ResourceIdentifier getTarget()
46
 * @method Review setTarget(ResourceIdentifier $target = null)
47
 * @method int getRating()
48
 * @method Review setRating(int $rating = null)
49
 * @method bool getIncludedInStatistics()
50
 * @method Review setIncludedInStatistics(bool $includedInStatistics = null)
51
 * @method CustomerReference getCustomer()
52
 * @method Review setCustomer(CustomerReference $customer = null)
53
 * @method CustomFieldObject getCustom()
54
 * @method Review setCustom(CustomFieldObject $custom = null)
55
 */
56 View Code Duplication
class Review extends Resource
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...
57
{
58 2
    public function fieldDefinitions()
59
    {
60
        return [
61 2
            'id' => [static::TYPE => 'string'],
62 2
            'version' => [static::TYPE => 'int'],
63
            'createdAt' => [
64 2
                static::TYPE => '\DateTime',
65 2
                static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator'
66 2
            ],
67
            'lastModifiedAt' => [
68 2
                static::TYPE => '\DateTime',
69 2
                static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator'
70 2
            ],
71 2
            'key' => [static::TYPE => 'string'],
72 2
            'uniquenessValue' => [static::TYPE => 'string'],
73 2
            'locale' => [static::TYPE => 'string'],
74 2
            'authorName' => [static::TYPE => 'string'],
75 2
            'title' => [static::TYPE => 'string'],
76 2
            'text' => [static::TYPE => 'string'],
77 2
            'target' => [static::TYPE => '\Commercetools\Core\Model\Common\ResourceIdentifier'],
78 2
            'rating' => [static::TYPE => 'int'],
79 2
            'state' => [static::TYPE => '\Commercetools\Core\Model\State\StateReference'],
80 2
            'includedInStatistics' => [static::TYPE => 'bool'],
81 2
            'customer' => [static::TYPE => '\Commercetools\Core\Model\Customer\CustomerReference'],
82 2
            'custom' => [static::TYPE => '\Commercetools\Core\Model\CustomField\CustomFieldObject'],
83 2
        ];
84
    }
85
}
86