Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhpStan: some fixes #4705

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

PhpStan: some fixes #4705

wants to merge 1 commit into from

Conversation

sreichel
Copy link
Contributor

Some progress here ... :)

@sreichel sreichel changed the title - PhpStan: some fixes PhpStan: some fixes Mar 15, 2025
@github-actions github-actions bot added Component: PayPal Relates to Mage_Paypal Component: Core Relates to Mage_Core Component: Catalog Relates to Mage_Catalog Component: CatalogInventory Relates to Mage_CatalogInventory Component: Checkout Relates to Mage_Checkout Component: lib/Varien Relates to lib/Varien Component: Eav Relates to Mage_Eav Component: Adminhtml Relates to Mage_Adminhtml Component: Weee Relates to Mage_Weee Component: Tax Relates to Mage_Tax Component: Index Relates to Mage_Index Component: Api2 Relates to Mage_Api2 Component: Install Relates to Mage_Install Component: lib/* Relates to lib/* phpstan phpunit labels Mar 15, 2025
@sreichel sreichel added the chore label Mar 15, 2025
Comment on lines -38 to 40
* @var array
* @var Mage_Sales_Model_Quote_Address|array
*/
protected $_address = [];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/**
* Get Address Model
*
* @return Mage_Sales_Model_Quote_Address
*/
public function getAddress()
{
if (empty($this->_address)) {
$this->_address = $this->getQuote()->getShippingAddress();
}
return $this->_address;
}

$_address cannot be an array:

Suggested change
* @var array
* @var Mage_Sales_Model_Quote_Address|array
*/
protected $_address = [];
* @var Mage_Sales_Model_Quote_Address
*/
protected $_address;

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Component: Adminhtml Relates to Mage_Adminhtml Component: Api2 Relates to Mage_Api2 Component: Catalog Relates to Mage_Catalog Component: CatalogInventory Relates to Mage_CatalogInventory Component: Checkout Relates to Mage_Checkout Component: Core Relates to Mage_Core Component: Eav Relates to Mage_Eav Component: Index Relates to Mage_Index Component: Install Relates to Mage_Install Component: lib/Varien Relates to lib/Varien Component: lib/* Relates to lib/* Component: PayPal Relates to Mage_Paypal Component: Tax Relates to Mage_Tax Component: Weee Relates to Mage_Weee phpstan phpunit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants