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

Phpdocs/phpstan update #2596

Merged
merged 5 commits into from
Sep 23, 2022
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
30 changes: 0 additions & 30 deletions .github/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,6 @@ parameters:
count: 1
path: ../app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php

-
message: "#^Method Mage_Adminhtml_Block_Widget_Tabs\\:\\:addTabAfter\\(\\) should return Mage_Adminhtml_Block_Widget_Tabs but return statement is missing\\.$#"
count: 1
path: ../app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php

-
message: "#^PHPDoc tag @param references unknown parameter\\: \\$tabNId$#"
count: 1
Expand Down Expand Up @@ -450,11 +445,6 @@ parameters:
count: 1
path: ../app/code/core/Mage/Adminhtml/Model/System/Store.php

-
message: "#^Method Mage_Adminhtml_Model_Url\\:\\:renewSecretUrls\\(\\) should return \\$this\\(Mage_Adminhtml_Model_Url\\) but return statement is missing\\.$#"
count: 1
path: ../app/code/core/Mage/Adminhtml/Model/Url.php

-
message: "#^Method Mage_Adminhtml_Controller_Action\\:\\:_setForcedFormKeyActions\\(\\) invoked with 2 parameters, 1 required\\.$#"
count: 1
Expand Down Expand Up @@ -700,11 +690,6 @@ parameters:
count: 1
path: ../app/code/core/Mage/Api2/Model/Route/ApiType.php

-
message: "#^Call to an undefined method Mage_Payment_Model_Info\\:\\:authorize\\(\\)\\.$#"
count: 1
path: ../app/code/core/Mage/Authorizenet/Model/Directpost.php

-
message: "#^Call to an undefined method Varien_Object\\:\\:decrypt\\(\\)\\.$#"
count: 1
Expand All @@ -715,11 +700,6 @@ parameters:
count: 1
path: ../app/code/core/Mage/Authorizenet/Model/Directpost.php

-
message: "#^Method Mage_Authorizenet_Model_Directpost\\:\\:authorize\\(\\) should return Mage_Paygate_Model_Authorizenet but return statement is missing\\.$#"
count: 1
path: ../app/code/core/Mage/Authorizenet/Model/Directpost.php

-
message: "#^Method Mage_Authorizenet_Model_Directpost\\:\\:initialize\\(\\) should return \\$this\\(Mage_Authorizenet_Model_Directpost\\) but return statement is missing\\.$#"
count: 1
Expand Down Expand Up @@ -1820,11 +1800,6 @@ parameters:
count: 2
path: ../app/code/core/Mage/Dataflow/Model/Profile.php

-
message: "#^Binary operation \"\\*\" between float and non\\-falsy\\-string results in an error\\.$#"
count: 1
path: ../app/code/core/Mage/Directory/Model/Currency.php

-
message: "#^Variable \\$response might not be defined\\.$#"
count: 1
Expand Down Expand Up @@ -2370,11 +2345,6 @@ parameters:
count: 1
path: ../app/code/core/Mage/Paypal/Model/Ipn.php

-
message: "#^Method Mage_Paypal_Model_Observer\\:\\:fetchReports\\(\\) should return \\$this\\(Mage_Paypal_Model_Observer\\) but return statement is missing\\.$#"
count: 1
path: ../app/code/core/Mage/Paypal/Model/Observer.php

-
message: "#^Variable \\$order in empty\\(\\) always exists and is not falsy\\.$#"
count: 1
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Admin/Model/Resource/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public function deleteFromRole(Mage_Core_Model_Abstract $user)
* Check if role user exists
*
* @param Mage_Core_Model_Abstract|Mage_Admin_Model_User $user
* @return array|false
* @return array
*/
public function roleUserExists(Mage_Core_Model_Abstract $user)
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Admin/Model/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ public function loadByUsername($username)
* Check if user is assigned to any role
*
* @param int|Mage_Admin_Model_User $user
* @return null|bool|array
* @return array|null
*/
public function hasAssigned2Role($user)
{
Expand Down
4 changes: 1 addition & 3 deletions app/code/core/Mage/Adminhtml/Block/Catalog/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ public function __construct()
}

/**
* Prepare button and grid
*
* @return $this
* @inheritDoc
*/
protected function _prepareLayout()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ protected function isSingleStoreMode()
/**
* Getter for id of current store (the only one in single-store mode and current in multi-stores mode)
*
* @return bool
* @return int
*/
protected function getStoreId()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public function getDeleteUrl()
/**
* Retrieve Save As Flag
*
* @return int
* @return string
*/
public function getSaveAsFlag()
{
Expand All @@ -334,7 +334,7 @@ protected function isSingleStoreMode()
/**
* Getter for id of current store (the only one in single-store mode and current in multi-stores mode)
*
* @return bool
* @return int
*/
protected function getStoreId()
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Adminhtml/Block/Page/Head.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function getFormKey()
/**
* Retrieve Timeout Delay from Config
*
* @return string
* @return int
*/
public function getLoadingTimeout()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public function getResTreeJson()
*
* @param array $a
* @param array $b
* @return bool
* @return int
*/
protected function _sortTree($a, $b)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected function _getAddress()
/**
* Define form attributes (id, method, action)
*
* @return Mage_Adminhtml_Block_Sales_Order_Create_Billing_Address
* @return $this
*/
protected function _prepareForm()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ protected function _beforeToHtml()
}

