Skip to content

Commit 0eae173

Browse files
committed
1 parent 44fb962 commit 0eae173

File tree

8 files changed

+14
-68
lines changed

8 files changed

+14
-68
lines changed

.phpstan.dist.baseline.neon

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -4770,11 +4770,6 @@ parameters:
47704770
count: 1
47714771
path: app/code/core/Mage/Paypal/Model/Direct.php
47724772

4773-
-
4774-
message: "#^Call to an undefined method Mage_Payment_Model_Info\\:\\:lookupTransaction\\(\\)\\.$#"
4775-
count: 2
4776-
path: app/code/core/Mage/Paypal/Model/Express.php
4777-
47784773
-
47794774
message: "#^If condition is always false\\.$#"
47804775
count: 1
@@ -4790,11 +4785,6 @@ parameters:
47904785
count: 1
47914786
path: app/code/core/Mage/Paypal/Model/Express.php
47924787

4793-
-
4794-
message: "#^Parameter \\#1 \\$txnId of method Mage_Sales_Model_Order_Payment\\:\\:lookupTransaction\\(\\) expects string, false given\\.$#"
4795-
count: 2
4796-
path: app/code/core/Mage/Paypal/Model/Express.php
4797-
47984788
-
47994789
message: "#^Property Mage_Paypal_Model_Express\\:\\:\\$_pro \\(Mage_Paypal_Model_Pro\\) does not accept Mage_Core_Model_Abstract\\|false\\.$#"
48004790
count: 1
@@ -4855,16 +4845,6 @@ parameters:
48554845
count: 1
48564846
path: app/code/core/Mage/Paypal/Model/Observer.php
48574847

4858-
-
4859-
message: "#^PHPDoc tag @param for parameter \\$payment with type Mage_Payment_Model_Info is not subtype of native type Mage_Sales_Model_Order_Payment\\.$#"
4860-
count: 1
4861-
path: app/code/core/Mage/Paypal/Model/Payflowlink.php
4862-
4863-
-
4864-
message: "#^Parameter \\#1 \\$payment of method Mage_Paypal_Model_Payflowlink\\:\\:_buildTokenRequest\\(\\) expects Mage_Sales_Model_Order_Payment, Mage_Payment_Model_Info given\\.$#"
4865-
count: 1
4866-
path: app/code/core/Mage/Paypal/Model/Payflowlink.php
4867-
48684848
-
48694849
message: "#^Return type \\(bool\\) of method Mage_Paypal_Model_Payflowlink\\:\\:validate\\(\\) should be compatible with return type \\(\\$this\\(Mage_Payment_Model_Method_Cc\\)\\) of method Mage_Payment_Model_Method_Cc\\:\\:validate\\(\\)$#"
48704850
count: 1
@@ -5050,11 +5030,6 @@ parameters:
50505030
count: 1
50515031
path: app/code/core/Mage/Reports/Model/Resource/Event.php
50525032

5053-
-
5054-
message: "#^Return type \\(int\\) of method Mage_Reports_Model_Resource_Helper_Mysql4\\:\\:mergeVisitorProductIndex\\(\\) should be compatible with return type \\(string\\) of method Mage_Reports_Model_Resource_Helper_Interface\\:\\:mergeVisitorProductIndex\\(\\)$#"
5055-
count: 1
5056-
path: app/code/core/Mage/Reports/Model/Resource/Helper/Mysql4.php
5057-
50585033
-
50595034
message: "#^Method Mage_Reports_Model_Resource_Order_Collection\\:\\:_prepareSummaryAggregated\\(\\) invoked with 4 parameters, 3 required\\.$#"
50605035
count: 1
@@ -5385,26 +5360,6 @@ parameters:
53855360
count: 1
53865361
path: app/code/core/Mage/Sales/Model/Order/Payment.php
53875362

