Passed
Push — master ( 790514...4d627a )
by Phillip
01:46
created

PluginConfigSetDefinition::define()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace Deployee\Plugins\ShopwareTasks\Definitions;
5
6
7
use Deployee\Plugins\Deploy\Definitions\Parameter\ParameterCollection;
8
use Deployee\Plugins\Deploy\Definitions\Parameter\ParameterCollectionInterface;
9
10
class PluginConfigSetDefinition extends AbstractShopwareDefinition
11
{
12
    /**
13
     * @var string
14
     */
15
    protected $plugin;
16
17
    /**
18
     * @var string
19
     */
20
    protected $key;
21
22
    /**
23
     * @var mixed
24
     */
25
    protected $value;
26
27
    /**
28
     * @param string $plugin
29
     * @param string $key
30
     * @param mixed $value
31
     */
32
    public function __construct(string $plugin, string $key, $value)
33
    {
34
        $this->plugin = $plugin;
35
        $this->key = $key;
36
        $this->value = $value;
37
    }
38
39
    /**
40
     * @return ParameterCollectionInterface
41
     */
42
    public function define(): ParameterCollectionInterface
43
    {
44
        return new ParameterCollection(get_object_vars($this));
45
    }
46
}