Issues (453)

src/SoapTypes/DeleteStoresRequest.php (4 issues)

1
<?php
2
3
/*
4
 * This file is part of PHP CS Fixer.
5
 *
6
 * (c) Fabien Potencier <[email protected]>
7
 *     Dariusz RumiƄski <[email protected]>
8
 *
9
 * This source file is subject to the MIT license that is bundled
10
 * with this source code in the file LICENSE.
11
 */
12
13
namespace Etrias\PaazlConnector\SoapTypes;
14
15
use Phpro\SoapClient\Type\RequestInterface;
16
17
class DeleteStoresRequest implements RequestInterface
18
{
19
    /**
20
     * @var int
21
     */
22
    protected $webshop = null;
23
24
    /**
25
     * @var int
26
     */
27
    protected $targetWebshop = null;
28
29
    /**
30
     * @var deleteStoreType
31
     */
32
    protected $store = null;
33
34
    /**
35
     * Constructor.
36
     *
37
     * @var int
38
     * @var int               $targetWebshop
39
     * @var deleteStoreType[] $store
40
     *
41
     * @param mixed $webshop
42
     * @param mixed $targetWebshop
43
     */
44
    public function __construct($webshop, $targetWebshop, array $stores)
45
    {
46
        $this->webshop = $webshop;
0 ignored issues
show
Documentation Bug introduced by
$webshop is of type mixed, but the property $webshop was declared to be of type integer. Are you sure that you always receive this specific sub-class here, or does it make sense to add an instanceof check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.

Either this assignment is in error or an instanceof check should be added for that assignment.

class Alien {}

class Dalek extends Alien {}

class Plot
{
    /** @var  Dalek */
    public $villain;
}

$alien = new Alien();
$plot = new Plot();
if ($alien instanceof Dalek) {
    $plot->villain = $alien;
}
Loading history...
47
        $this->targetWebshop = $targetWebshop;
48
        $this->store = $stores;
0 ignored issues
show
Documentation Bug introduced by
It seems like $stores of type array is incompatible with the declared type Etrias\PaazlConnector\SoapTypes\deleteStoreType of property $store.

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...
49
    }
50
51
    /**
52
     * @return int
53
     */
54
    public function getWebshop()
55
    {
56
        return $this->webshop;
57
    }
58
59
    /**
60
     * @param int $webshop
61
     *
62
     * @return $this
63
     */
64
    public function setWebshop($webshop)
65
    {
66
        $this->webshop = $webshop;
67
68
        return $this;
69
    }
70
71
    /**
72
     * @return int
73
     */
74
    public function getTargetWebshop()
75
    {
76
        return $this->targetWebshop;
77
    }
78
79
    /**
80
     * @param int $targetWebshop
81
     *
82
     * @return $this
83
     */
84
    public function setTargetWebshop($targetWebshop)
85
    {
86
        $this->targetWebshop = $targetWebshop;
87
88
        return $this;
89
    }
90
91
    /**
92
     * @return deleteStoreType[]
93
     */
94
    public function getStores()
95
    {
96
        return $this->store;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->store returns the type Etrias\PaazlConnector\SoapTypes\deleteStoreType which is incompatible with the documented return type Etrias\PaazlConnector\SoapTypes\deleteStoreType[].
Loading history...
97
    }
98
99
    /**
100
     * @param deleteStoreType[] $store
101
     *
102
     * @return $this
103
     */
104
    public function setStores(array $store)
105
    {
106
        $this->store = $store;
0 ignored issues
show
Documentation Bug introduced by
It seems like $store of type Etrias\PaazlConnector\SoapTypes\deleteStoreType[] is incompatible with the declared type Etrias\PaazlConnector\SoapTypes\deleteStoreType of property $store.

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...
107
108
        return $this;
109
    }
110
}
111