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

OrderEditSetCommentAction::fieldDefinitions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 5
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 *
4
 */
5
6
namespace Commercetools\Core\Request\OrderEdits\Command;
7
8
use Commercetools\Core\Model\Common\Context;
9
use Commercetools\Core\Request\AbstractAction;
10
11
/**
12
 * @package Commercetools\Core\Request\OrderEdits\Command
13
 *
14
 * @method string getAction()
15
 * @method OrderEditSetCommentAction setAction(string $action = null)
16
 * @method string getComment()
17
 * @method OrderEditSetCommentAction setComment(string $comment = null)
18
 */
19
class OrderEditSetCommentAction extends AbstractAction
20
{
21 4
    public function fieldDefinitions()
22
    {
23
        return [
24 4
            'action' => [static::TYPE => 'string'],
25 4
            'comment' => [static::TYPE => 'string'],
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33 4
    public function __construct(array $data = [], $context = null)
34
    {
35 4
        parent::__construct($data, $context);
36 4
        $this->setAction('setComment');
37 4
    }
38
}
39