Skip to content

Commit 5a3e2c3

Browse files
authored
PHPDocs: Undefined methods (OpenMage#2613)
1 parent 37642ed commit 5a3e2c3

File tree

56 files changed

+248
-173
lines changed

Some content is hidden

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

56 files changed

+248
-173
lines changed

app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid/Renderer/Action.php

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,24 @@
2727
*/
2828
class Mage_Adminhtml_Block_Newsletter_Queue_Grid_Renderer_Action extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action
2929
{
30+
/**
31+
* @param Mage_Newsletter_Model_Queue $row
32+
* @return string
33+
*/
3034
public function render(Varien_Object $row)
3135
{
3236
$actions = [];
3337

34-
if($row->getQueueStatus()==Mage_Newsletter_Model_Queue::STATUS_NEVER) {
35-
if(!$row->getQueueStartAt() && $row->getSubscribersTotal()) {
38+
if ($row->getQueueStatus() == Mage_Newsletter_Model_Queue::STATUS_NEVER) {
39+
if (!$row->getQueueStartAt() && $row->getSubscribersTotal()) {
3640
$actions[] = [
37-
'url' => $this->getUrl('*/*/start', ['id'=>$row->getId()]),
41+
'url' => $this->getUrl('*/*/start', ['id'=>$row->getId()]),
3842
'caption' => Mage::helper('newsletter')->__('Start')
3943
];
4044
}
41-
} else if ($row->getQueueStatus()==Mage_Newsletter_Model_Queue::STATUS_SENDING) {
45+
} elseif ($row->getQueueStatus() == Mage_Newsletter_Model_Queue::STATUS_SENDING) {
4246
$actions[] = [
43-
'url' => $this->getUrl('*/*/pause', ['id'=>$row->getId()]),
47+
'url' => $this->getUrl('*/*/pause', ['id'=>$row->getId()]),
4448
'caption' => Mage::helper('newsletter')->__('Pause')
4549
];
4650

@@ -49,14 +53,11 @@ public function render(Varien_Object $row)
4953
'confirm' => Mage::helper('newsletter')->__('Do you really want to cancel the queue?'),
5054
'caption' => Mage::helper('newsletter')->__('Cancel')
5155
];
52-
53-
} else if ($row->getQueueStatus()==Mage_Newsletter_Model_Queue::STATUS_PAUSE) {
54-
56+
} elseif ($row->getQueueStatus() == Mage_Newsletter_Model_Queue::STATUS_PAUSE) {
5557
$actions[] = [
56-
'url' => $this->getUrl('*/*/resume', ['id'=>$row->getId()]),
58+
'url' => $this->getUrl('*/*/resume', ['id'=>$row->getId()]),
5759
'caption' => Mage::helper('newsletter')->__('Resume')
5860
];
59-
6061
}
6162

6263
$actions[] = [

app/code/core/Mage/Adminhtml/Block/Widget/Grid.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
* @category Mage
2525
* @package Mage_Adminhtml
2626
* @author Magento Core Team <core@magentocommerce.com>
27+
*
28+
* @method $this setSortable(bool $value)
29+
* @method $this setUseAjax(bool $value)
2730
*/
2831
class Mage_Adminhtml_Block_Widget_Grid extends Mage_Adminhtml_Block_Widget
2932
{
@@ -83,7 +86,7 @@ class Mage_Adminhtml_Block_Widget_Grid extends Mage_Adminhtml_Block_Widget
8386
*/
8487
protected $_emptyText;
8588

86-
/**
89+
/**
8790
* Empty grid text CSS class
8891
*
8992
* @var string|null

app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@
2424
* @category Mage
2525
* @package Mage_Adminhtml
2626
* @author Magento Core Team <core@magentocommerce.com>
27+
*
28+
* @method array getActions()
29+
* @method $this setActions(array $value)
30+
* @method array getFilterConditionCallback()
31+
* @method string getDir()
32+
* @method string getFilterIndex()
33+
* @method $this setFormat(string $value)
34+
* @method string getIndex()
35+
* @method bool getNoLink()
2736
*/
2837
class Mage_Adminhtml_Block_Widget_Grid_Column extends Mage_Adminhtml_Block_Widget
2938
{

app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Action.php

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
* @package Mage_Adminhtml
2626
* @author Magento Core Team <core@magentocommerce.com>
2727
*/
28-
class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action
29-
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Text
28+
class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Text
3029
{
3130
/**
3231
* Renders column
@@ -37,13 +36,13 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action
3736
public function render(Varien_Object $row)
3837
{
3938
$actions = $this->getColumn()->getActions();
40-
if ( empty($actions) || !is_array($actions) ) {
39+
if (empty($actions) || !is_array($actions)) {
4140
return '&nbsp;';
4241
}
4342

44-
if(count($actions) === 1 && !$this->getColumn()->getNoLink()) {
43+
if (count($actions) === 1 && !$this->getColumn()->getNoLink()) {
4544
foreach ($actions as $action) {
46-
if ( is_array($action) ) {
45+
if (is_array($action)) {
4746
return $this->_toLinkHtml($action, $row);
4847
}
4948
}
@@ -52,9 +51,9 @@ public function render(Varien_Object $row)
5251
$out = '<select class="action-select" onchange="varienGridAction.execute(this);">'
5352
. '<option value=""></option>';
5453
$i = 0;
55-
foreach ($actions as $action){
54+
foreach ($actions as $action) {
5655
$i++;
57-
if ( is_array($action) ) {
56+
if (is_array($action)) {
5857
$out .= $this->_toOptionHtml($action, $row);
5958
}
6059
}
@@ -95,7 +94,7 @@ protected function _toLinkHtml($action, Varien_Object $row)
9594
$actionCaption = '';
9695
$this->_transformActionData($action, $actionCaption, $row);
9796

98-
if(isset($action['confirm'])) {
97+
if (isset($action['confirm'])) {
9998
$action['onclick'] = 'return window.confirm(\''
10099
. addslashes($this->escapeHtml($action['confirm']))
101100
. '\')';
@@ -116,8 +115,8 @@ protected function _toLinkHtml($action, Varien_Object $row)
116115
*/
117116
protected function _transformActionData(&$action, &$actionCaption, Varien_Object $row)
118117
{
119-
foreach ( $action as $attribute => $value ) {
120-
if(isset($action[$attribute]) && !is_array($action[$attribute])) {
118+
foreach ($action as $attribute => $value) {
119+
if (isset($action[$attribute]) && !is_array($action[$attribute])) {
121120
$this->getColumn()->setFormat($action[$attribute]);
122121
$action[$attribute] = parent::render($row);
123122
} else {
@@ -128,12 +127,12 @@ protected function _transformActionData(&$action, &$actionCaption, Varien_Object
128127
case 'caption':
129128
$actionCaption = $action['caption'];
130129
unset($action['caption']);
131-
break;
130+
break;
132131

133132
case 'url':
134-
if(is_array($action['url'])) {
133+
if (is_array($action['url'])) {
135134
$params = [$action['field']=>$this->_getValue($row)];
136-
if(isset($action['url']['params'])) {
135+
if (isset($action['url']['params'])) {
137136
$params = array_merge($action['url']['params'], $params);
138137
}
139138
$action['href'] = $this->getUrl($action['url']['base'], $params);
@@ -142,13 +141,12 @@ protected function _transformActionData(&$action, &$actionCaption, Varien_Object
142141
$action['href'] = $action['url'];
143142
}
144143
unset($action['url']);
145-
break;
144+
break;
146145

147146
case 'popup':
148147
$action['onclick'] =
149148
'popWin(this.href,\'_blank\',\'width=800,height=700,resizable=1,scrollbars=1\');return false;';
150149
break;
151-
152150
}
153151
}
154152
return $this;

app/code/core/Mage/Adminhtml/Helper/Addresses.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Mage_Adminhtml_Helper_Addresses extends Mage_Core_Helper_Abstract
3737
*/
3838
public function processStreetAttribute(Mage_Customer_Model_Attribute $attribute)
3939
{
40-
if($attribute->getScopeMultilineCount() <= 0) {
40+
if ($attribute->getScopeMultilineCount() <= 0) {
4141
$attribute->setScopeMultilineCount(self::DEFAULT_STREET_LINES_COUNT);
4242
}
4343
return $attribute;

app/code/core/Mage/Adminhtml/Helper/Catalog/Product/Composite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*/
2828
class Mage_Adminhtml_Helper_Catalog_Product_Composite extends Mage_Core_Helper_Abstract
2929
{
30-
/**
30+
/**
3131
* Init layout of product configuration update result
3232
*
3333
* @param Mage_Adminhtml_Controller_Action $controller

app/code/core/Mage/Adminhtml/Helper/Dashboard/Abstract.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ abstract class Mage_Adminhtml_Helper_Dashboard_Abstract extends Mage_Core_Helper
3232
*
3333
* @var Mage_Core_Model_Resource_Db_Collection_Abstract|Mage_Eav_Model_Entity_Collection_Abstract|array
3434
*/
35-
protected $_collection;
35+
protected $_collection;
3636

3737
/**
3838
* Parameters for helper
3939
*
4040
* @var array
4141
*/
42-
protected $_params = [];
42+
protected $_params = [];
4343

4444
public function getCollection()
4545
{
@@ -49,7 +49,7 @@ public function getCollection()
4949
return $this->_collection;
5050
}
5151

52-
abstract protected function _initCollection();
52+
abstract protected function _initCollection();
5353

5454
/**
5555
* Returns collection items
@@ -71,7 +71,7 @@ public function getColumn($index)
7171
$result = [];
7272
foreach ($this->getItems() as $item) {
7373
if (is_array($item)) {
74-
if(isset($item[$index])) {
74+
if (isset($item[$index])) {
7575
$result[] = $item[$index];
7676
} else {
7777
$result[] = null;

app/code/core/Mage/Adminhtml/Helper/Dashboard/Data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Mage_Adminhtml_Helper_Dashboard_Data extends Mage_Core_Helper_Data
3737
*/
3838
public function getStores()
3939
{
40-
if(!$this->_stores) {
40+
if (!$this->_stores) {
4141
$this->_stores = Mage::app()->getStore()->getResourceCollection()->load();
4242
}
4343

app/code/core/Mage/Adminhtml/Helper/Dashboard/Order.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,15 @@ protected function _initCollection()
3636

3737
if ($this->getParam('store')) {
3838
$this->_collection->addFieldToFilter('store_id', $this->getParam('store'));
39-
} else if ($this->getParam('website')){
39+
} elseif ($this->getParam('website')) {
4040
$storeIds = Mage::app()->getWebsite($this->getParam('website'))->getStoreIds();
4141
$this->_collection->addFieldToFilter('store_id', ['in' => implode(',', $storeIds)]);
42-
} else if ($this->getParam('group')){
42+
} elseif ($this->getParam('group')) {
4343
$storeIds = Mage::app()->getGroup($this->getParam('group'))->getStoreIds();
4444
$this->_collection->addFieldToFilter('store_id', ['in' => implode(',', $storeIds)]);
4545
} elseif (!$this->_collection->isLive()) {
46-
$this->_collection->addFieldToFilter('store_id',
46+
$this->_collection->addFieldToFilter(
47+
'store_id',
4748
['eq' => Mage::app()->getStore(Mage_Core_Model_Store::ADMIN_CODE)->getId()]
4849
);
4950
}

app/code/core/Mage/Adminhtml/Helper/Help/Mapping.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ abstract class Mage_Adminhtml_Helper_Help_Mapping extends Mage_Core_Helper_Abstr
218218
*/
219219
protected function findInMapping($frontModule, $controllerName, $actionName)
220220
{
221-
if ($actionName === 'index' ) {
221+
if ($actionName === 'index') {
222222
$targetToFind = $controllerName;
223223
} else {
224224
$targetToFind = $controllerName . '/' . $actionName;

0 commit comments

Comments
 (0)