Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 0 additions & 144 deletions .phpstan.dist.baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,6 @@ parameters:
count: 1
path: app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics/Grid.php

-
rawMessage: 'Parameter #2 $filter of method Mage_Reports_Model_Resource_Quote_Collection::prepareForAbandonedReport() expects string|null, array<int|string, array<mixed>|string> given.'
identifier: argument.type
count: 1
path: app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php

-
rawMessage: 'Parameter #1 $statusCode of method Mage_Tag_Model_Resource_Popular_Collection::addStatusFilter() expects string, int given.'
identifier: argument.type
Expand Down Expand Up @@ -246,24 +240,6 @@ parameters:
count: 3
path: app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Adjustments.php

-
rawMessage: 'Return type (Mage_Sales_Model_Order_Creditmemo) of method Mage_Adminhtml_Block_Sales_Order_Creditmemo_Create_Items::getSource() should be compatible with return type (Mage_Sales_Model_Order_Invoice) of method Mage_Adminhtml_Block_Sales_Items_Abstract::getSource()'
identifier: method.childReturnType
count: 1
path: app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Items.php

-
rawMessage: 'Return type (Mage_Sales_Model_Order_Creditmemo) of method Mage_Adminhtml_Block_Sales_Order_Creditmemo_View_Items::getSource() should be compatible with return type (Mage_Sales_Model_Order_Invoice) of method Mage_Adminhtml_Block_Sales_Items_Abstract::getSource()'
identifier: method.childReturnType
count: 1
path: app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View/Items.php

-
rawMessage: 'Return type (Mage_Sales_Model_Order_Shipment) of method Mage_Adminhtml_Block_Sales_Order_Shipment_Create_Items::getSource() should be compatible with return type (Mage_Sales_Model_Order_Invoice) of method Mage_Adminhtml_Block_Sales_Items_Abstract::getSource()'
identifier: method.childReturnType
count: 1
path: app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Items.php

-
rawMessage: 'Call to an undefined method Mage_Shipping_Model_Carrier_Abstract::isGirthAllowed().'
identifier: method.notFound
Expand All @@ -276,12 +252,6 @@ parameters:
count: 1
path: app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php

-
rawMessage: 'Return type (Mage_Sales_Model_Order_Shipment) of method Mage_Adminhtml_Block_Sales_Order_Shipment_View_Items::getSource() should be compatible with return type (Mage_Sales_Model_Order_Invoice) of method Mage_Adminhtml_Block_Sales_Items_Abstract::getSource()'
identifier: method.childReturnType
count: 1
path: app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Items.php

-
rawMessage: 'Parameter #1 $entity of method Mage_Adminhtml_Block_Sales_Order_View_Giftmessage::setEntity() expects Mage_Sales_Model_Order, Mage_Eav_Model_Entity_Abstract given.'
identifier: argument.type
Expand All @@ -300,24 +270,6 @@ parameters:
count: 1
path: app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items/Renderer/Default.php

-
rawMessage: 'Call to an undefined method Mage_Core_Model_Resource_Db_Collection_Abstract::setOrderFilter().'
identifier: method.notFound
count: 1
path: app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Creditmemos.php

-
rawMessage: 'Call to an undefined method Mage_Core_Model_Resource_Db_Collection_Abstract::setOrderFilter().'
identifier: method.notFound
count: 1
path: app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Invoices.php

-
rawMessage: 'Call to an undefined method Mage_Core_Model_Resource_Db_Collection_Abstract::setOrderFilter().'
identifier: method.notFound
count: 1
path: app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Shipments.php

-
rawMessage: 'Parameter #1 $order of method Mage_Sales_Helper_Reorder::canReorder() expects Mage_Sales_Model_Order, Varien_Object given.'
identifier: argument.type
Expand Down Expand Up @@ -1236,12 +1188,6 @@ parameters:
count: 1
path: app/code/core/Mage/Catalog/Block/Product/View/Attributes.php

-
rawMessage: Invalid array key type array.
identifier: offsetAccess.invalidOffset
count: 1
path: app/code/core/Mage/Catalog/Block/Product/View/Type/Configurable.php

