Look at the \Magento\Quote\Model\Quote::getPayment() method:
This if
condition is always true
:
It is because the \Magento\Framework\Data\Collection::getFirstItem()
method always returns an object, even if a collection is empty.
Look at the \Magento\Quote\Model\Quote::getPayment() method:
This if
condition is always true
:
It is because the \Magento\Framework\Data\Collection::getFirstItem()
method always returns an object, even if a collection is empty.