GenerateThemeCacheDefinition::__construct()   A
last analyzed

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 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
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
}