5388-
-
5389-
message: "#^Method Mage_Sales_Model_Order_Payment\\:\\:_addTransaction\\(\\) should return Mage_Sales_Model_Order_Payment_Transaction\\|null but return statement is missing\\.$#"
5390-
count: 1
5391-
path: app/code/core/Mage/Sales/Model/Order/Payment.php
5392-
5393-
-
5394-
message: "#^Parameter \\#1 \\$invoice of method Mage_Sales_Model_Order_Payment\\:\\:capture\\(\\) expects Mage_Sales_Model_Order_Invoice, null given\\.$#"
5395-
count: 1
5396-
path: app/code/core/Mage/Sales/Model/Order/Payment.php
5397-
5398-
-
5399-
message: "#^Parameter \\#1 \\$txnId of method Mage_Sales_Model_Order_Payment\\:\\:_lookupTransaction\\(\\) expects string, false given\\.$#"
5400-
count: 1
5401-
path: app/code/core/Mage/Sales/Model/Order/Payment.php
5402-
5403-
-
5404-
message: "#^Parameter \\#1 \\$txnId of method Mage_Sales_Model_Order_Payment\\:\\:_lookupTransaction\\(\\) expects string, null given\\.$#"
5405-
count: 1
5406-
path: app/code/core/Mage/Sales/Model/Order/Payment.php
5407-
54085363
-
54095364
message: "#^Property Mage_Sales_Model_Order_Payment\\:\\:\\$_canVoidLookup \\(string\\) does not accept bool\\.$#"
54105365
count: 2
@@ -5795,11 +5750,6 @@ parameters:
57955750
count: 1
57965751
path: app/code/core/Mage/SalesRule/Model/Observer.php
57975752

5798-
-
5799-
message: "#^Return type \\(array\\) of method Mage_SalesRule_Model_Quote_Nominal_Discount\\:\\:fetch\\(\\) should be compatible with return type \\(\\$this\\(Mage_SalesRule_Model_Quote_Discount\\)\\) of method Mage_SalesRule_Model_Quote_Discount\\:\\:fetch\\(\\)$#"
5800-
count: 1
5801-
path: app/code/core/Mage/SalesRule/Model/Quote/Nominal/Discount.php
5802-
58035753
-
58045754
message: "#^Negated boolean expression is always false\\.$#"
58055755
count: 1
@@ -6745,11 +6695,6 @@ parameters:
67456695
count: 1
67466696
path: app/design/adminhtml/default/default/template/catalog/product/price.phtml
67476697

6748-
-
6749-
message: "#^Parameter \\#4 \\$website of method Mage_Weee_Helper_Data\\:\\:getProductWeeeAttributesForRenderer\\(\\) expects int\\|null, Mage_Core_Model_Website given\\.$#"
6750-
count: 1
6751-
path: app/design/adminhtml/default/default/template/catalog/product/price.phtml
6752-
67536698
-
67546699
message: "#^Variable \\$_weeeTaxAttributes might not be defined\\.$#"
67556700
count: 9

