GenerateThemeCacheDefinition   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 21
ccs 0
cts 4
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A define() 0 3 1
1
<?php
2
3
namespace Deployee\Plugins\ShopwareTasks\Definitions;
4
5
6
use Deployee\Plugins\Deploy\Definitions\Parameter\ParameterCollection;
7
use Deployee\Plugins\Deploy\Definitions\Parameter\ParameterCollectionInterface;
8
use Deployee\Plugins\Deploy\Definitions\Tasks\TaskDefinitionInterface;
9
10
class GenerateThemeCacheDefinition implements TaskDefinitionInterface
11
{
12
    /**
13
     * @var int
14
     */
15
    private $shopId;
16
17
    /**
18
     * @param array $shopId
19
     */
20
    public function __construct(array $shopId = [])
21
    {
22
        $this->shopId = $shopId;
0 ignored issues
show
Documentation Bug introduced by
It seems like $shopId of type array is incompatible with the declared type integer of property $shopId.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
23
    }
24
25
    /**
26
     * @return ParameterCollectionInterface
27
     */
28
    public function define(): ParameterCollectionInterface
29
    {
30
        return new ParameterCollection(get_object_vars($this));
31
    }
32
}