Test Failed
Push — develop ( f4030e...371b47 )
by Barbara
19:17 queued 15s
created

__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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