-
rawMessage: 'Parameter #1 $category (Mage_Catalog_Model_Category) of method Mage_Catalog_Block_Seo_Sitemap_Category::getItemUrl() should be compatible with parameter $item (Mage_Catalog_Block_Seo_Sitemap_Abstract) of method Mage_Catalog_Block_Seo_Sitemap_Abstract::getItemUrl()'
identifier: method.childParameterType
Expand Down Expand Up @@ -2028,12 +1974,6 @@ parameters:
count: 1
path: app/code/core/Mage/CatalogIndex/Model/Resource/Setup.php

-
rawMessage: 'Parameter #1 $value of method Mage_Core_Block_Html_Select::addOption() expects string, int given.'
identifier: argument.type
count: 1
path: app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Customergroup.php

-
rawMessage: 'Cannot call method setTypeId() on Mage_Core_Model_Resource_Db_Collection_Abstract|false.'
identifier: method.nonObject
Expand Down Expand Up @@ -3858,12 +3798,6 @@ parameters:
count: 1
path: app/code/core/Mage/Reports/Model/Resource/Customer/Collection.php

-
rawMessage: 'Parameter #2 $value of method Varien_Db_Adapter_Interface::getIfNullSql() expects string, int given.'
identifier: argument.type
count: 4
path: app/code/core/Mage/Reports/Model/Resource/Customer/Collection.php

-
rawMessage: 'Property Mage_Reports_Model_Resource_Entity_Summary_Collection_Abstract::$_entityCollection (Mage_Eav_Model_Entity_Collection_Abstract) in empty() is not falsy.'
identifier: empty.property
Expand All @@ -3882,66 +3816,12 @@ parameters:
count: 1
path: app/code/core/Mage/Reports/Model/Resource/Order/Collection.php

-
rawMessage: 'Parameter #2 $customStart of method Mage_Reports_Model_Resource_Order_Collection::getDateRange() expects string, int given.'
identifier: argument.type
count: 1
path: app/code/core/Mage/Reports/Model/Resource/Order/Collection.php

-
rawMessage: 'Parameter #2 $interval of method Varien_Db_Adapter_Interface::getDateAddSql() expects int, string given.'
identifier: argument.type
count: 1
path: app/code/core/Mage/Reports/Model/Resource/Order/Collection.php

-
rawMessage: 'Parameter #2 $value of method Varien_Db_Adapter_Interface::getIfNullSql() expects string, int given.'
identifier: argument.type
count: 20
path: app/code/core/Mage/Reports/Model/Resource/Order/Collection.php

-
rawMessage: 'Parameter #3 $customEnd of method Mage_Reports_Model_Resource_Order_Collection::getDateRange() expects string, int given.'
identifier: argument.type
count: 1
path: app/code/core/Mage/Reports/Model/Resource/Order/Collection.php

-
rawMessage: 'Parameter #1 $from of method Mage_Reports_Model_Resource_Product_Ordered_Collection::_joinFields() expects string, int given.'
identifier: argument.type
count: 1
path: app/code/core/Mage/Reports/Model/Resource/Product/Ordered/Collection.php

-
rawMessage: 'Parameter #2 $to of method Mage_Reports_Model_Resource_Product_Ordered_Collection::_joinFields() expects string, int given.'
identifier: argument.type
count: 1
path: app/code/core/Mage/Reports/Model/Resource/Product/Ordered/Collection.php

-
rawMessage: 'Parameter #1 $from of method Mage_Reports_Model_Resource_Product_Collection::addOrderedQty() expects string, int given.'
identifier: argument.type
count: 1
path: app/code/core/Mage/Reports/Model/Resource/Product/Sold/Collection.php

-
rawMessage: 'Parameter #2 $to of method Mage_Reports_Model_Resource_Product_Collection::addOrderedQty() expects string, int given.'
identifier: argument.type
count: 1
path: app/code/core/Mage/Reports/Model/Resource/Product/Sold/Collection.php

-
rawMessage: 'Parameter #1 $filter of method Mage_Reports_Model_Resource_Quote_Collection::addCustomerData() expects array|null, string|null given.'
identifier: argument.type
count: 1
path: app/code/core/Mage/Reports/Model/Resource/Quote/Collection.php

-
rawMessage: 'Parameter #2 $filter of method Mage_Reports_Model_Resource_Quote_Collection::addSubtotal() expects array|null, string|null given.'
identifier: argument.type
count: 1
path: app/code/core/Mage/Reports/Model/Resource/Quote/Collection.php