app/code/core/Mage/Payment/Model/Method/Abstract.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,12 +370,13 @@ public function getInfoBlockType()
370370
/**
371371
* Retrieve payment information model object
372372
*
373-
* @return Mage_Payment_Model_Info
373+
* @return Mage_Sales_Model_Order_Payment|Mage_Sales_Model_Quote_Payment
374374
*/
375375
public function getInfoInstance()
376376
{
377+
/** @var Mage_Sales_Model_Order_Payment|Mage_Sales_Model_Quote_Payment $instance */
377378
$instance = $this->getData('info_instance');
378-
if (!($instance instanceof Mage_Payment_Model_Info)) {
379+
if (!$instance instanceof Mage_Payment_Model_Info) {
379380
Mage::throwException(Mage::helper('payment')->__('Cannot retrieve the payment information object instance.'));
380381
}
381382
return $instance;

app/code/core/Mage/Paypal/Model/Payflowlink.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ protected function _getOrderFromResponse()
365365
/**
366366
* Build request for getting token
367367
*
368-
* @param Mage_Sales_Model_Order_Payment|Mage_Payment_Model_Info $payment
368+
* @param Mage_Sales_Model_Order_Payment $payment
369369
* @return Varien_Object
370370
*/
371371
protected function _buildTokenRequest(Mage_Sales_Model_Order_Payment $payment)

app/code/core/Mage/Reports/Model/Resource/Helper/Interface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface Mage_Reports_Model_Resource_Helper_Interface
2727
* @param string $mainTable
2828
* @param array $data
2929
* @param mixed $matchFields
30-
* @return string
30+
* @return int
3131
*/
3232
public function mergeVisitorProductIndex($mainTable, $data, $matchFields);
3333

app/code/core/Mage/Sales/Model/Order/Payment.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ public function place()
433433
*
434434
* TODO: eliminate logic duplication with registerCaptureNotification()
435435
*
436-
* @param Mage_Sales_Model_Order_Invoice $invoice
436+
* @param Mage_Sales_Model_Order_Invoice|null $invoice
437437
* @return $this
438438
* @throws Mage_Core_Exception
439439
*/
@@ -1251,7 +1251,7 @@ protected function _void($isOnline, $amount = null, $gatewayCallback = 'void')
12511251
* @param string $type
12521252
* @param Mage_Sales_Model_Abstract $salesDocument
12531253
* @param bool $failsafe
1254-
* @return null|Mage_Sales_Model_Order_Payment_Transaction
1254+
* @return null|Mage_Sales_Model_Order_Payment_Transaction|void
12551255
*/
12561256
protected function _addTransaction($type, $salesDocument = null, $failsafe = false)
12571257
{
@@ -1413,7 +1413,7 @@ protected function _isTransactionExists($txnId = null)
14131413
/**
14141414
* Append transaction ID (if any) message to the specified message
14151415
*
1416-
* @param Mage_Sales_Model_Order_Payment_Transaction|null $transaction
1416+
* @param Mage_Sales_Model_Order_Payment_Transaction|string|null $transaction
14171417
* @param string $message
14181418
* @return string
14191419
*/
@@ -1479,7 +1479,7 @@ protected function _formatPrice($amount, $currency = null)
14791479

14801480
/**
14811481
* Find one transaction by ID or type
1482-
* @param string $txnId
1482+
* @param string|false|null $txnId
14831483
* @param string|false $txnType
14841484
* @return Mage_Sales_Model_Order_Payment_Transaction|false
14851485
*/
@@ -1518,7 +1518,7 @@ protected function _lookupTransaction($txnId, $txnType = false)
15181518

15191519
/**
15201520
* Find one transaction by ID or type
1521-
* @param string $txnId
1521+
* @param string|false $txnId
15221522
* @param string|false $txnType
15231523
* @return Mage_Sales_Model_Order_Payment_Transaction|false
15241524
*/

app/code/core/Mage/SalesRule/Model/Quote/Discount.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ protected function _aggregateItemDiscount($item)
134134
/**
135135
* Add discount total information to address
136136
*
137-
* @return $this
137+
* @return $this|array
138138
*/
139139
public function fetch(Mage_Sales_Model_Quote_Address $address)
140140
{

app/code/core/Mage/Weee/Helper/Data.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ public function typeOfDisplay($product, $compareTo = null, $zone = null, $store
220220
* @param Mage_Catalog_Model_Product $product
221221
* @param null|false|Varien_Object $shipping
222222
* @param null|false|Varien_Object $billing
223-
* @param int|Mage_Core_Model_Website $website
223+
* @param int|Mage_Core_Model_Website|null|string|true $website
224224
* @param bool $calculateTaxes
225225
* @return array
226226
*/
@@ -300,7 +300,7 @@ public function getProductWeeeAttributesForDisplay($product)
300300
* @param Mage_Catalog_Model_Product $product
301301
* @param null|false|Varien_Object $shipping Shipping Address
302302
* @param null|false|Varien_Object $billing Billing Address
303-
* @param null|int $website
303+
* @param int|Mage_Core_Model_Website|null|string|true $website
304304
* @param mixed $calculateTaxes
305305
* @return array
306306
*/

app/code/core/Mage/Weee/Model/Tax.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function getWeeeTaxAttributeCodes($forceEnabled = false)
148148
* @param Mage_Catalog_Model_Product $product
149149
* @param Mage_Sales_Model_Quote_Address $shipping
150150
* @param Mage_Sales_Model_Quote_Address $billing
151-
* @param int|Mage_Core_Model_Website $website
151+
* @param int|Mage_Core_Model_Website|null|string|true $website
152152
* @param bool $calculateTax
153153
* @param bool $ignoreDiscount
154154
* @return array

0 commit comments

Comments
 (0)