PluginConfigSetDefinition::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 2
b 0
f 0
nc 1
nop 2
dl 0
loc 4
ccs 0
cts 2
cp 0
crap 2
rs 10
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 $key
29
     * @param mixed $value
30
     */
31
    public function __construct(string $key, $value)
32
    {
33
        $this->key = $key;
34
        $this->value = $value;
35
    }
36
37
    /**
38
     * @return ParameterCollectionInterface
39
     */
40
    public function define(): ParameterCollectionInterface
41
    {
42
        return new ParameterCollection(get_object_vars($this));
43
    }
44
}