-
rawMessage: 'Parameter #3 $cols of method Zend_Db_Select::joinInner() expects array|string, null given.'
identifier: argument.type
Expand Down Expand Up @@ -4110,12 +3990,6 @@ parameters:
count: 1
path: app/code/core/Mage/Sales/Model/Order/Creditmemo.php

-
rawMessage: 'Parameter #1 $incrementId of method Mage_Sales_Model_Order_Invoice::loadByIncrementId() expects string, int given.'
identifier: argument.type
count: 1
path: app/code/core/Mage/Sales/Model/Order/Invoice/Api.php

-
rawMessage: 'Call to an undefined method Mage_Catalog_Model_Product_Type_Abstract::getForceApplyDiscountToParentItem().'
identifier: method.notFound
Expand Down Expand Up @@ -4260,12 +4134,6 @@ parameters:
count: 1
path: app/code/core/Mage/Sales/Model/Quote.php

-
rawMessage: 'Property Mage_Sales_Model_Quote::$_addresses (Mage_Sales_Model_Resource_Order_Address_Collection|null) does not accept Mage_Sales_Model_Resource_Quote_Address_Collection.'
identifier: assign.propertyType
count: 1
path: app/code/core/Mage/Sales/Model/Quote.php

-
rawMessage: 'Method Mage_Sales_Model_Quote_Address::getItemsCollection() should return Mage_Eav_Model_Entity_Collection_Abstract but returns Mage_Sales_Model_Resource_Quote_Address_Item_Collection.'
identifier: return.type
Expand Down Expand Up @@ -5844,24 +5712,12 @@ parameters:
count: 1
path: lib/Varien/Data/Form/Element/Fieldset.php

-
rawMessage: 'Parameter #1 $idSuffix of method Varien_Data_Form_Element_Abstract::getLabelHtml() expects string, int given.'
identifier: argument.type
count: 1
path: lib/Varien/Data/Form/Element/Multiline.php

-
rawMessage: 'Parameter #1 $index of method Varien_Data_Form_Element_Abstract::getEscapedValue() expects string|null, int<0, max> given.'
identifier: argument.type
count: 2
path: lib/Varien/Data/Form/Element/Multiline.php

-
rawMessage: 'Parameter #1 $suffix (int) of method Varien_Data_Form_Element_Multiline::getLabelHtml() should be compatible with parameter $idSuffix (string) of method Varien_Data_Form_Element_Abstract::getLabelHtml()'
identifier: method.childParameterType
count: 1
path: lib/Varien/Data/Form/Element/Multiline.php

-
rawMessage: 'Method Varien_Data_Tree::load() invoked with 2 parameters, 0-1 required.'
identifier: arguments.count
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ public function formatPrice($price)
/**
* Retrieve source
*
* @return Mage_Sales_Model_Order_Invoice
* @return Mage_Sales_Model_Abstract
*/
public function getSource()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ protected function _getCollectionClass()