/**
* Prepare child blocks
*
* @return Mage_Adminhtml_Block_Sales_Order_Invoice_Create_Items
* @inheritDoc
*/
protected function _prepareLayout()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public function getTierHtml($item)
* Get Custom Options of item
*
* @param Mage_Sales_Model_Quote_Item $item
* @return array
* @return string
*/
public function getCustomOptions(Mage_Sales_Model_Quote_Item $item)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function getLastOrder()
/**
* Retrieve item collection
*
* @return mixed
* @return array|false
*/
public function getItemCollection()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function getShippingExcludeTax()
/**
* Get label for shipping include tax
*
* @return float
* @return string
*/
public function getIncludeTaxLabel()
{
Expand All @@ -84,7 +84,7 @@ public function getIncludeTaxLabel()
/**
* Get label for shipping exclude tax
*
* @return float
* @return string
*/
public function getExcludeTaxLabel()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function getOrder()
/**
* Retrieve source
*
* @return Mage_Sales_Model_Order_Invoice
* @return Mage_Sales_Model_Order_Creditmemo
*/
public function getSource()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function getOrder()
/**
* Retrieve source
*
* @return Mage_Sales_Model_Order_Invoice
* @return Mage_Sales_Model_Order_Shipment
*/
public function getSource()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function getOrder()
/**
* Retrieve source
*
* @return Mage_Sales_Model_Order_Invoice
* @return Mage_Sales_Model_Order_Shipment
*/
public function getSource()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ public function getMessage()
/**
* Retrieve save url
*
* @return string
* @deprecated after 1.4.2.0
* @return array
*/
public function getSaveUrl()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ public function setConditionName($name)
}

/**
* Retrieve current website id
*
* @return int
* @return string
*/
public function getConditionName()
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Adminhtml/Block/System/Config/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ protected function _afterToHtml($html)
/**
* @param Varien_Simplexml_Element $a
* @param Varien_Simplexml_Element $b
* @return bool
* @return int
*/
protected function _sortForm($a, $b)
{
Expand Down
5 changes: 1 addition & 4 deletions app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ public function getVariable()
}

/**
* Prepare layout.
* Adding save_and_continue button
*
* @return $this
* @inheritDoc
*/
protected function _preparelayout()
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Adminhtml/Block/Tag/Tag/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function __construct()
/**
* Add to layout accordion block
*
* @return Mage_Adminhtml_Block_Tag_Edit
* @return $this
*/
protected function _prepareLayout()
{
Expand Down
5 changes: 1 addition & 4 deletions app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ class Mage_Adminhtml_Block_Urlrewrite_Edit extends Mage_Adminhtml_Block_Widget_C
protected $_buttonsHtml;

/**
* Prepare page layout, basing on different registry and request variables
*
* Generates layout of: creation modes selector, products grid, categories tree, urlrewrite edit form
* @return $this
* @inheritDoc
*/
protected function _prepareLayout()
{
Expand Down
4 changes: 2 additions & 2 deletions app/code/core/Mage/Adminhtml/Block/Widget/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ public function getLastColumnId()
}

/**
* @return int|void
* @return int
*/
public function getColumnCount()
{
Expand Down Expand Up @@ -1304,7 +1304,7 @@ protected function _exportExcelItem(Varien_Object $item, Varien_Io_File $adapter
* Return array with keys type and value
*
* @param string $sheetName
* @return string
* @return array
* @throws Exception
*/
public function getExcelFile($sheetName = '')
Expand Down
1 change: 0 additions & 1 deletion app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ public function setDestElementId($elementId)
* @param string $tabId new tab Id
* @param string|array|Varien_Object $tab
* @param string $afterTabId
* @return Mage_Adminhtml_Block_Widget_Tabs
*/
public function addTabAfter($tabId, $tab, $afterTabId)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected function _construct()
/**
* Init layout, menu and breadcrumb
*
* @return Mage_Adminhtml_Sales_CreditmemoController
* @return $this
*/
protected function _initAction()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_Admin_Custompath extends Mage_C
/**
* Check whether redirect should be set
*
* @return Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom
* @return $this
*/
protected function _beforeSave()
{
Expand Down
6 changes: 3 additions & 3 deletions app/code/core/Mage/Adminhtml/Model/System/Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ public function getStoreGroupOptionHash($attribute = 'name')
* Retrieve Website name by Id
*
* @param int $websiteId
* @return string
* @return string|null
*/
public function getWebsiteName($websiteId)
{
Expand All @@ -331,7 +331,7 @@ public function getWebsiteName($websiteId)
* Retrieve Group name by Id
*
* @param int $groupId
* @return string
* @return string|null
*/
public function getGroupName($groupId)
{
Expand All @@ -347,7 +347,7 @@ public function getGroupName($groupId)
* Retrieve Store name by Id
*
* @param int $storeId
* @return string
* @return string|null
*/
public function getStoreName($storeId)
{
Expand Down
2 changes: 0 additions & 2 deletions app/code/core/Mage/Adminhtml/Model/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,6 @@ public function turnOffSecretKey()

/**
* Refresh admin menu cache etc.
*
* @return $this
*/
public function renewSecretUrls()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function preDispatch()
/**
* Init actions
*
* @return Mage_Adminhtml_Cms_PageController
* @return $this
*/
protected function _initAction()
{
Expand Down
Loading