Skip to content

Commit 6712134

Browse files
kiatngsreichel
andauthored
Fixed phpstan on Mage_Customer_Model_Customer (#4190)
* Fixed phpstan on Mage_Customer_Model_Customer * Update app/code/core/Mage/Customer/Model/Customer.php Co-authored-by: Sven Reichel <[email protected]> --------- Co-authored-by: Sven Reichel <[email protected]>
1 parent 7b88327 commit 6712134

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

.phpstan.dist.baseline.neon

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2710,11 +2710,6 @@ parameters:
27102710
count: 2
27112711
path: app/code/core/Mage/Customer/Model/Convert/Parser/Customer.php
27122712

2713-
-
2714-
message: "#^Method Mage_Directory_Model_Region\\:\\:loadByName\\(\\) invoked with 1 parameter, 2 required\\.$#"
2715-
count: 1
2716-
path: app/code/core/Mage/Customer/Model/Customer.php
2717-
27182713
-
27192714
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\\(\\)$#"
27202715
count: 1

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1416,7 +1416,7 @@ public function validateAddress(array $data, $type = 'billing')
14161416
return false;
14171417
}
14181418

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

0 commit comments

Comments
 (0)