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
155 changes: 0 additions & 155 deletions .github/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,6 @@ parameters:
count: 1
path: ../app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist.php

-
message: "#^Cannot call method initForm\\(\\) on Mage_Core_Block_Abstract\\|false\\.$#"
count: 3
path: ../app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php

-
message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:getGroups\\(\\)\\.$#"
count: 1
Expand Down Expand Up @@ -960,11 +955,6 @@ parameters:
count: 1
path: ../app/code/core/Mage/Adminhtml/Block/Store/Switcher.php

-
message: "#^Cannot call method initForm\\(\\) on Mage_Core_Block_Abstract\\|false\\.$#"
count: 1
path: ../app/code/core/Mage/Adminhtml/Block/System/Cache/Edit.php

-
message: "#^Cannot call method initForm\\(\\) on Mage_Core_Block_Abstract\\|false\\.$#"
count: 1
Expand Down Expand Up @@ -1010,21 +1000,11 @@ parameters:
count: 1
path: ../app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Wizard.php

-
message: "#^Cannot call method initForm\\(\\) on Mage_Core_Block_Abstract\\|false\\.$#"
count: 1
path: ../app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tabs.php

-
message: "#^Method Mage_Adminhtml_Block_Widget_Grid\\:\\:setDefaultSort\\(\\) invoked with 2 parameters, 1 required\\.$#"
count: 1
path: ../app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/History.php

-
message: "#^Cannot call method initForm\\(\\) on Mage_Core_Block_Abstract\\|false\\.$#"
count: 1
path: ../app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tabs.php

-
message: "#^Call to method getIdCollection\\(\\) on an unknown class Mage_Dataflow_Model_Import_Export\\.$#"
count: 1
Expand Down Expand Up @@ -1210,11 +1190,6 @@ parameters:
count: 1
path: ../app/code/core/Mage/Adminhtml/Block/Urlrewrite/Category/Tree.php

-
message: "#^Cannot call method addLink\\(\\) on Mage_Core_Block_Abstract\\|false\\.$#"
count: 1
path: ../app/code/core/Mage/Adminhtml/Block/Widget.php

-
message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:decodeFilter\\(\\)\\.$#"
count: 1
Expand Down Expand Up @@ -1285,11 +1260,6 @@ parameters:
count: 1
path: ../app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php

-
message: "#^Cannot call method addLink\\(\\) on Mage_Core_Block_Abstract\\|false\\.$#"
count: 1
path: ../app/code/core/Mage/Adminhtml/Controller/Action.php

-
message: "#^Cannot call method addValueFilter\\(\\) on Mage_Core_Model_Resource_Db_Collection_Abstract\\|false\\.$#"
count: 1
Expand Down Expand Up @@ -1485,11 +1455,6 @@ parameters:
count: 1
path: ../app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php

-
message: "#^Method Mage_Adminhtml_Sales_Order_CreditmemoController\\:\\:_needToAddDummy\\(\\) should return bool but return statement is missing\\.$#"
count: 1
path: ../app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php

-
message: "#^Parameter \\$order of method Mage_Adminhtml_Sales_Order_CreditmemoController\\:\\:_initInvoice\\(\\) has invalid type unknown_type\\.$#"
count: 1
Expand All @@ -1500,16 +1465,6 @@ parameters:
count: 1
path: ../app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php

-
message: "#^Method Mage_Adminhtml_Sales_Order_InvoiceController\\:\\:_needToAddDummy\\(\\) should return bool but return statement is missing\\.$#"
count: 1
path: ../app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php

-
message: "#^Method Mage_Adminhtml_Sales_Order_InvoiceController\\:\\:_needToAddDummyForShipment\\(\\) should return bool but return statement is missing\\.$#"
count: 1
path: ../app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php

-
message: "#^Undefined variable\\: \\$shippingResponse$#"
count: 1
Expand All @@ -1525,11 +1480,6 @@ parameters:
count: 1
path: ../app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php

-
message: "#^Method Mage_Adminhtml_Sales_Order_ShipmentController\\:\\:_needToAddDummy\\(\\) should return bool but return statement is missing\\.$#"
count: 1
path: ../app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php

-
message: "#^Method Mage_Adminhtml_Controller_Action\\:\\:_setForcedFormKeyActions\\(\\) invoked with 2 parameters, 1 required\\.$#"
count: 1
Expand All @@ -1540,11 +1490,6 @@ parameters:
count: 4
path: ../app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php

-
message: "#^Cannot call method initForm\\(\\) on Mage_Core_Block_Abstract\\|false\\.$#"
count: 1
path: ../app/code/core/Mage/Adminhtml/controllers/System/CacheController.php

-
message: "#^Cannot call method initForm\\(\\) on Mage_Core_Block_Abstract\\|false\\.$#"
count: 1
Expand Down Expand Up @@ -2180,26 +2125,6 @@ parameters:
count: 1
path: ../app/code/core/Mage/Captcha/controllers/RefreshController.php

