Completed
Push — develop ( 641d0b...7172e1 )
by Jens
11:21
created

IronMQDestination::fieldDefinitions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 7
Ratio 100 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 7
loc 7
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * @author @jenschude <[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 View Code Duplication
class IronMQDestination extends Destination
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
19
{
20 1
    public function fieldDefinitions()
21
    {
22
        return [
23 1
            'type' => [static::TYPE => 'string'],
24 1
            '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