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

MissingRoleOnChannelError::fieldDefinitions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 7
rs 10
cc 1
nc 1
nop 0
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