-
message: "#^Call to an undefined method Mage_Core_Block_Abstract\\:\\:addCrumb\\(\\)\\.$#"
count: 2
path: ../app/code/core/Mage/Catalog/Block/Breadcrumbs.php

-
message: "#^Call to an undefined method Mage_Core_Block_Abstract\\:\\:addItem\\(\\)\\.$#"
count: 1
path: ../app/code/core/Mage/Catalog/Block/Category/View.php

-
message: "#^Call to an undefined method Mage_Core_Block_Abstract\\:\\:addLinkRel\\(\\)\\.$#"
count: 1
path: ../app/code/core/Mage/Catalog/Block/Category/View.php

-
message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:canUseCanonicalTag\\(\\)\\.$#"
count: 1
path: ../app/code/core/Mage/Catalog/Block/Category/View.php

-
message: "#^Cannot call method count\\(\\) on string\\.$#"
count: 2
Expand All @@ -2215,36 +2140,11 @@ parameters:
count: 1
path: ../app/code/core/Mage/Catalog/Block/Product.php

-
message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:getAddUrl\\(\\)\\.$#"
count: 3
path: ../app/code/core/Mage/Catalog/Block/Product/Abstract.php

-
message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:getAddUrlCustom\\(\\)\\.$#"
count: 2
path: ../app/code/core/Mage/Catalog/Block/Product/Abstract.php

-
message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:getAddUrlWithCustomParams\\(\\)\\.$#"
count: 1
path: ../app/code/core/Mage/Catalog/Block/Product/Abstract.php

-
message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:getCurrentPageLayout\\(\\)\\.$#"
count: 1
path: ../app/code/core/Mage/Catalog/Block/Product/Abstract.php

-
message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:getAddUrlWithCustomParams\\(\\)\\.$#"
count: 1
path: ../app/code/core/Mage/Catalog/Block/Product/Compare/List.php

-
message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:getAddUrlWithParams\\(\\)\\.$#"
count: 1
path: ../app/code/core/Mage/Catalog/Block/Product/Compare/List.php

-
message: "#^Method Mage_Catalog_Model_Resource_Product_Compare_Item_Collection\\:\\:useProductItem\\(\\) invoked with 1 parameter, 0 required\\.$#"
count: 1
Expand Down Expand Up @@ -2275,36 +2175,6 @@ parameters:
count: 1
path: ../app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php

-
message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:getAddUrl\\(\\)\\.$#"
count: 1
path: ../app/code/core/Mage/Catalog/Block/Product/Price.php

-
message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:getAddUrlCustom\\(\\)\\.$#"
count: 1
path: ../app/code/core/Mage/Catalog/Block/Product/Price.php

-
message: "#^Call to an undefined method Mage_Core_Block_Abstract\\:\\:addLinkRel\\(\\)\\.$#"
count: 1
path: ../app/code/core/Mage/Catalog/Block/Product/View.php

-
message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:canUseCanonicalTag\\(\\)\\.$#"
count: 1
path: ../app/code/core/Mage/Catalog/Block/Product/View.php

-
message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:getAddUrl\\(\\)\\.$#"
count: 1
path: ../app/code/core/Mage/Catalog/Block/Product/View.php

-
message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:getAddUrlCustom\\(\\)\\.$#"
count: 1
path: ../app/code/core/Mage/Catalog/Block/Product/View.php

-
message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:init\\(\\)\\.$#"
count: 1
Expand Down Expand Up @@ -3240,21 +3110,11 @@ parameters:
count: 1
path: ../app/code/core/Mage/CatalogRule/Model/Rule.php

-
message: "#^Call to an undefined method Mage_Core_Block_Abstract\\:\\:addCrumb\\(\\)\\.$#"
count: 1
path: ../app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php

-
message: "#^Method Mage_Eav_Model_Entity_Attribute_Source_Interface\\:\\:getAllOptions\\(\\) invoked with 1 parameter, 0 required\\.$#"
count: 1
path: ../app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php

-
message: "#^Call to an undefined method Mage_Core_Block_Abstract\\:\\:addCrumb\\(\\)\\.$#"
count: 1
path: ../app/code/core/Mage/CatalogSearch/Block/Advanced/Result.php

-
message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:getQueryText\\(\\)\\.$#"
count: 1
Expand All @@ -3265,11 +3125,6 @@ parameters:
count: 1
path: ../app/code/core/Mage/CatalogSearch/Block/Autocomplete.php

-
message: "#^Call to an undefined method Mage_Core_Block_Abstract\\:\\:addCrumb\\(\\)\\.$#"
count: 1
path: ../app/code/core/Mage/CatalogSearch/Block/Result.php

-
message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:getEscapedQueryText\\(\\)\\.$#"
count: 1
Expand Down Expand Up @@ -5895,11 +5750,6 @@ parameters:
count: 1
path: ../app/code/core/Mage/Review/controllers/CustomerController.php

-
message: "#^Call to an undefined method Mage_Core_Block_Abstract\\:\\:addCrumb\\(\\)\\.$#"
count: 2
path: ../app/code/core/Mage/Review/controllers/ProductController.php

