@@ -238,10 +238,10 @@ private function validate(TaxRateInterface $taxRate)
238
238
$ exception = new InputException ();
239
239
240
240
$ countryCode = $ taxRate ->getTaxCountryId ();
241
- // phpstan: ignore "File has calls static method. (phpStaticMethodCalls)"
241
+ /** @ phpstan- ignore-next-line */
242
242
if (!\Zend_Validate::is ($ countryCode , 'NotEmpty ' )) {
243
243
$ exception ->addError (__ ('"%fieldName" is required. Enter and try again. ' , ['fieldName ' => 'country_id ' ]));
244
- // phpstan: ignore "File has calls static method. (phpStaticMethodCalls)"
244
+ /** @ phpstan- ignore-next-line */
245
245
} elseif (!\Zend_Validate::is (
246
246
$ this ->countryFactory ->create ()->loadByCode ($ countryCode )->getId (),
247
247
'NotEmpty '
@@ -257,13 +257,11 @@ private function validate(TaxRateInterface $taxRate)
257
257
258
258
$ regionCode = $ taxRate ->getTaxRegionId ();
259
259
// if regionCode eq 0 (all regions *), do not validate with existing region list
260
- // phpstan:ignore "File has calls static method. (phpStaticMethodCalls)"
261
- if (\Zend_Validate::is ($ regionCode , 'NotEmpty ' ) &&
262
- // phpstan:ignore "File has calls static method. (phpStaticMethodCalls)"
263
- $ regionCode != "0 " && !\Zend_Validate::is (
264
- $ this ->regionFactory ->create ()->load ($ regionCode )->getId (),
265
- 'NotEmpty '
266
- )
260
+ /** @phpstan-ignore-next-line */
261
+ if (\Zend_Validate::is ($ regionCode , 'NotEmpty ' )
262
+ && $ regionCode != "0 "
263
+ /** @phpstan-ignore-next-line */
264
+ && !\Zend_Validate::is ($ this ->regionFactory ->create ()->load ($ regionCode )->getId (),'NotEmpty ' )
267
265
) {
268
266
$ exception ->addError (__ (
269
267
'Invalid value of "%value" provided for the %fieldName field. ' ,
@@ -281,7 +279,7 @@ private function validate(TaxRateInterface $taxRate)
281
279
}
282
280
283
281
if ($ taxRate ->getCode () === null
284
- // phpstan: ignore "File has calls static method. (phpStaticMethodCalls)"
282
+ /** @ phpstan- ignore-next-line */
285
283
|| !\Zend_Validate::is (trim ($ taxRate ->getCode ()), 'NotEmpty ' )
286
284
) {
287
285
$ exception ->addError (__ ('"%fieldName" is required. Enter and try again. ' , ['fieldName ' => 'code ' ]));
@@ -307,7 +305,7 @@ private function validate(TaxRateInterface $taxRate)
307
305
}
308
306
} else {
309
307
if ($ taxRate ->getTaxPostcode () === null
310
- // phpstan: ignore "File has calls static method. (phpStaticMethodCalls)"
308
+ /** @ phpstan- ignore-next-line */
311
309
|| !\Zend_Validate::is (trim ($ taxRate ->getTaxPostcode ()), 'NotEmpty ' )
312
310
) {
313
311
$ exception ->addError (
0 commit comments