@@ -104,7 +104,7 @@ class ProductStoreView
104104 /** @var CustomOptionValue[][] */
105105 protected $ customOptionValues = [];
106106
107- public function setName (string $ name = null )
107+ public function setName (? string $ name = null )
108108 {
109109 $ this ->attributes [self ::ATTR_NAME ] = ($ name === null ) ? null : trim ($ name );
110110 }
@@ -137,7 +137,7 @@ public function removeStoreViewId()
137137 *
138138 * @param int|null $status
139139 */
140- public function setStatus (int $ status = null )
140+ public function setStatus (? int $ status = null )
141141 {
142142 $ this ->attributes [self ::ATTR_STATUS ] = $ status ;
143143 }
@@ -147,35 +147,35 @@ public function setStatus(int $status = null)
147147 *
148148 * @param int|null $available
149149 */
150- public function setGiftMessageAvailable (int $ available = null )
150+ public function setGiftMessageAvailable (? int $ available = null )
151151 {
152152 $ this ->attributes [self ::ATTR_GIFT_MESSAGE_AVAILABLE ] = $ available ;
153153 }
154154
155- public function setDescription (string $ description = null )
155+ public function setDescription (? string $ description = null )
156156 {
157157 // textarea input: not trimmed
158158 $ this ->attributes [self ::ATTR_DESCRIPTION ] = $ description ;
159159 }
160160
161- public function setShortDescription (string $ shortDescription = null )
161+ public function setShortDescription (? string $ shortDescription = null )
162162 {
163163 // textarea input: not trimmed
164164 $ this ->attributes [self ::ATTR_SHORT_DESCRIPTION ] = $ shortDescription ;
165165 }
166166
167- public function setMetaTitle (string $ metaTitle = null )
167+ public function setMetaTitle (? string $ metaTitle = null )
168168 {
169169 $ this ->attributes [self ::ATTR_META_TITLE ] = ($ metaTitle === null ) ? null : trim ($ metaTitle );
170170 }
171171
172- public function setMetaDescription (string $ metaDescription = null )
172+ public function setMetaDescription (? string $ metaDescription = null )
173173 {
174174 // textarea input: not trimmed
175175 $ this ->attributes [self ::ATTR_META_DESCRIPTION ] = $ metaDescription ;
176176 }
177177
178- public function setMetaKeywords (string $ metaKeywords = null )
178+ public function setMetaKeywords (? string $ metaKeywords = null )
179179 {
180180 // textarea input: not trimmed
181181 $ this ->attributes [self ::ATTR_META_KEYWORDS ] = $ metaKeywords ;
@@ -184,23 +184,23 @@ public function setMetaKeywords(string $metaKeywords = null)
184184 /**
185185 * @param string|null $price A 12.4 / 20.6 decimal field
186186 */
187- public function setPrice (string $ price = null )
187+ public function setPrice (? string $ price = null )
188188 {
189189 $ this ->attributes [self ::ATTR_PRICE ] = Decimal::formatPrice ($ price );
190190 }
191191
192192 /**
193193 * @param string|null $cost A 12.4 decimal field
194194 */
195- public function setCost (string $ cost = null )
195+ public function setCost (? string $ cost = null )
196196 {
197197 $ this ->attributes [self ::ATTR_COST ] = Decimal::format ($ cost );
198198 }
199199
200200 /**
201201 * @param string|null $msrp Manufacturer Suggested Retail Price. A 12.4 decimal field
202202 */
203- public function setMsrp (string $ msrp = null )
203+ public function setMsrp (? string $ msrp = null )
204204 {
205205 $ this ->attributes [self ::ATTR_MSRP ] = Decimal::format ($ msrp );
206206 }
@@ -210,7 +210,7 @@ public function setMsrp(string $msrp = null)
210210 *
211211 * @param int|null $type
212212 */
213- public function setMsrpDisplayActualPriceType (int $ type = null )
213+ public function setMsrpDisplayActualPriceType (? int $ type = null )
214214 {
215215 $ this ->attributes [self ::ATTR_MSRP_DISPLAY_ACTUAL_PRICE_TYPE ] = $ type ;
216216 }
@@ -220,22 +220,22 @@ public function setMsrpDisplayActualPriceType(int $type = null)
220220 *
221221 * @param int|null $visibility
222222 */
223- public function setVisibility (int $ visibility = null )
223+ public function setVisibility (? int $ visibility = null )
224224 {
225225 $ this ->attributes [self ::ATTR_VISIBILITY ] = $ visibility ;
226226 }
227227
228- public function setTaxClassId (int $ taxClassId = null )
228+ public function setTaxClassId (? int $ taxClassId = null )
229229 {
230230 $ this ->attributes [self ::ATTR_TAX_CLASS_ID ] = $ taxClassId ;
231231 }
232232
233- public function setTaxClassName (string $ taxClassName = null )
233+ public function setTaxClassName (? string $ taxClassName = null )
234234 {
235235 $ this ->unresolvedAttributes [self ::ATTR_TAX_CLASS_ID ] = ($ taxClassName === null ) ? null : trim ($ taxClassName );
236236 }
237237
238- public function setUrlKey (string $ urlKey = null )
238+ public function setUrlKey (? string $ urlKey = null )
239239 {
240240 $ this ->attributes [self ::ATTR_URL_KEY ] = ($ urlKey === null ) ? null : trim ($ urlKey );
241241 }
@@ -256,71 +256,71 @@ public function generateUrlKey()
256256 /**
257257 * @param string|null $weight A 12.4 decimal field
258258 */
259- public function setWeight (string $ weight = null )
259+ public function setWeight (? string $ weight = null )
260260 {
261261 $ this ->attributes [self ::ATTR_WEIGHT ] = Decimal::format ($ weight );
262262 }
263263
264264 /**
265265 * @param string|null $specialPrice A 12.4 decimal field
266266 */
267- public function setSpecialPrice (string $ specialPrice = null )
267+ public function setSpecialPrice (? string $ specialPrice = null )
268268 {
269269 $ this ->attributes [self ::ATTR_SPECIAL_PRICE ] = Decimal::formatPrice ($ specialPrice );
270270 }
271271
272272 /**
273273 * @param string|null $specialPriceFromDate A y-m-d MySql date
274274 */
275- public function setSpecialFromDate (string $ specialPriceFromDate = null )
275+ public function setSpecialFromDate (? string $ specialPriceFromDate = null )
276276 {
277277 $ this ->attributes [self ::ATTR_SPECIAL_FROM_DATE ] = ($ specialPriceFromDate === null ) ? null : trim ($ specialPriceFromDate );
278278 }
279279
280280 /**
281281 * @param string|null $specialPriceToDate A y-m-d MySql date
282282 */
283- public function setSpecialToDate (string $ specialPriceToDate = null )
283+ public function setSpecialToDate (? string $ specialPriceToDate = null )
284284 {
285285 $ this ->attributes [self ::ATTR_SPECIAL_TO_DATE ] = ($ specialPriceToDate === null ) ? null : trim ($ specialPriceToDate );
286286 }
287287
288288 /**
289289 * @param string|null $newsFromDate A y-m-d MySql date
290290 */
291- public function setNewsFromDate (string $ newsFromDate = null )
291+ public function setNewsFromDate (? string $ newsFromDate = null )
292292 {
293293 $ this ->attributes [self ::ATTR_NEWS_FROM_DATE ] = ($ newsFromDate === null ) ? null : trim ($ newsFromDate );
294294 }
295295
296296 /**
297297 * @param string|null $newsToDate A y-m-d MySql date
298298 */
299- public function setNewsToDate (string $ newsToDate = null )
299+ public function setNewsToDate (? string $ newsToDate = null )
300300 {
301301 $ this ->attributes [self ::ATTR_NEWS_TO_DATE ] = ($ newsToDate === null ) ? null : trim ($ newsToDate );
302302 }
303303
304304 /**
305305 * @param string|null $option The admin name of the manufacturer attribute option
306306 */
307- public function setManufacturer (string $ option = null )
307+ public function setManufacturer (? string $ option = null )
308308 {
309309 $ this ->unresolvedSelects [self ::ATTR_MANUFACTURER ] = ($ option === null ) ? null : trim ($ option );
310310 }
311311
312312 /**
313313 * @param string|null $countryCode 2 characters, uppercase
314314 */
315- public function setCountryOfManufacture (string $ countryCode = null )
315+ public function setCountryOfManufacture (? string $ countryCode = null )
316316 {
317317 $ this ->attributes [self ::ATTR_COUNTRY_OF_MANUFACTURE ] = ($ countryCode === null ) ? null : trim ($ countryCode );
318318 }
319319
320320 /**
321321 * @param string|null $option The admin name of the color attribute option
322322 */
323- public function setColor (string $ option = null )
323+ public function setColor (? string $ option = null )
324324 {
325325 $ this ->unresolvedSelects [self ::ATTR_COLOR ] = ($ option === null ) ? null : trim ($ option );
326326 }
@@ -332,7 +332,7 @@ public function setColor(string $option = null)
332332 * @param string $attributeCode
333333 * @param string|null $value
334334 */
335- public function setCustomAttribute (string $ attributeCode , string $ value = null )
335+ public function setCustomAttribute (string $ attributeCode , ? string $ value = null )
336336 {
337337 // value is not trimmed, because it may have textarea as input, or it may be null
338338 $ this ->attributes [trim ($ attributeCode )] = $ value ;
@@ -427,7 +427,7 @@ public function getImageRoles()
427427 * @param string $attributeCode
428428 * @param string $option The admin name of the attribute option
429429 */
430- public function setSelectAttribute (string $ attributeCode , string $ option = null )
430+ public function setSelectAttribute (string $ attributeCode , ? string $ option = null )
431431 {
432432 $ this ->unresolvedSelects [trim ($ attributeCode )] = ($ option === null ) ? null : trim ($ option );
433433 }
@@ -441,12 +441,12 @@ public function setSelectAttributeOptionId(string $attributeCode, $optionId = nu
441441 * @param string $attributeCode
442442 * @param array $options The admin names of the attribute options
443443 */
444- public function setMultipleSelectAttribute (string $ attributeCode , array $ options = null )
444+ public function setMultipleSelectAttribute (string $ attributeCode , ? array $ options = null )
445445 {
446446 $ this ->unresolvedMultipleSelects [trim ($ attributeCode )] = ($ options === null ) ? null : array_map ('trim ' , $ options );
447447 }
448448
449- public function setMultiSelectAttributeOptionIds (string $ attributeCode , array $ optionIds = null )
449+ public function setMultiSelectAttributeOptionIds (string $ attributeCode , ? array $ optionIds = null )
450450 {
451451 $ this ->attributes [$ attributeCode ] = ($ optionIds === null ) ? null : implode (', ' , array_map ('trim ' , $ optionIds ));
452452 }
0 commit comments