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
681 changes: 0 additions & 681 deletions .github/phpstan-baseline.neon

Large diffs are not rendered by default.

72 changes: 8 additions & 64 deletions .github/phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -4,78 +4,22 @@ includes:
parameters:
magentoRootPath: %currentWorkingDirectory%
paths:
#lets start small with just few modules
- %currentWorkingDirectory%/app/code/core/Mage/Admin
- %currentWorkingDirectory%/app/code/core/Mage/Adminhtml
- %currentWorkingDirectory%/app/code/core/Mage/AdminNotification
- %currentWorkingDirectory%/app/code/core/Mage/Api
- %currentWorkingDirectory%/app/code/core/Mage/Api2
- %currentWorkingDirectory%/app/code/core/Mage/Authorizenet
- %currentWorkingDirectory%/app/code/core/Mage/Backup
- %currentWorkingDirectory%/app/code/core/Mage/Bundle
- %currentWorkingDirectory%/app/code/core/Mage/Captcha
- %currentWorkingDirectory%/app/code/core/Mage/Catalog
- %currentWorkingDirectory%/app/code/core/Mage/CatalogIndex
- %currentWorkingDirectory%/app/code/core/Mage/CatalogInventory
- %currentWorkingDirectory%/app/code/core/Mage/CatalogRule
- %currentWorkingDirectory%/app/code/core/Mage/CatalogSearch
# - %currentWorkingDirectory%/app/code/core/Mage/Centinel
- %currentWorkingDirectory%/app/code/core/Mage/Checkout
- %currentWorkingDirectory%/app/code/core/Mage/Cms
- %currentWorkingDirectory%/app/code/core/Mage/ConfigurableSwatches
- %currentWorkingDirectory%/app/code/core/Mage/Contacts
- %currentWorkingDirectory%/app/code/core/Mage/Core
- %currentWorkingDirectory%/app/code/core/Mage/Cron
- %currentWorkingDirectory%/app/code/core/Mage/CurrencySymbol
- %currentWorkingDirectory%/app/code/core/Mage/Customer
- %currentWorkingDirectory%/app/code/core/Mage/Dataflow
- %currentWorkingDirectory%/app/code/core/Mage/Directory
- %currentWorkingDirectory%/app/code/core/Mage/Downloadable
- %currentWorkingDirectory%/app/code/core/Mage/Eav
- %currentWorkingDirectory%/app/code/core/Mage/GiftMessage
- %currentWorkingDirectory%/app/code/core/Mage/GoogleAnalytics
- %currentWorkingDirectory%/app/code/core/Mage/GoogleCheckout
- %currentWorkingDirectory%/app/code/core/Mage/ImportExport
- %currentWorkingDirectory%/app/code/core/Mage/Index
- %currentWorkingDirectory%/app/code/core/Mage/Install
- %currentWorkingDirectory%/app/code/core/Mage/Log
- %currentWorkingDirectory%/app/code/core/Mage/Media
- %currentWorkingDirectory%/app/code/core/Mage/Newsletter
- %currentWorkingDirectory%/app/code/core/Mage/Oauth
- %currentWorkingDirectory%/app/code/core/Mage/Page
- %currentWorkingDirectory%/app/code/core/Mage/PageCache
- %currentWorkingDirectory%/app/code/core/Mage/Paygate
- %currentWorkingDirectory%/app/code/core/Mage/Payment
- %currentWorkingDirectory%/app/code/core/Mage/Paypal
# - %currentWorkingDirectory%/app/code/core/Mage/PaypalUk
- %currentWorkingDirectory%/app/code/core/Mage/Persistent
- %currentWorkingDirectory%/app/code/core/Mage/Poll
- %currentWorkingDirectory%/app/code/core/Mage/ProductAlert
- %currentWorkingDirectory%/app/code/core/Mage/Rating
- %currentWorkingDirectory%/app/code/core/Mage/Reports
- %currentWorkingDirectory%/app/code/core/Mage/Review
- %currentWorkingDirectory%/app/code/core/Mage/Rss
- %currentWorkingDirectory%/app/code/core/Mage/Rule
- %currentWorkingDirectory%/app/code/core/Mage/Sales
- %currentWorkingDirectory%/app/code/core/Mage/SalesRule
- %currentWorkingDirectory%/app/code/core/Mage/Sendfriend
- %currentWorkingDirectory%/app/code/core/Mage/Shipping
- %currentWorkingDirectory%/app/code/core/Mage/Sitemap
- %currentWorkingDirectory%/app/code/core/Mage/Tag
- %currentWorkingDirectory%/app/code/core/Mage/Tax
- %currentWorkingDirectory%/app/code/core/Mage/Uploader
# - %currentWorkingDirectory%/app/code/core/Mage/Usa
- %currentWorkingDirectory%/app/code/core/Mage/Widget
# - %currentWorkingDirectory%/app/code/core/Mage/Weee
- %currentWorkingDirectory%/app/code/core/Mage/Wishlist
- %currentWorkingDirectory%/app/code/core/Mage
excludePaths:
#todo DOCblocks
- %currentWorkingDirectory%/app/code/core/Mage/Centinel
- %currentWorkingDirectory%/app/code/core/Mage/PaypalUk
- %currentWorkingDirectory%/app/code/core/Mage/Usa
- %currentWorkingDirectory%/app/code/core/Mage/Weee

