Passed
Push — develop ( 267ce5...6afb61 )
by Jens
14:16
created

OrderPaymentChangedMessage::fieldDefinitions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 7
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 7
loc 7
ccs 0
cts 6
cp 0
rs 9.4285
c 1
b 0
f 1
cc 1
eloc 4
nc 1
nop 0
crap 2
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
use DateTime;
11
12
/**
13
 * @package Commercetools\Core\Model\Message
14
 * @link https://dev.commercetools.com/http-api-projects-messages.html#orderpaymentstatechanged-message
15
 * @method string getId()
16
 * @method OrderPaymentChangedMessage setId(string $id = null)
17
 * @method DateTimeDecorator getCreatedAt()
18
 * @method OrderPaymentChangedMessage setCreatedAt(DateTime $createdAt = null)
19
 * @method int getSequenceNumber()
20
 * @method OrderPaymentChangedMessage setSequenceNumber(int $sequenceNumber = null)
21
 * @method Reference getResource()
22
 * @method OrderPaymentChangedMessage setResource(Reference $resource = null)
23
 * @method int getResourceVersion()
24
 * @method OrderPaymentChangedMessage setResourceVersion(int $resourceVersion = null)
25
 * @method string getType()
26
 * @method OrderPaymentChangedMessage setType(string $type = null)
27
 * @method int getVersion()
28
 * @method OrderPaymentChangedMessage setVersion(int $version = null)
29
 * @method DateTimeDecorator getLastModifiedAt()
30
 * @method OrderPaymentChangedMessage setLastModifiedAt(DateTime $lastModifiedAt = null)
31
 * @method string getPaymentState()
32
 * @method OrderPaymentChangedMessage setPaymentState(string $paymentState = null)
33
 */
34 View Code Duplication
class OrderPaymentChangedMessage extends Message
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...
35
{
36
    const MESSAGE_TYPE = 'OrderPaymentStateChanged';
37
38
    public function fieldDefinitions()
39
    {
40
        $definitions = parent::fieldDefinitions();
41
        $definitions['paymentState'] = [static::TYPE => 'string'];
42
43
        return $definitions;
44
    }
45
}
46