Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New PHPStan Plugin Test #4411

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft
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
210 changes: 0 additions & 210 deletions .phpstan.dist.baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -4764,12 +4764,6 @@ parameters:
count: 1
path: app/code/core/Mage/Index/Model/Lock/Storage/Db.php

-
message: '#^Property Mage_Index_Model_Lock_Storage_Db\:\:\$_helper \(Mage_Index_Model_Resource_Helper_Mysql4\) does not accept Mage_Core_Model_Resource_Helper_Abstract\.$#'
identifier: assign.propertyType
count: 1
path: app/code/core/Mage/Index/Model/Lock/Storage/Db.php

-
message: '#^Call to function is_array\(\) with '''' will always evaluate to false\.$#'
identifier: function.impossibleType
Expand Down Expand Up @@ -7128,54 +7122,6 @@ parameters:
count: 3
path: app/design/adminhtml/default/default/template/api2/role/users_grid_js.phtml

-
message: '#^Call to protected method _isSelected\(\) of class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\.$#'
identifier: method.protected
count: 1
path: app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/type/checkbox.phtml

-
message: '#^Call to protected method _isSelected\(\) of class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\.$#'
identifier: method.protected
count: 1
path: app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/type/multi.phtml

-
message: '#^Call to protected method _getDefaultValues\(\) of class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\.$#'
identifier: method.protected
count: 1
path: app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/type/radio.phtml

-
message: '#^Call to protected method _isSelected\(\) of class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\.$#'
identifier: method.protected
count: 1
path: app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/type/radio.phtml

-
message: '#^Call to protected method _showSingle\(\) of class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\.$#'
identifier: method.protected
count: 1
path: app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/type/radio.phtml

-
message: '#^Call to protected method _getDefaultValues\(\) of class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\.$#'
identifier: method.protected
count: 1
path: app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/type/select.phtml

-
message: '#^Call to protected method _isSelected\(\) of class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\.$#'
identifier: method.protected
count: 1
path: app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/type/select.phtml

-
message: '#^Call to protected method _showSingle\(\) of class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\.$#'
identifier: method.protected
count: 1
path: app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/type/select.phtml

-
message: '#^Variable \$this might not be defined\.$#'
identifier: variable.undefined
Expand Down Expand Up @@ -7218,24 +7164,12 @@ parameters:
count: 2
path: app/design/adminhtml/default/default/template/catalog/product/attribute/new/created.phtml

-
message: '#^Call to protected method _getHeader\(\) of class Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main\.$#'
identifier: method.protected
count: 1
path: app/design/adminhtml/default/default/template/catalog/product/attribute/set/main.phtml

-
message: '#^Variable \$this might not be defined\.$#'
identifier: variable.undefined
count: 5
path: app/design/adminhtml/default/default/template/catalog/product/attribute/set/toolbar/add.phtml

-
message: '#^Call to protected method _getHeader\(\) of class Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Toolbar_Main\.$#'
identifier: method.protected
count: 1
path: app/design/adminhtml/default/default/template/catalog/product/attribute/set/toolbar/main.phtml

-
message: '#^Access to an undefined property Mage_Catalog_Model_Product_Option\:\:\$decoratedIsLast\.$#'
identifier: property.notFound
Expand Down Expand Up @@ -7590,12 +7524,6 @@ parameters:
count: 1
path: app/design/adminhtml/default/default/template/permissions/role_users_grid_js.phtml

-
message: '#^Call to protected method _getGridHtml\(\) of class Mage_Adminhtml_Block_Permissions_Tab_Rolesusers\.$#'
identifier: method.protected
count: 1
path: app/design/adminhtml/default/default/template/permissions/rolesusers.phtml

-
message: '#^Call to an undefined method Mage_Core_Block_Abstract\:\:_getSelectedRoles\(\)\.$#'
identifier: method.notFound
Expand Down Expand Up @@ -8124,54 +8052,6 @@ parameters:
count: 9
path: app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle.phtml

-
message: '#^Call to protected method _isSelected\(\) of class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\.$#'
identifier: method.protected
count: 1
path: app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml

-
message: '#^Call to protected method _isSelected\(\) of class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\.$#'
identifier: method.protected
count: 1
path: app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/multi.phtml

-
message: '#^Call to protected method _getDefaultValues\(\) of class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\.$#'
identifier: method.protected
count: 1
path: app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/radio.phtml

-
message: '#^Call to protected method _isSelected\(\) of class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\.$#'
identifier: method.protected
count: 2
path: app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/radio.phtml

-
message: '#^Call to protected method _showSingle\(\) of class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\.$#'
identifier: method.protected
count: 1
path: app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/radio.phtml

-
message: '#^Call to protected method _getDefaultValues\(\) of class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\.$#'
identifier: method.protected
count: 1
path: app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml

-
message: '#^Call to protected method _isSelected\(\) of class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\.$#'
identifier: method.protected
count: 2
path: app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml

-
message: '#^Call to protected method _showSingle\(\) of class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\.$#'
identifier: method.protected
count: 1
path: app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml

-
message: '#^Unreachable statement \- code above always terminates\.$#'
identifier: deadCode.unreachable
Expand Down Expand Up @@ -8316,12 +8196,6 @@ parameters:
count: 1
path: app/design/frontend/base/default/template/catalog/product/price.phtml

-
message: '#^Call to protected method _isSecure\(\) of class Mage_Core_Block_Abstract\.$#'
identifier: method.protected
count: 1
path: app/design/frontend/base/default/template/catalog/product/view.phtml

-
message: '#^Variable \$this might not be defined\.$#'
identifier: variable.undefined
Expand Down Expand Up @@ -8568,12 +8442,6 @@ parameters:
count: 10
path: app/design/frontend/base/default/template/checkout/multishipping/success.phtml

-
message: '#^Cannot call method isEnabled\(\) on Mage_Core_Block_Abstract\|false\.$#'
identifier: method.nonObject
count: 5
path: app/design/frontend/base/default/template/checkout/onepage/billing.phtml

-
message: '#^Variable \$this might not be defined\.$#'
identifier: variable.undefined
Expand Down Expand Up @@ -8784,24 +8652,12 @@ parameters:
count: 13
path: app/design/frontend/base/default/template/customer/form/confirmation.phtml

-
message: '#^Cannot call method isEnabled\(\) on Mage_Core_Block_Abstract\|false\.$#'
identifier: method.nonObject
count: 3
path: app/design/frontend/base/default/template/customer/form/edit.phtml

-
message: '#^Variable \$this might not be defined\.$#'
identifier: variable.undefined
count: 16
path: app/design/frontend/base/default/template/customer/form/newsletter.phtml

-
message: '#^Cannot call method isEnabled\(\) on Mage_Core_Block_Abstract\|false\.$#'
identifier: method.nonObject
count: 3
path: app/design/frontend/base/default/template/customer/form/register.phtml

-
message: '#^Variable \$this might not be defined\.$#'
identifier: variable.undefined
Expand Down Expand Up @@ -8964,18 +8820,6 @@ parameters:
count: 145
path: app/design/frontend/base/default/template/giftmessage/inline.phtml

-
message: '#^Call to protected method _getEnhancedEcommerceDataForAnalytics4\(\) of class Mage_GoogleAnalytics_Block_Ga\.$#'
identifier: method.protected
count: 1
path: app/design/frontend/base/default/template/googleanalytics/ga.phtml

-
message: '#^Call to protected method _getPageTrackingCode\(\) of class Mage_GoogleAnalytics_Block_Ga\.$#'
identifier: method.protected
count: 1
path: app/design/frontend/base/default/template/googleanalytics/ga.phtml

-
message: '#^Variable \$crumbs might not be defined\.$#'
identifier: variable.undefined
Expand Down Expand Up @@ -9150,12 +8994,6 @@ parameters:
count: 1
path: app/design/frontend/base/default/template/paypal/payment/redirect.phtml

-
message: '#^Cannot call method isEnabled\(\) on Mage_Core_Block_Abstract\|false\.$#'
identifier: method.nonObject
count: 4
path: app/design/frontend/base/default/template/persistent/checkout/onepage/billing.phtml

-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue
Expand All @@ -9168,12 +9006,6 @@ parameters:
count: 1
path: app/design/frontend/base/default/template/persistent/checkout/onepage/login.phtml

-
message: '#^Cannot call method isEnabled\(\) on Mage_Core_Block_Abstract\|false\.$#'
identifier: method.nonObject
count: 3
path: app/design/frontend/base/default/template/persistent/customer/form/register.phtml

-
message: '#^Variable \$this might not be defined\.$#'
identifier: variable.undefined
Expand Down Expand Up @@ -9462,24 +9294,6 @@ parameters:
count: 6
path: app/design/frontend/rwd/default/template/bundle/catalog/product/view/type/bundle/availability.phtml

-
message: '#^Call to protected method _getDefaultValues\(\) of class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\.$#'
identifier: method.protected
count: 1
path: app/design/frontend/rwd/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml

-
message: '#^Call to protected method _isSelected\(\) of class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\.$#'
identifier: method.protected
count: 2
path: app/design/frontend/rwd/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml

-
message: '#^Call to protected method _showSingle\(\) of class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\.$#'
identifier: method.protected
count: 1
path: app/design/frontend/rwd/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml

-
message: '#^Cannot call method setFilter\(\) on class\-string\|object\.$#'
identifier: method.nonObject
Expand Down Expand Up @@ -9516,12 +9330,6 @@ parameters:
count: 1
path: app/design/frontend/rwd/default/template/catalog/product/price.phtml

-
message: '#^Call to protected method _isSecure\(\) of class Mage_Core_Block_Abstract\.$#'
identifier: method.protected
count: 1
path: app/design/frontend/rwd/default/template/catalog/product/view.phtml

-
message: '#^Variable \$this might not be defined\.$#'
identifier: variable.undefined
Expand Down Expand Up @@ -9726,12 +9534,6 @@ parameters:
count: 13
path: app/design/frontend/rwd/default/template/customer/form/confirmation.phtml

-
message: '#^Cannot call method isEnabled\(\) on Mage_Core_Block_Abstract\|false\.$#'
identifier: method.nonObject
count: 3
path: app/design/frontend/rwd/default/template/customer/form/edit.phtml

-
message: '#^Variable \$this might not be defined\.$#'
identifier: variable.undefined
Expand Down Expand Up @@ -9858,12 +9660,6 @@ parameters:
count: 70
path: app/design/frontend/rwd/default/template/paypal/express/review/address.phtml

-
message: '#^Cannot call method isEnabled\(\) on Mage_Core_Block_Abstract\|false\.$#'
identifier: method.nonObject
count: 4
path: app/design/frontend/rwd/default/template/persistent/checkout/onepage/billing.phtml

-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue
Expand All @@ -9876,12 +9672,6 @@ parameters:
count: 1
path: app/design/frontend/rwd/default/template/persistent/checkout/onepage/login.phtml

-
message: '#^Cannot call method isEnabled\(\) on Mage_Core_Block_Abstract\|false\.$#'
identifier: method.nonObject
count: 3
path: app/design/frontend/rwd/default/template/persistent/customer/form/register.phtml

-
message: '#^Variable \$this might not be defined\.$#'
identifier: variable.undefined
Expand Down
5 changes: 5 additions & 0 deletions .phpstan.dist.neon
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ parameters:

# Instantiated class not found
- lib/Varien/Image/Adapter.php

# TMP exclude: test plugin
- app/code/core/Mage/ConfigurableSwatches/Helper/Mediafallback.php
- app/code/core/Mage/Eav/Model/Adminhtml/System/Config/Source/Inputtype.php
- tests/unit/Mage/Adminhtml/Block/Widget/GridTest.php
tmpDir: .phpstan.cache
level: 5
checkFunctionNameCase: true
Expand Down
Loading
Loading