protected function _prepareCollection()
{
$collection = Mage::getResourceModel($this->_getCollectionClass())
/** @var Mage_Sales_Model_Resource_Order_Creditmemo_Grid_Collection $collection */
$collection = Mage::getResourceModel($this->_getCollectionClass());
$collection
->addFieldToSelect('entity_id')
->addFieldToSelect('created_at')
->addFieldToSelect('increment_id')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ protected function _getCollectionClass()

protected function _prepareCollection()
{
$collection = Mage::getResourceModel($this->_getCollectionClass())
/** @var Mage_Sales_Model_Resource_Order_Invoice_Grid_Collection $collection */
$collection = Mage::getResourceModel($this->_getCollectionClass());
$collection
->addFieldToSelect('entity_id')
->addFieldToSelect('created_at')
->addFieldToSelect('order_id')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ protected function _getCollectionClass()

protected function _prepareCollection()
{
$collection = Mage::getResourceModel($this->_getCollectionClass())
/** @var Mage_Sales_Model_Resource_Order_Shipment_Grid_Collection $collection */
$collection = Mage::getResourceModel($this->_getCollectionClass());
$collection
->addFieldToSelect('entity_id')
->addFieldToSelect('created_at')
->addFieldToSelect('increment_id')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected function _initInvoice($update = false)
protected function _saveInvoice($invoice)
{
$invoice->getOrder()->setIsInProcess(true);
$transactionSave = Mage::getModel('core/resource_transaction')
Mage::getModel('core/resource_transaction')
->addObject($invoice)
->addObject($invoice->getOrder())
->save();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ protected function _initShipment()
protected function _saveShipment($shipment)
{
$shipment->getOrder()->setIsInProcess(true);
$transactionSave = Mage::getModel('core/resource_transaction')
Mage::getModel('core/resource_transaction')
->addObject($shipment)
->addObject($shipment->getOrder())
->save();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public function getJsonConfig()
/**
* Validating of super product option value
*
* @param array $attributeId
* @param string $attributeId
* @param array $value
* @param array $options
* @return bool
Expand Down
6 changes: 4 additions & 2 deletions app/code/core/Mage/CatalogIndex/Model/Retreiver.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@ protected function _construct()
public function getRetreiver($type)
{
if (isset($this->_retreivers[$type])) {
return Mage::getSingleton($this->_retreivers[$type]);
/** @var false|Mage_CatalogIndex_Model_Data_Abstract $model */
$model = Mage::getSingleton($this->_retreivers[$type]);
return $model;
} else {
Mage::throwException("Data retreiver for '{$type}' is not defined");
Mage::throwException("Data retreiver for '$type' is not defined");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function _toHtml()
{
if (!$this->getOptions()) {
if ($this->_addGroupAllOption) {
$this->addOption(Mage_Customer_Model_Group::CUST_GROUP_ALL, Mage::helper('customer')->__('ALL GROUPS'));
$this->addOption((string) Mage_Customer_Model_Group::CUST_GROUP_ALL, Mage::helper('customer')->__('ALL GROUPS'));
}

foreach ($this->_getCustomerGroups() as $groupId => $groupLabel) {
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Core/Helper/String.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public function splitWords($str, $uniqueOnly = false, $maxWordLength = 0, $wordS
/**
* Clean non UTF-8 characters
*
* @param string $string
* @param null|string $string
* @return string
*/
public function cleanString($string)
Expand Down
3 changes: 2 additions & 1 deletion app/code/core/Mage/Paypal/Model/Method/Agreement.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Mage_Paypal_Model_Method_Agreement extends Mage_Sales_Model_Payment_Method
public function __construct($params = [])
{
$proInstance = array_shift($params);
if ($proInstance && ($proInstance instanceof Mage_Paypal_Model_Pro)) {
if ($proInstance instanceof Mage_Paypal_Model_Pro) {
$this->_pro = $proInstance;
} else {
$this->_pro = Mage::getModel('paypal/pro');
Expand Down Expand Up @@ -286,6 +286,7 @@ public function fetchTransactionInfo(Mage_Payment_Model_Info $payment, $transact
protected function _placeOrder(Mage_Sales_Model_Order_Payment $payment, $amount)
{
$order = $payment->getOrder();
/** @var Mage_Sales_Model_Billing_Agreement $billingAgreement */
$billingAgreement = Mage::getModel('sales/billing_agreement')->load(
$payment->getAdditionalInformation(
Mage_Sales_Model_Payment_Method_Billing_AgreementAbstract::TRANSPORT_BILLING_AGREEMENT_ID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ protected function _initInitialFieldsToSelect()
*/
public function addCreateAtPeriodFilter($period)
{
[$from, $to] = $this->getDateRange($period, 0, 0, true);
[$from, $to] = $this->getDateRange($period, '0', '0', true);

$this->checkIsLive($period);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ protected function _joinFields($from = '', $to = '')
}

/**
* @param int $from
* @param int $to
* @param string $from
* @param string $to
* @return $this
*/
public function setDateRange($from, $to)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ protected function _construct()
/**
* Set Date range to collection
*
* @param int $from
* @param int $to
* @param string $from
* @param string $to
* @return $this
*/
public function setDateRange($from, $to)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected function _construct()
* Prepare for abandoned report
*
* @param array $storeIds
* @param string $filter
* @param array $filter
* @return $this
*/
public function prepareForAbandonedReport($storeIds, $filter = null)
Expand Down
Loading
Loading