@@ -112,7 +112,7 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C
112112 /**
113113 * Checkout login method key
114114 */
115- const CHECKOUT_METHOD_LOGIN_IN = 'login_in ' ;
115+ public const CHECKOUT_METHOD_LOGIN_IN = 'login_in ' ;
116116
117117 /**
118118 * @var string
@@ -172,14 +172,14 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C
172172 protected $ _preventSaving = false ;
173173
174174 /**
175- * Catalog product
175+ * Product of the catalog
176176 *
177177 * @var \Magento\Catalog\Helper\Product
178178 */
179179 protected $ _catalogProduct ;
180180
181181 /**
182- * Quote validator
182+ * To perform validation on the quote
183183 *
184184 * @var \Magento\Quote\Model\QuoteValidator
185185 */
@@ -213,7 +213,7 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C
213213 protected $ _customerFactory ;
214214
215215 /**
216- * Group repository
216+ * Repository for group to perform CRUD operations
217217 *
218218 * @var \Magento\Customer\Api\GroupRepositoryInterface
219219 */
@@ -260,21 +260,21 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C
260260 protected $ _objectCopyService ;
261261
262262 /**
263- * Address repository
263+ * Repository for customer address to perform crud operations
264264 *
265265 * @var \Magento\Customer\Api\AddressRepositoryInterface
266266 */
267267 protected $ addressRepository ;
268268
269269 /**
270- * Search criteria builder
270+ * It is used for building search criteria
271271 *
272272 * @var \Magento\Framework\Api\SearchCriteriaBuilder
273273 */
274274 protected $ searchCriteriaBuilder ;
275275
276276 /**
277- * Filter builder
277+ * This is used for holding builder object for filter service
278278 *
279279 * @var \Magento\Framework\Api\FilterBuilder
280280 */
@@ -1356,7 +1356,7 @@ public function setBillingAddress(\Magento\Quote\Api\Data\AddressInterface $addr
13561356 {
13571357 $ old = $ this ->getAddressesCollection ()->getItemById ($ address ->getId ())
13581358 ?? $ this ->getBillingAddress ();
1359- if (! empty ( $ old) ) {
1359+ if ($ old !== null ) {
13601360 $ old ->addData ($ address ->getData ());
13611361 } else {
13621362 $ this ->addAddress ($ address ->setAddressType (Address::TYPE_BILLING ));
@@ -1378,7 +1378,7 @@ public function setShippingAddress(\Magento\Quote\Api\Data\AddressInterface $add
13781378 } else {
13791379 $ old = $ this ->getAddressesCollection ()->getItemById ($ address ->getId ())
13801380 ?? $ this ->getShippingAddress ();
1381- if (! empty ( $ old) ) {
1381+ if ($ old !== null ) {
13821382 $ old ->addData ($ address ->getData ());
13831383 } else {
13841384 $ this ->addAddress ($ address ->setAddressType (Address::TYPE_SHIPPING ));
@@ -1557,10 +1557,6 @@ public function removeItem($itemId)
15571557
15581558 if ($ item ) {
15591559 $ item ->setQuote ($ this );
1560- /**
1561- * If we remove item from quote - we can't use multishipping mode
1562- */
1563- $ this ->setIsMultiShipping (false );
15641560 $ item ->isDeleted (true );
15651561 if ($ item ->getHasChildren ()) {
15661562 foreach ($ item ->getChildren () as $ child ) {
0 commit comments