Skip to content

Commit bff0d38

Browse files
author
Vaha
committed
#24746 added code improvements
1 parent 3846ddd commit bff0d38

File tree

1 file changed

+45
-45
lines changed

1 file changed

+45
-45
lines changed

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

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,7 @@ public function getItemById($itemId)
15141514
* Get item by quote item id
15151515
*
15161516
* @param mixed $quoteItemId
1517-
* @return \Magento\Framework\DataObject|null
1517+
* @return \Magento\Framework\DataObject|null
15181518
*/
15191519
public function getItemByQuoteItemId($quoteItemId)
15201520
{
@@ -1976,7 +1976,7 @@ public function getRelatedObjects()
19761976
*
19771977
* @return string
19781978
*/
1979-
public function getCustomerName(): string
1979+
public function getCustomerName()
19801980
{
19811981
if (null === $this->getCustomerFirstname()) {
19821982
return (string)__('Guest');
@@ -1998,49 +1998,6 @@ public function getCustomerName(): string
19981998
return $customerName;
19991999
}
20002000

2001-
/**
2002-
* Is visible customer middlename
2003-
*
2004-
* @return bool
2005-
*/
2006-
private function isVisibleCustomerMiddlename(): bool
2007-
{
2008-
return $this->scopeConfig->isSetFlag(
2009-
'customer/address/middlename_show',
2010-
ScopeInterface::SCOPE_STORE
2011-
);
2012-
}
2013-
2014-
/**
2015-
* Is visible customer prefix
2016-
*
2017-
* @return bool
2018-
*/
2019-
private function isVisibleCustomerPrefix(): bool
2020-
{
2021-
$prefixShowValue = $this->scopeConfig->getValue(
2022-
'customer/address/prefix_show',
2023-
ScopeInterface::SCOPE_STORE
2024-
);
2025-
2026-
return $prefixShowValue !== Nooptreq::VALUE_NO;
2027-
}
2028-
2029-
/**
2030-
* Is visible customer suffix
2031-
*
2032-
* @return bool
2033-
*/
2034-
private function isVisibleCustomerSuffix(): bool
2035-
{
2036-
$prefixShowValue = $this->scopeConfig->getValue(
2037-
'customer/address/suffix_show',
2038-
ScopeInterface::SCOPE_STORE
2039-
);
2040-
2041-
return $prefixShowValue !== Nooptreq::VALUE_NO;
2042-
}
2043-
20442001
/**
20452002
* Add New object to related array
20462003
*
@@ -4600,5 +4557,48 @@ public function setShippingMethod($shippingMethod)
46004557
return $this->setData('shipping_method', $shippingMethod);
46014558
}
46024559

4560+
/**
4561+
* Is visible customer middlename
4562+
*
4563+
* @return bool
4564+
*/
4565+
private function isVisibleCustomerMiddlename(): bool
4566+
{
4567+
return $this->scopeConfig->isSetFlag(
4568+
'customer/address/middlename_show',
4569+
ScopeInterface::SCOPE_STORE
4570+
);
4571+
}
4572+
4573+
/**
4574+
* Is visible customer prefix
4575+
*
4576+
* @return bool
4577+
*/
4578+
private function isVisibleCustomerPrefix(): bool
4579+
{
4580+
$prefixShowValue = $this->scopeConfig->getValue(
4581+
'customer/address/prefix_show',
4582+
ScopeInterface::SCOPE_STORE
4583+
);
4584+
4585+
return $prefixShowValue !== Nooptreq::VALUE_NO;
4586+
}
4587+
4588+
/**
4589+
* Is visible customer suffix
4590+
*
4591+
* @return bool
4592+
*/
4593+
private function isVisibleCustomerSuffix(): bool
4594+
{
4595+
$prefixShowValue = $this->scopeConfig->getValue(
4596+
'customer/address/suffix_show',
4597+
ScopeInterface::SCOPE_STORE
4598+
);
4599+
4600+
return $prefixShowValue !== Nooptreq::VALUE_NO;
4601+
}
4602+
46034603
//@codeCoverageIgnoreEnd
46044604
}

0 commit comments

Comments
 (0)