Completed
Push — master ( 5f432b...5d5b15 )
by Jens
15:50 queued 05:48
created

CustomerSetMiddleNameAction::fieldDefinitions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 7
ccs 3
cts 3
cp 1
rs 9.4285
c 1
b 0
f 1
cc 1
eloc 4
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * @author @jayS-de <[email protected]>
4
 */
5
6
namespace Commercetools\Core\Request\Customers\Command;
7
8
use Commercetools\Core\Model\Common\Context;
9
use Commercetools\Core\Request\AbstractAction;
10
11
/**
12
 * @package Commercetools\Core\Request\Customers\Command
13
 * @link http://dev.commercetools.com/http-api-projects-customers.html#set-middle-name
14
 * @method string getAction()
15
 * @method CustomerSetMiddleNameAction setAction(string $action = null)
16
 * @method string getMiddleName()
17
 * @method CustomerSetMiddleNameAction setMiddleName(string $middleName = null)
18
 */
19
class CustomerSetMiddleNameAction extends AbstractAction
20
{
21 4
    public function fieldDefinitions()
22
    {
23
        return [
24 4
            'action' => [static::TYPE => 'string'],
25 4
            'middleName' => [static::TYPE => 'string'],
26
        ];
27
    }
28
29
    /**
30
     * @param array $data
31
     * @param Context|callable $context
32
     */
33 2
    public function __construct(array $data = [], $context = null)
34
    {
35 2
        parent::__construct($data, $context);
36 2
        $this->setAction('setMiddleName');
37 2
    }
38
}
39