#incompatible interfaces
- */app/code/core/Mage/Admin/Model/Acl/Assert/Ip.php
- */app/code/core/Mage/Admin/Model/Acl/Assert/Time.php
- */app/code/core/Mage/Api/Model/Acl/Assert/Ip.php
- */app/code/core/Mage/Api/Model/Acl/Assert/Time.php
- */app/code/core/Mage/Adminhtml/Block/Widget/Grid/Block.php
- */app/code/core/Mage/Core/Model/Mysql4/Design/Theme/Collection.php

# deprecated _getHelper()
- */app/code/core/Mage/Adminhtml/Controller/Rss/Abstract.php
- */app/code/core/Mage/Adminhtml/controllers/Rss/OrderController.php
Expand Down
1 change: 0 additions & 1 deletion app/code/core/Mage/Admin/Model/Observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class Mage_Admin_Model_Observer
* Handler for controller_action_predispatch event
*
* @param Varien_Event_Observer $observer
* @return void
*/
public function actionPreDispatchAdmin($observer)
{
Expand Down
1 change: 0 additions & 1 deletion app/code/core/Mage/Admin/Model/Redirectpolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class Mage_Admin_Model_Redirectpolicy
*/
public function __construct($parameters = array())
{
/** @var Mage_Adminhtml_Model_Url _urlModel */
$this->_urlModel = (!empty($parameters['urlModel'])) ?
$parameters['urlModel'] : Mage::getModel('adminhtml/url');
}
Expand Down
1 change: 0 additions & 1 deletion app/code/core/Mage/Admin/Model/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ protected function _getRequestUri($request = null)
* @param string $username
* @param string $message
* @param Mage_Core_Controller_Request_Http|null $request
* @return void
*/
protected function _loginFailed($e, $request, $username, $message)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ public function getRoot($parentNodeCategory=null, $recursionLevel=3)
* If ids are empty, default tree with depth = 2 will be returned.
*
* @param array $ids
* @return mixed|Varien_Data_Tree_Node|null
*/
public function getRootByIds($ids)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@

class Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tab_Front extends Mage_Adminhtml_Block_Widget_Form
{

/**
* @inheritDoc
*/
protected function _prepareForm()
{
$model = Mage::registry('entity_attribute');
Expand Down Expand Up @@ -100,5 +102,4 @@ protected function _prepareForm()

return parent::_prepareForm();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
*/
class Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Grid extends Mage_Adminhtml_Block_Widget_Grid
{

public function __construct()
{
parent::__construct();
Expand All @@ -43,6 +42,9 @@ public function __construct()
$this->setSaveParametersInSession(true);
}

/**
* @inheritDoc
*/
protected function _prepareCollection()
{
$collection = Mage::getResourceModel('eav/entity_attribute_set_collection')
Expand All @@ -52,6 +54,10 @@ protected function _prepareCollection()
return parent::_prepareCollection();
}

/**
* @return void
* @throws Exception
*/
protected function _prepareColumns()
{
/*$this->addColumn('set_id', array(
Expand All @@ -70,6 +76,10 @@ protected function _prepareColumns()
));
}

/**
* @param Varien_Object $row
* @return string
*/
public function getRowUrl($row)
{
return $this->getUrl('*/*/edit', array('id'=>$row->getAttributeSetId()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ class Mage_Adminhtml_Block_Catalog_Product_Composite_Fieldset_Options extends Ma
{
/**
* Constructor for our block with options
*
* @return void
*/
public function __construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ class Mage_Adminhtml_Block_Catalog_Product_Composite_Fieldset_Qty extends Mage_C
{
/**
* Constructor for our block with options
*
* @return void
*/
public function _construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected function _prepareLayout()
/**
* Prepare attributes form
*
* @return null
* @return void
*/
protected function _prepareForm()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ protected function _prepareColumns()
}

/**
* @return void
* @inheritDoc
*/
protected function _afterLoadCollection()
{
$this->getCollection()->walk('afterLoad');
parent::_afterLoadCollection();
return parent::_afterLoadCollection();
}

/**
Expand Down
17 changes: 12 additions & 5 deletions app/code/core/Mage/Adminhtml/Block/Cms/Block/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
*/
class Mage_Adminhtml_Block_Cms_Block_Grid extends Mage_Adminhtml_Block_Widget_Grid
{

public function __construct()
{
parent::__construct();
Expand All @@ -42,18 +41,23 @@ public function __construct()
$this->setDefaultDir('ASC');
}

/**
* @inheritDoc
* @throws Exception
*/
protected function _prepareCollection()
{
$collection = Mage::getModel('cms/block')->getCollection();
/* @var $collection Mage_Cms_Model_Mysql4_Block_Collection */
$this->setCollection($collection);
return parent::_prepareCollection();
}

/**
* @inheritDoc
* @throws Exception
*/
protected function _prepareColumns()
{
$baseUrl = $this->getUrl();

$this->addColumn('title', array(
'header' => Mage::helper('cms')->__('Title'),
'align' => 'left',
Expand Down Expand Up @@ -104,10 +108,13 @@ protected function _prepareColumns()
return parent::_prepareColumns();
}

/**
* @inheritDoc
*/
protected function _afterLoadCollection()
{
$this->getCollection()->walk('afterLoad');
parent::_afterLoadCollection();
return parent::_afterLoadCollection();
}

protected function _filterStoreCondition($collection, $column)
Expand Down
2 changes: 0 additions & 2 deletions app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ class Mage_Adminhtml_Block_Cms_Page_Edit extends Mage_Adminhtml_Block_Widget_For
{
/**
* Initialize cms page edit block
*
* @return void
*/
public function __construct()
{
Expand Down
19 changes: 12 additions & 7 deletions app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
*/
class Mage_Adminhtml_Block_Cms_Page_Grid extends Mage_Adminhtml_Block_Widget_Grid
{

public function __construct()
{
parent::__construct();
Expand All @@ -42,20 +41,25 @@ public function __construct()
$this->setDefaultDir('ASC');
}

/**
* @inheritDoc
* @throws Exception
*/
protected function _prepareCollection()
{
$collection = Mage::getModel('cms/page')->getCollection();
/* @var $collection Mage_Cms_Model_Mysql4_Page_Collection */
$collection->setFirstStoreFlag(true);
$this->setCollection($collection);

return parent::_prepareCollection();
}

/**
* @inheritDoc
* @throws Exception
*/
protected function _prepareColumns()
{
$baseUrl = $this->getUrl();

$this->addColumn('title', array(
'header' => Mage::helper('cms')->__('Title'),
'align' => 'left',
Expand All @@ -68,8 +72,6 @@ protected function _prepareColumns()
'index' => 'identifier'
));



$this->addColumn('root_template', array(
'header' => Mage::helper('cms')->__('Layout'),
'index' => 'root_template',
Expand Down Expand Up @@ -123,10 +125,13 @@ protected function _prepareColumns()
return parent::_prepareColumns();
}

/**
* @inheritDoc
*/
protected function _afterLoadCollection()
{
$this->getCollection()->walk('afterLoad');
parent::_afterLoadCollection();
return parent::_afterLoadCollection();
}

protected function _filterStoreCondition($collection, $column)
Expand Down
12 changes: 8 additions & 4 deletions app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,17 @@ public function __construct($attributes=array())
}

/**
* Prepare grid
*
* @return void
* @inheritDoc
*/
protected function _prepareGrid()
{
$this->setId('customer_cart_grid' . $this->getWebsiteId());
parent::_prepareGrid();
return parent::_prepareGrid();
}

/**
* @inheritDoc
*/
protected function _prepareCollection()
{
$customer = Mage::registry('current_customer');
Expand All @@ -76,6 +77,9 @@ protected function _prepareCollection()
return parent::_prepareCollection();
}

/**
* @inheritDoc
*/
protected function _prepareColumns()
{
$this->addColumn('product_id', array(
Expand Down
Loading