Completed
Push — master ( 9c37c7...1d2d63 )
by Jens
08:02
created

ReviewRatingSetMessage   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 15
ccs 0
cts 9
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A fieldDefinitions() 0 10 1
1
<?php
2
/**
3
 * @author @jayS-de <[email protected]>
4
 */
5
6
namespace Commercetools\Core\Model\Message;
7
8
use Commercetools\Core\Model\Common\DateTimeDecorator;
9
use Commercetools\Core\Model\Common\Reference;
10
11
/**
12
 * @package Commercetools\Core\Model\Message
13
 *
14
 * @method string getId()
15
 * @method ReviewRatingSetMessage setId(string $id = null)
16
 * @method int getVersion()
17
 * @method ReviewRatingSetMessage setVersion(int $version = null)
18
 * @method DateTimeDecorator getCreatedAt()
19
 * @method ReviewRatingSetMessage setCreatedAt(\DateTime $createdAt = null)
20
 * @method DateTimeDecorator getLastModifiedAt()
21
 * @method ReviewRatingSetMessage setLastModifiedAt(\DateTime $lastModifiedAt = null)
22
 * @method int getSequenceNumber()
23
 * @method ReviewRatingSetMessage setSequenceNumber(int $sequenceNumber = null)
24
 * @method Reference getResource()
25
 * @method ReviewRatingSetMessage setResource(Reference $resource = null)
26
 * @method int getResourceVersion()
27
 * @method ReviewRatingSetMessage setResourceVersion(int $resourceVersion = null)
28
 * @method string getType()
29
 * @method ReviewRatingSetMessage setType(string $type = null)
30
 * @method float getOldRating()
31
 * @method ReviewRatingSetMessage setOldRating(float $oldRating = null)
32
 * @method float getNewRating()
33
 * @method ReviewRatingSetMessage setNewRating(float $newRating = null)
34
 * @method bool getIncludedInStatistics()
35
 * @method ReviewRatingSetMessage setIncludedInStatistics(bool $includedInStatistics = null)
36
 * @method Reference getTarget()
37
 * @method ReviewRatingSetMessage setTarget(Reference $target = null)
38
 */
39
class ReviewRatingSetMessage extends Message
40
{
41
    const MESSAGE_TYPE = 'ReviewRatingSet';
42
43
    public function fieldDefinitions()
44
    {
45
        $definitions = parent::fieldDefinitions();
46
        $definitions['oldRating'] = [static::TYPE => 'float'];
47
        $definitions['newRating'] = [static::TYPE => 'float'];
48
        $definitions['includedInStatistics'] = [static::TYPE => 'bool'];
49
        $definitions['target'] = [static::TYPE => '\Commercetools\Core\Model\Common\Reference'];
50
51
        return $definitions;
52
    }
53
}
54