Skip to content

Commit 427a4ad

Browse files
committed
Update dockblocks to return null
1 parent 92816ab commit 427a4ad

File tree

2 files changed

+1
-30
lines changed

2 files changed

+1
-30
lines changed

app/code/Magento/Sales/Api/Data/OrderInterface.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
*/
66
namespace Magento\Sales\Api\Data;
77

8-
use Magento\Customer\Model\Customer;
9-
108
/**
119
* Order interface.
1210
*
@@ -912,12 +910,6 @@ public function getCreatedAt();
912910
*/
913911
public function setCreatedAt($createdAt);
914912

915-
/**
916-
* Gets the customer from Order
917-
* @return Customer
918-
*/
919-
public function getCustomer();
920-
921913
/**
922914
* Gets the customer date-of-birth (DOB) for the order.
923915
*

app/code/Magento/Sales/Model/Order.php

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
namespace Magento\Sales\Model;
77

88
use Magento\Config\Model\Config\Source\Nooptreq;
9-
use Magento\Customer\Api\CustomerRepositoryInterface;
109
use Magento\Directory\Model\Currency;
1110
use Magento\Framework\Api\AttributeValueFactory;
1211
use Magento\Framework\Api\SearchCriteriaBuilder;
@@ -52,6 +51,7 @@
5251
* @method bool hasCustomerNoteNotify()
5352
* @method bool hasForcedCanCreditmemo()
5453
* @method bool getIsInProcess()
54+
* @method \Magento\Customer\Model\Customer|null getCustomer()
5555
* @method \Magento\Sales\Model\Order setSendEmail(bool $value)
5656
* @SuppressWarnings(PHPMD.ExcessivePublicCount)
5757
* @SuppressWarnings(PHPMD.TooManyFields)
@@ -307,11 +307,6 @@ class Order extends AbstractModel implements EntityInterface, OrderInterface
307307
*/
308308
private $scopeConfig;
309309

310-
/**
311-
* @var CustomerRepositoryInterface
312-
*/
313-
private $_customerRepositoryInterface;
314-
315310
/**
316311
* @param \Magento\Framework\Model\Context $context
317312
* @param \Magento\Framework\Registry $registry
@@ -345,7 +340,6 @@ class Order extends AbstractModel implements EntityInterface, OrderInterface
345340
* @param OrderItemRepositoryInterface $itemRepository
346341
* @param SearchCriteriaBuilder $searchCriteriaBuilder
347342
* @param ScopeConfigInterface $scopeConfig
348-
* @param CustomerRepositoryInterface $customerRepositoryInterface
349343
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
350344
*/
351345
public function __construct(
@@ -372,7 +366,6 @@ public function __construct(
372366
\Magento\Sales\Model\ResourceModel\Order\Shipment\Track\CollectionFactory $trackCollectionFactory,
373367
\Magento\Sales\Model\ResourceModel\Order\CollectionFactory $salesOrderCollectionFactory,
374368
PriceCurrencyInterface $priceCurrency,
375-
CustomerRepositoryInterface $customerRepositoryInterface,
376369
\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productListFactory,
377370
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
378371
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
@@ -410,7 +403,6 @@ public function __construct(
410403
$this->searchCriteriaBuilder = $searchCriteriaBuilder ?: ObjectManager::getInstance()
411404
->get(SearchCriteriaBuilder::class);
412405
$this->scopeConfig = $scopeConfig ?: ObjectManager::getInstance()->get(ScopeConfigInterface::class);
413-
$this->_customerRepositoryInterface = $customerRepositoryInterface;
414406

415407
parent::__construct(
416408
$context,
@@ -570,19 +562,6 @@ public function getStore()
570562
return $this->_storeManager->getStore();
571563
}
572564

573-
/**
574-
* Returns Customer
575-
*
576-
* @return \Magento\Customer\Api\Data\CustomerInterface
577-
* @throws LocalizedException
578-
* @throws \Magento\Framework\Exception\NoSuchEntityException
579-
*/
580-
public function getCustomer()
581-
{
582-
$customerId = $this->getData(OrderInterface::CUSTOMER_ID);
583-
return $this->_customerRepositoryInterface->getById($customerId);
584-
}
585-
586565
/**
587566
* Retrieve order cancel availability
588567
*

0 commit comments

Comments
 (0)