-
message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:init\\(\\)\\.$#"
count: 1
Expand Down Expand Up @@ -6110,11 +5960,6 @@ parameters:
count: 1
path: ../app/code/core/Mage/Sales/Block/Order/View.php

-
message: "#^Cannot call method addCrumb\\(\\) on Mage_Core_Block_Abstract\\|false\\.$#"
count: 2
path: ../app/code/core/Mage/Sales/Helper/Guest.php

-
message: "#^Method Mage_Sales_Model_Billing_Agreement\\:\\:getStatusLabel\\(\\) should return string but return statement is missing\\.$#"
count: 1
Expand Down
28 changes: 16 additions & 12 deletions app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,25 @@ public function __construct()
$this->setTitle(Mage::helper('customer')->__('Customer Information'));
}

/**
* @return Mage_Adminhtml_Block_Widget_Tabs
* @throws Exception
*/
protected function _beforeToHtml()
{
/*
if (Mage::registry('current_customer')->getId()) {
$this->addTab('view', array(
'label' => Mage::helper('customer')->__('Customer View'),
'content' => $this->getLayout()->createBlock('adminhtml/customer_edit_tab_view')->toHtml(),
'active' => true
));
}
*/
/** @var Mage_Adminhtml_Block_Customer_Edit_Tab_Account $block */
$block = $this->getLayout()->createBlock('adminhtml/customer_edit_tab_account');
$this->addTab('account', array(
'label' => Mage::helper('customer')->__('Account Information'),
'content' => $this->getLayout()->createBlock('adminhtml/customer_edit_tab_account')->initForm()->toHtml(),
'content' => $block->initForm()->toHtml(),
'active' => Mage::registry('current_customer')->getId() ? false : true
));

/** @var Mage_Adminhtml_Block_Customer_Edit_Tab_Addresses $block */
$block = $this->getLayout()->createBlock('adminhtml/customer_edit_tab_addresses');
$this->addTab('addresses', array(
'label' => Mage::helper('customer')->__('Addresses'),
'content' => $this->getLayout()->createBlock('adminhtml/customer_edit_tab_addresses')->initForm()->toHtml(),
'content' => $block->initForm()->toHtml(),
));


Expand Down Expand Up @@ -83,10 +82,12 @@ protected function _beforeToHtml()
'url' => $this->getUrl('*/*/wishlist', array('_current' => true)),
));

/** @var Mage_Adminhtml_Block_Customer_Edit_Tab_Newsletter $block */
$block = $this->getLayout()->createBlock('adminhtml/customer_edit_tab_newsletter');
if (Mage::getSingleton('admin/session')->isAllowed('newsletter/subscriber')) {
$this->addTab('newsletter', array(
'label' => Mage::helper('customer')->__('Newsletter'),
'content' => $this->getLayout()->createBlock('adminhtml/customer_edit_tab_newsletter')->initForm()->toHtml()
'content' => $block->initForm()->toHtml()
));
}

Expand All @@ -112,6 +113,9 @@ protected function _beforeToHtml()
return parent::_beforeToHtml();
}

/**
* @throws Exception
*/
protected function _updateActiveTab()
{
$tabId = $this->getRequest()->getParam('tab');
Expand Down
22 changes: 18 additions & 4 deletions app/code/core/Mage/Adminhtml/Block/System/Cache/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,19 @@
*/
class Mage_Adminhtml_Block_System_Cache_Edit extends Mage_Adminhtml_Block_Widget
{
/**
* Mage_Adminhtml_Block_System_Cache_Edit constructor.
Copy link
Contributor

Choose a reason for hiding this comment

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

I've not seen this doc. Is it a requirement from some tools?

Copy link
Contributor Author

@sreichel sreichel Aug 11, 2022

Choose a reason for hiding this comment

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

No, it is not "requirered" ... it is just for complete documentation ("no missing docblocks" - e.g. for phpdocumentor, phpdox). I'm pretty sure every __constructor i've touched has this :)

*/
public function __construct()
{
parent::__construct();
$this->setTemplate('system/cache/edit.phtml');
$this->setTitle('Cache Management');
}

/**
* @inheritDoc
*/
protected function _prepareLayout()
{
$this->setChild('save_button',
Expand All @@ -47,22 +53,30 @@ protected function _prepareLayout()
return parent::_prepareLayout();
}

/**
* @return string
*/
public function getSaveButtonHtml()
{
return $this->getChildHtml('save_button');
}

/**
* @return string
*/
public function getSaveUrl()
{
return $this->getUrl('*/*/save', array('_current'=>true));
}

/**
* @return $this
*/
public function initForm()
{
$this->setChild('form',
$this->getLayout()->createBlock('adminhtml/system_cache_form')
->initForm()
);
/** @var Mage_Adminhtml_Block_System_Cache_Form $block */
$block = $this->getLayout()->createBlock('adminhtml/system_cache_form');
$this->setChild('form', $block->initForm());
return $this;
}

Expand Down
Loading