Issues (453)

src/SoapTypes/ActiveShippingOption.php (1 issue)

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
class ActiveShippingOption
16
{
17
    /**
18
     * @var string
19
     */
20
    protected $type = null;
21
22
    /**
23
     * @var string
24
     */
25
    protected $description = null;
26
27
    /**
28
     * @var string
29
     */
30
    protected $distributor = null;
31
32
    /**
33
     * @var string
34
     */
35
    protected $distributorDescription = null;
36
37
    /**
38
     * @var countriesType
39
     */
40
    protected $countries = null;
41
42
    /**
43
     * Constructor.
44
     *
45
     * @var string
46
     * @var string        $description
47
     * @var string        $distributor
48
     * @var string        $distributorDescription
49
     * @var countriesType $countries
50
     *
51
     * @param mixed $type
52
     * @param mixed $description
53
     * @param mixed $distributor
54
     * @param mixed $distributorDescription
55
     * @param mixed $countries
56
     */
57
    public function __construct($type, $description, $distributor, $distributorDescription, $countries)
58
    {
59
        $this->type = $type;
0 ignored issues
show
Documentation Bug introduced by
$type is of type mixed, but the property $type was declared to be of type string. 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...
60
        $this->description = $description;
61
        $this->distributor = $distributor;
62
        $this->distributorDescription = $distributorDescription;
63
        $this->countries = $countries;
64
    }
65
66
    /**
67
     * @return string
68
     */
69
    public function getType()
70
    {
71
        return $this->type;
72
    }
73
74
    /**
75
     * @param string $type
76
     *
77
     * @return $this
78
     */
79
    public function setType($type)
80
    {
81
        $this->type = $type;
82
83
        return $this;
84
    }
85
86
    /**
87
     * @return string
88
     */
89
    public function getDescription()
90
    {
91
        return $this->description;
92
    }
93
94
    /**
95
     * @param string $description
96
     *
97
     * @return $this
98
     */
99
    public function setDescription($description)
100
    {
101
        $this->description = $description;
102
103
        return $this;
104
    }
105
106
    /**
107
     * @return string
108
     */
109
    public function getDistributor()
110
    {
111
        return $this->distributor;
112
    }
113
114
    /**
115
     * @param string $distributor
116
     *
117
     * @return $this
118
     */
119
    public function setDistributor($distributor)
120
    {
121
        $this->distributor = $distributor;
122
123
        return $this;
124
    }
125
126
    /**
127
     * @return string
128
     */
129
    public function getDistributorDescription()
130
    {
131
        return $this->distributorDescription;
132
    }
133
134
    /**
135
     * @param string $distributorDescription
136
     *
137
     * @return $this
138
     */
139
    public function setDistributorDescription($distributorDescription)
140
    {
141
        $this->distributorDescription = $distributorDescription;
142
143
        return $this;
144
    }
145
146
    /**
147
     * @return countriesType
148
     */
149
    public function getCountries()
150
    {
151
        return $this->countries;
152
    }
153
154
    /**
155
     * @param countriesType $countries
156
     *
157
     * @return $this
158
     */
159
    public function setCountries($countries)
160
    {
161
        $this->countries = $countries;
162
163
        return $this;
164
    }
165
}
166