Passed
Push — master ( a8ff8f...cbaed7 )
by payever
02:47
created

PluginRegistryRequestEntity   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getRequired() 0 5 1
1
<?php
2
/**
3
 * PHP version 5.4 and 7
4
 *
5
 * @package   Payever\Plugins
6
 * @author    Hennadii.Shymanskyi <[email protected]>
7
 * @copyright 2017-2019 payever GmbH
8
 * @license   MIT <https://opensource.org/licenses/MIT>
9
 */
10
11
namespace Payever\ExternalIntegration\Plugins\Http\RequestEntity;
12
13
use Payever\ExternalIntegration\Core\Enum\ChannelSet;
14
use Payever\ExternalIntegration\Core\Http\RequestEntity;
15
use Payever\ExternalIntegration\Plugins\Enum\PluginCommandNameEnum;
16
17
/**
18
 * @method self setPluginVersion(string $pluginVersion)
19
 * @method self setCmsVersion(string $cmsVersion)
20
 * @method self setChannel(string $channel)
21
 * @method self setHost(string $host)
22
 * @method self setSupportedCommands(string[] $commands)
23
 * @method self setCommandEndpoint(string $endpoint)
24
 * @method self setBusinessIds(string[] $ids)
25
 */
26
class PluginRegistryRequestEntity extends RequestEntity
27
{
28
    const UNDERSCORE_ON_SERIALIZATION = false;
29
30
    /**
31
     * @required only for registration
32
     * @var string
33
     */
34
    protected $pluginVersion;
35
36
    /**
37
     * @required only for registration
38
     * @var string
39
     */
40
    protected $cmsVersion;
41
42
    /**
43
     * @required
44
     * @var string
45
     * @see ChannelSet
46
     */
47
    protected $channel;
48
49
    /**
50
     * @required
51
     * @var string
52
     */
53
    protected $host;
54
55
    /**
56
     * @var array
57
     * @see PluginCommandNameEnum
58
     */
59
    protected $supportedCommands;
60
61
    /** @var string */
62
    protected $commandEndpoint;
63
64
    /** @var string[] */
65
    protected $businessIds;
66
67
    /**
68
     * @return array
69
     */
70
    public function getRequired()
71
    {
72
        return array(
73
            'channel',
74
            'host',
75
        );
76
    }
77
}
78