-
-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Phpstan: fixed return types (docs only) (#2636)
* Fixed "should return string but returns false" * Fixed "should return XYZ but returns false" * Fixed "should return array but returns null" * Fixed "should return string but returns null" * Fixed "should return int but returns null" * Fixed "should return bool but returns" * Fixed docs (see comments) * Fixed "should return array" * Update app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php Co-authored-by: Ng Kiat Siong <[email protected]> * Update app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api.php Co-authored-by: Ng Kiat Siong <[email protected]> * Update app/code/core/Mage/Tag/Model/Resource/Tag.php Co-authored-by: Ng Kiat Siong <[email protected]> * Update app/code/core/Mage/Customer/Block/Form/Register.php Co-authored-by: Ng Kiat Siong <[email protected]> * Added module names to helper(#2617) * Get catalog search result collection from engine (#2634) * Add PHP dependencies security check workflow (#2639) * [security-workflow] Fixed cron syntax (#2640) * Added OpenMage Contributors Copyright (#2295) * Added ddev snippets to docs (#2575) * Improve dev/openmage/install.sh script for newer versions of Docker - no longer requires separate compose. * Only run workflows when relevant files change (#2641) * Add back notification popup severity icons URL (#2633) * Reduce reprocessed jpeg file size by defaulting quality to 85% (#2629) * Fixed issue #475. * Removed <frontend_type>text</frontend_type> as it is the default. * Fixed bug on users not able to modify image quality in backend if deprecated config exists. * Fixed bug on incorrect check if image quality was not set in backend. * Improved note in system.xml. * Prevented editing of a non-editable order (#2632) * Fix dev/openmage/install.sh script setting permissions on var directory. * Allowed automatic full invoice from API (#2393) * Add check if array key isset before using it (#2649) * Fixed phpstan-baseline.neon * Fixed phpstan-baseline.neon (updated dev tools) * Revert "Fixed phpstan-baseline.neon" This reverts commit 3c82e76. * Fixed getRegion() Co-authored-by: Ng Kiat Siong <[email protected]> Co-authored-by: Mohamed ELIDRISSI <[email protected]> Co-authored-by: Justin Beaty <[email protected]> Co-authored-by: Colin Mollenhour <[email protected]> Co-authored-by: luigifab <[email protected]> Co-authored-by: Przemysław Piotrowski <[email protected]>
- Loading branch information
1 parent
cc6317a
commit 15f83af
Showing
85 changed files
with
469 additions
and
675 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,14 +26,18 @@ | |
* @package Mage_Adminhtml | ||
* @author Magento Core Team <[email protected]> | ||
*/ | ||
class Mage_Adminhtml_Block_Customer_Edit_Tab_View | ||
extends Mage_Adminhtml_Block_Template | ||
implements Mage_Adminhtml_Block_Widget_Tab_Interface | ||
class Mage_Adminhtml_Block_Customer_Edit_Tab_View extends Mage_Adminhtml_Block_Template implements Mage_Adminhtml_Block_Widget_Tab_Interface | ||
{ | ||
/** | ||
* @var Mage_Customer_Model_Customer | ||
*/ | ||
protected $_customer; | ||
|
||
protected $_customerLog; | ||
|
||
/** | ||
* @return Mage_Customer_Model_Customer | ||
*/ | ||
public function getCustomer() | ||
{ | ||
if (!$this->_customer) { | ||
|
@@ -42,6 +46,9 @@ public function getCustomer() | |
return $this->_customer; | ||
} | ||
|
||
/** | ||
* @return string|void | ||
*/ | ||
public function getGroupName() | ||
{ | ||
if ($groupId = $this->getCustomer()->getGroupId()) { | ||
|
@@ -68,20 +75,26 @@ public function getCustomerLog() | |
/** | ||
* Get customer creation date | ||
* | ||
* @return string | ||
* @return string|null | ||
*/ | ||
public function getCreateDate() | ||
{ | ||
if ( ! $this->getCustomer()->getCreatedAt()) { | ||
if (! $this->getCustomer()->getCreatedAt()) { | ||
return null; | ||
} | ||
return $this->_getCoreHelper()->formatDate($this->getCustomer()->getCreatedAt(), | ||
Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true); | ||
return $this->_getCoreHelper()->formatDate( | ||
$this->getCustomer()->getCreatedAt(), | ||
Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, | ||
true | ||
); | ||
} | ||
|
||
/** | ||
* @return string|null | ||
*/ | ||
public function getStoreCreateDate() | ||
{ | ||
if ( ! $this->getCustomer()->getCreatedAt()) { | ||
if (! $this->getCustomer()->getCreatedAt()) { | ||
return null; | ||
} | ||
$date = Mage::app()->getLocale()->storeDate( | ||
|
@@ -112,6 +125,9 @@ public function getLastLoginDate() | |
return Mage::helper('customer')->__('Never'); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getStoreLastLoginDate() | ||
{ | ||
if ($date = $this->getCustomerLog()->getLoginAtTimestamp()) { | ||
|
@@ -131,6 +147,9 @@ public function getStoreLastLoginDateTimezone() | |
->getConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_TIMEZONE); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getCurrentStatus() | ||
{ | ||
$log = $this->getCustomerLog(); | ||
|
@@ -142,6 +161,9 @@ public function getCurrentStatus() | |
return Mage::helper('customer')->__('Online'); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getIsConfirmedStatus() | ||
{ | ||
$this->getCustomer(); | ||
|
@@ -164,38 +186,55 @@ public function getStoreId() | |
return $this->getCustomer()->getStoreId(); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getBillingAddressHtml() | ||
{ | ||
$html = ''; | ||
if ($address = $this->getCustomer()->getPrimaryBillingAddress()) { | ||
$html = $address->format('html'); | ||
} | ||
else { | ||
} else { | ||
$html = Mage::helper('customer')->__('The customer does not have default billing address.'); | ||
} | ||
return $html; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getAccordionHtml() | ||
{ | ||
return $this->getChildHtml('accordion'); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getSalesHtml() | ||
{ | ||
return $this->getChildHtml('sales'); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getTabLabel() | ||
{ | ||
return Mage::helper('customer')->__('Customer View'); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getTabTitle() | ||
{ | ||
return Mage::helper('customer')->__('Customer View'); | ||
} | ||
|
||
/** | ||
* @return bool | ||
*/ | ||
public function canShowTab() | ||
{ | ||
if (Mage::registry('current_customer')->getId()) { | ||
|
@@ -204,6 +243,9 @@ public function canShowTab() | |
return false; | ||
} | ||
|
||
/** | ||
* @return bool | ||
*/ | ||
public function isHidden() | ||
{ | ||
if (Mage::registry('current_customer')->getId()) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.