Skip to content

Commit 22c870a

Browse files
authored
phpcs-fixer: sort more tags, follow symfony sort order (#5081)
1 parent f094b41 commit 22c870a

File tree

613 files changed

+1492
-1599
lines changed

Some content is hidden

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

613 files changed

+1492
-1599
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
// Docblocks should have the same indentation as the documented subject.
2828
'phpdoc_indent' => true,
2929
// Annotations in PHPDoc should be ordered in defined sequence.
30-
'phpdoc_order' => true,
30+
'phpdoc_order' => ['order' => ['param', 'return', 'throws', 'deprecated', 'see', 'SuppressWarnings']],
3131
// Order PHPDoc tags by value.
3232
'phpdoc_order_by_value' => ['annotations' => ['author', 'covers', 'group', 'method', 'throws', 'uses']],
3333
// Orders all @param annotations in DocBlocks according to method signature.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ protected function _construct()
3030
}
3131

3232
/**
33+
* @return array|true
3334
* @throws Exception
3435
* @throws Zend_Validate_Exception
35-
* @return array|true
3636
*/
3737
public function validate()
3838
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ public function actionPreDispatchAdmin($observer)
9696
/**
9797
* Unset session first visit flag after displaying page
9898
*
99-
* @deprecated after 1.4.0.1, logic moved to admin session
10099
* @param Varien_Event_Observer $event
100+
* @deprecated after 1.4.0.1, logic moved to admin session
101101
*/
102102
public function actionPostDispatchAdmin($event) {}
103103

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ protected function _construct()
4040
* Process role before saving
4141
*
4242
* @param Mage_Admin_Model_Roles $object
43-
* @throws Mage_Core_Exception
4443
* @return $this
44+
* @throws Mage_Core_Exception
4545
*/
4646
protected function _beforeSave(Mage_Core_Model_Abstract $object)
4747
{
@@ -77,8 +77,8 @@ protected function _beforeSave(Mage_Core_Model_Abstract $object)
7777
* Process role after saving
7878
*
7979
* @param Mage_Admin_Model_Roles $object
80-
* @throws Zend_Cache_Exception
8180
* @return $this
81+
* @throws Zend_Cache_Exception
8282
*/
8383
protected function _afterSave(Mage_Core_Model_Abstract $object)
8484
{
@@ -94,8 +94,8 @@ protected function _afterSave(Mage_Core_Model_Abstract $object)
9494
* Process role after deleting
9595
*
9696
* @param Mage_Admin_Model_Roles $object
97-
* @throws Mage_Core_Exception
9897
* @return $this
98+
* @throws Mage_Core_Exception
9999
*/
100100
protected function _afterDelete(Mage_Core_Model_Abstract $object)
101101
{
@@ -108,8 +108,8 @@ protected function _afterDelete(Mage_Core_Model_Abstract $object)
108108
/**
109109
* Get role users
110110
*
111-
* @throws Mage_Core_Exception
112111
* @return array
112+
* @throws Mage_Core_Exception
113113
*/
114114
public function getRoleUsers(Mage_Admin_Model_Roles $role)
115115
{
@@ -125,9 +125,9 @@ public function getRoleUsers(Mage_Admin_Model_Roles $role)
125125
/**
126126
* Update role users
127127
*
128+
* @return bool
128129
* @throws Mage_Core_Exception
129130
* @throws Zend_Db_Adapter_Exception
130-
* @return bool
131131
*/
132132
private function _updateRoleUsersAcl(Mage_Admin_Model_Roles $role)
133133
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ public function saveRel(Mage_Admin_Model_Rules $rule)
7474

7575
/**
7676
* Set resource ID as ID field name
77-
* @see Mage_Adminhtml_Block_Permissions_OrphanedResource_Grid::_prepareCollection()
7877
*
7978
* @return $this
79+
* @see Mage_Adminhtml_Block_Permissions_OrphanedResource_Grid::_prepareCollection()
8080
*/
8181
public function setResourceIdAsIdFieldName()
8282
{

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ protected function _afterLoad(Mage_Core_Model_Abstract $user)
157157
/**
158158
* Delete user role record with user
159159
*
160-
* @throws Exception
161160
* @return $this
161+
* @throws Exception
162162
*/
163163
public function delete(Mage_Core_Model_Abstract $user)
164164
{
@@ -187,9 +187,9 @@ public function delete(Mage_Core_Model_Abstract $user)
187187
/**
188188
* TODO: unify _saveRelations() and add() methods, they make same things
189189
*
190+
* @return $this|Mage_Core_Model_Abstract
190191
* @throws Mage_Core_Exception
191192
* @throws Zend_Db_Adapter_Exception
192-
* @return $this|Mage_Core_Model_Abstract
193193
*/
194194
public function _saveRelations(Mage_Core_Model_Abstract $user)
195195
{

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ public function saveExtra($data)
202202
/**
203203
* Save user roles
204204
*
205-
* @throws Mage_Core_Exception
206205
* @return $this
206+
* @throws Mage_Core_Exception
207207
*/
208208
public function saveRelations()
209209
{
@@ -366,8 +366,8 @@ public function getAclRole()
366366
*
367367
* @param string $username
368368
* @param string $password
369-
* @throws Mage_Core_Exception
370369
* @return bool
370+
* @throws Mage_Core_Exception
371371
*/
372372
public function authenticate($username, $password)
373373
{
@@ -425,8 +425,8 @@ public function validatePasswordHash(string $string1, string $string2): bool
425425
*
426426
* @param string $username
427427
* @param string $password
428-
* @throws Mage_Core_Exception
429428
* @return $this
429+
* @throws Mage_Core_Exception
430430
*/
431431
public function login($username, $password)
432432
{
@@ -550,9 +550,9 @@ public function hasAvailableResources()
550550
/**
551551
* Find admin start page url
552552
*
553+
* @return string
553554
* @deprecated Please use getStartupPageUrl() method instead
554555
* @see getStartupPageUrl()
555-
* @return string
556556
*/
557557
public function getStatrupPageUrl()
558558
{
@@ -583,8 +583,8 @@ public function getStartupPageUrl()
583583
* Validate user attribute values.
584584
* Returns TRUE or array of errors.
585585
*
586-
* @throws Zend_Validate_Exception
587586
* @return array|true
587+
* @throws Zend_Validate_Exception
588588
*/
589589
public function validate()
590590
{
@@ -650,8 +650,8 @@ public function validate()
650650
* Returns true or array of errors.
651651
*
652652
* @param string $password
653-
* @throws Zend_Validate_Exception
654653
* @return array|true
654+
* @throws Zend_Validate_Exception
655655
*/
656656
public function validateCurrentPassword($password)
657657
{
@@ -676,8 +676,8 @@ public function validateCurrentPassword($password)
676676
* Stores new reset password link token and its creation time
677677
*
678678
* @param string $newResetPasswordLinkToken
679-
* @throws Mage_Core_Exception
680679
* @return $this
680+
* @throws Mage_Core_Exception
681681
*/
682682
public function changeResetPasswordLinkToken($newResetPasswordLinkToken)
683683
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ protected function _construct()
3030
}
3131

3232
/**
33+
* @return array|bool
3334
* @throws Exception
3435
* @throws Zend_Validate_Exception
35-
* @return array|bool
3636
*/
3737
public function validate()
3838
{

app/code/core/Mage/Adminhtml/Block/Api/Role/Grid/User.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public function __construct()
2828

2929
/**
3030
* @param Mage_Adminhtml_Block_Widget_Grid_Column $column
31-
* @throws Exception
3231
* @return $this
32+
* @throws Exception
3333
*/
3434
protected function _addColumnFilterToCollection($column)
3535
{
@@ -123,8 +123,8 @@ protected function _prepareColumns()
123123
}
124124

125125
/**
126-
* @throws Exception
127126
* @return string
127+
* @throws Exception
128128
*/
129129
public function getGridUrl()
130130
{
@@ -134,8 +134,8 @@ public function getGridUrl()
134134

135135
/**
136136
* @param bool $json
137-
* @throws Exception
138137
* @return array|int|string
138+
* @throws Exception
139139
*/
140140
protected function _getUsers($json = false)
141141
{

app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Roles.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ public function getGridUrl()
9393

9494
/**
9595
* @param bool $json
96-
* @throws Exception
9796
* @return string
97+
* @throws Exception
9898
*/
9999
protected function _getSelectedRoles($json = false)
100100
{

0 commit comments

Comments
 (0)