Completed
Push — develop ( 94ac5e...9b8817 )
by Jens
14:35
created

IronMQDestination::fieldDefinitions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 7
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * @author @jayS-de <[email protected]>
4
 */
5
6
namespace Commercetools\Core\Model\Subscription;
7
8
use Commercetools\Core\Model\Common\Context;
9
10
/**
11
 * @package Commercetools\Core\Model\Subscription
12
 *
13
 * @method string getType()
14
 * @method IronMQDestination setType(string $type = null)
15
 * @method string getUri()
16
 * @method IronMQDestination setUri(string $uri = null)
17
 */
18
class IronMQDestination extends Destination
19
{
20
    public function fieldDefinitions()
21
    {
22
        return [
23
            'type' => [static::TYPE => 'string'],
24
            'uri' => [static::TYPE => 'string']
25
        ];
26
    }
27
28
    public static function ofUri($uri, Context $context = null)
29
    {
30
        return static::of($context)->setType('IronMQ')->setUri($uri);
31
    }
32
}
33