The expression $this->offers of type Zenwalker\CommerceML\Model\Offer[] is implicitly converted to a boolean; are you sure this is intended? If so, consider using empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an
empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using empty(..) or !empty(...) instead.
Loading history...
40
1
foreach ($this->xml->Предложения->Предложение as $offer) {
41
1
$this->offers[] = new Offer($this->owner, $offer);
The expression $this->priceTypes of type Zenwalker\CommerceML\Model\Simple[] is implicitly converted to a boolean; are you sure this is intended? If so, consider using empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an
empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using empty(..) or !empty(...) instead.
Loading history...
53
foreach ($this->xpath('//c:ТипыЦен/c:ТипЦены') as $type) {
54
$this->priceTypes[] = new Simple($this->owner, $type);
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.