Skip to content

Commit

Permalink
Fixed phpstan on Mage_Customer_Model_Customer (#4190)
Browse files Browse the repository at this point in the history
* Fixed phpstan on Mage_Customer_Model_Customer

* Update app/code/core/Mage/Customer/Model/Customer.php

Co-authored-by: Sven Reichel <github-sr@hotmail.com>

---------

Co-authored-by: Sven Reichel <github-sr@hotmail.com>
  • Loading branch information
kiatng and sreichel committed Sep 17, 2024
1 parent 7b88327 commit 6712134
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions .phpstan.dist.baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2710,11 +2710,6 @@ parameters:
count: 2
path: app/code/core/Mage/Customer/Model/Convert/Parser/Customer.php

-
message: "#^Method Mage_Directory_Model_Region\\:\\:loadByName\\(\\) invoked with 1 parameter, 2 required\\.$#"
count: 1
path: app/code/core/Mage/Customer/Model/Customer.php

-
message: "#^Parameter \\#1 \\$data \\(stdClass\\) of method Mage_Customer_Model_Customer_Api_V2\\:\\:_prepareData\\(\\) should be compatible with parameter \\$data \\(array\\) of method Mage_Customer_Model_Customer_Api\\:\\:_prepareData\\(\\)$#"
count: 1
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Customer/Model/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,7 @@ public function validateAddress(array $data, $type = 'billing')
return false;
}

$region = Mage::getModel('directory/region')->loadByName($data[$prefix . 'region']);
$region = Mage::getModel('directory/region')->loadByName($data[$prefix . 'region'], $data[$prefix . $field]);
if (!$region->getId()) {
return false;
}
Expand Down

0 comments on commit 6712134

Please sign in to comment.