Skip to content

Commit 8641467

Browse files
authored
Phpdocs/phpstan update (OpenMage#2596)
1 parent 7358174 commit 8641467

File tree

113 files changed

+143
-193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+143
-193
lines changed

.github/phpstan-baseline.neon

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -385,11 +385,6 @@ parameters:
385385
count: 1
386386
path: ../app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php
387387

388-
-
389-
message: "#^Method Mage_Adminhtml_Block_Widget_Tabs\\:\\:addTabAfter\\(\\) should return Mage_Adminhtml_Block_Widget_Tabs but return statement is missing\\.$#"
390-
count: 1
391-
path: ../app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php
392-
393388
-
394389
message: "#^PHPDoc tag @param references unknown parameter\\: \\$tabNId$#"
395390
count: 1
@@ -450,11 +445,6 @@ parameters:
450445
count: 1
451446
path: ../app/code/core/Mage/Adminhtml/Model/System/Store.php
452447

453-
-
454-
message: "#^Method Mage_Adminhtml_Model_Url\\:\\:renewSecretUrls\\(\\) should return \\$this\\(Mage_Adminhtml_Model_Url\\) but return statement is missing\\.$#"
455-
count: 1
456-
path: ../app/code/core/Mage/Adminhtml/Model/Url.php
457-
458448
-
459449
message: "#^Method Mage_Adminhtml_Controller_Action\\:\\:_setForcedFormKeyActions\\(\\) invoked with 2 parameters, 1 required\\.$#"
460450
count: 1
@@ -700,11 +690,6 @@ parameters:
700690
count: 1
701691
path: ../app/code/core/Mage/Api2/Model/Route/ApiType.php
702692

703-
-
704-
message: "#^Call to an undefined method Mage_Payment_Model_Info\\:\\:authorize\\(\\)\\.$#"
705-
count: 1
706-
path: ../app/code/core/Mage/Authorizenet/Model/Directpost.php
707-
708693
-
709694
message: "#^Call to an undefined method Varien_Object\\:\\:decrypt\\(\\)\\.$#"
710695
count: 1
@@ -715,11 +700,6 @@ parameters:
715700
count: 1
716701
path: ../app/code/core/Mage/Authorizenet/Model/Directpost.php
717702

718-
-
719-
message: "#^Method Mage_Authorizenet_Model_Directpost\\:\\:authorize\\(\\) should return Mage_Paygate_Model_Authorizenet but return statement is missing\\.$#"
720-
count: 1
721-
path: ../app/code/core/Mage/Authorizenet/Model/Directpost.php
722-
723703
-
724704
message: "#^Method Mage_Authorizenet_Model_Directpost\\:\\:initialize\\(\\) should return \\$this\\(Mage_Authorizenet_Model_Directpost\\) but return statement is missing\\.$#"
725705
count: 1
@@ -1820,11 +1800,6 @@ parameters:
18201800
count: 2
18211801
path: ../app/code/core/Mage/Dataflow/Model/Profile.php
18221802

1823-
-
1824-
message: "#^Binary operation \"\\*\" between float and non\\-falsy\\-string results in an error\\.$#"
1825-
count: 1
1826-
path: ../app/code/core/Mage/Directory/Model/Currency.php
1827-
18281803
-
18291804
message: "#^Variable \\$response might not be defined\\.$#"
18301805
count: 1
@@ -2370,11 +2345,6 @@ parameters:
23702345
count: 1
23712346
path: ../app/code/core/Mage/Paypal/Model/Ipn.php
23722347

2373-
-
2374-
message: "#^Method Mage_Paypal_Model_Observer\\:\\:fetchReports\\(\\) should return \\$this\\(Mage_Paypal_Model_Observer\\) but return statement is missing\\.$#"
2375-
count: 1
2376-
path: ../app/code/core/Mage/Paypal/Model/Observer.php
2377-
23782348
-
23792349
message: "#^Variable \\$order in empty\\(\\) always exists and is not falsy\\.$#"
23802350
count: 1

app/code/core/Mage/Admin/Model/Resource/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ public function deleteFromRole(Mage_Core_Model_Abstract $user)
378378
* Check if role user exists
379379
*
380380
* @param Mage_Core_Model_Abstract|Mage_Admin_Model_User $user
381-
* @return array|false
381+
* @return array
382382
*/
383383
public function roleUserExists(Mage_Core_Model_Abstract $user)
384384
{

app/code/core/Mage/Admin/Model/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ public function loadByUsername($username)
471471
* Check if user is assigned to any role
472472
*
473473
* @param int|Mage_Admin_Model_User $user
474-
* @return null|bool|array
474+
* @return array|null
475475
*/
476476
public function hasAssigned2Role($user)
477477
{

app/code/core/Mage/Adminhtml/Block/Catalog/Product.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ public function __construct()
3737
}
3838

3939
/**
40-
* Prepare button and grid
41-
*
42-
* @return $this
40+
* @inheritDoc
4341
*/
4442
protected function _prepareLayout()
4543
{

app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ protected function isSingleStoreMode()
223223
/**
224224
* Getter for id of current store (the only one in single-store mode and current in multi-stores mode)
225225
*
226-
* @return bool
226+
* @return int
227227
*/
228228
protected function getStoreId()
229229
{

app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ public function getDeleteUrl()
314314
/**
315315
* Retrieve Save As Flag
316316
*
317-
* @return int
317+
* @return string
318318
*/
319319
public function getSaveAsFlag()
320320
{
@@ -334,7 +334,7 @@ protected function isSingleStoreMode()
334334
/**
335335
* Getter for id of current store (the only one in single-store mode and current in multi-stores mode)
336336
*
337-
* @return bool
337+
* @return int
338338
*/
339339
protected function getStoreId()
340340
{

app/code/core/Mage/Adminhtml/Block/Page/Head.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function getFormKey()
4848
/**
4949
* Retrieve Timeout Delay from Config
5050
*
51-
* @return string
51+
* @return int
5252
*/
5353
public function getLoadingTimeout()
5454
{

app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesedit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function getResTreeJson()
154154
*
155155
* @param array $a
156156
* @param array $b
157-
* @return bool
157+
* @return int
158158
*/
159159
protected function _sortTree($a, $b)
160160
{

app/code/core/Mage/Adminhtml/Block/Sales/Order/Address/Form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected function _getAddress()
4747
/**
4848
* Define form attributes (id, method, action)
4949
*
50-
* @return Mage_Adminhtml_Block_Sales_Order_Create_Billing_Address
50+
* @return $this
5151
*/
5252
protected function _prepareForm()
5353
{

app/code/core/Mage/Adminhtml/Block/Sales/Order/Comments/View.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ protected function _beforeToHtml()
4040
}
4141

4242
/**
43-
* Prepare child blocks
44-
*
45-
* @return Mage_Adminhtml_Block_Sales_Order_Invoice_Create_Items
43+
* @inheritDoc
4644
*/
4745
protected function _prepareLayout()
4846
{

0 commit comments

Comments
 (0)