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

CustomerSetMiddleNameAction   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A fieldDefinitions() 0 7 1
A __construct() 0 5 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