Test Failed
Push — master ( 1e3420...0ee68c )
by Jens
52:59 queued 29:30
created

MissingRoleOnChannelError   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 6
c 1
b 0
f 0
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A fieldDefinitions() 0 7 1
1
<?php
2
3
namespace Commercetools\Core\Error;
4
5
use Commercetools\Core\Model\Channel\ChannelReference;
6
use Commercetools\Core\Model\Channel\ChannelRole;
7
8
/**
9
 * @package Commercetools\Core\Error
10
 *
11
 * @method string getCode()
12
 * @method MissingRoleOnChannelError setCode(string $code = null)
13
 * @method string getMessage()
14
 * @method MissingRoleOnChannelError setMessage(string $message = null)
15
 * @method ChannelReference getChannel()
16
 * @method MissingRoleOnChannelError setChannel(ChannelReference $channel = null)
17
 * @method ChannelRole getMissingRole()
18
 * @method MissingRoleOnChannelError setMissingRole(ChannelRole $missingRole = null)
19
 */
20
class MissingRoleOnChannelError extends ApiError
21
{
22
    const CODE = 'MissingRoleOnChannel';
23
24
    public function fieldDefinitions()
25
    {
26
        $definitions = parent::fieldDefinitions();
27
        $definitions['channel'] = [static::TYPE => ChannelReference::class];
28
        $definitions['missingRole'] = [static::TYPE => ChannelRole::class];
29
30
        return $definitions;
31
    }
32
}
33