Skip to content

Commit 7526749

Browse files
authored
Replace alias methods (#1394)
- join vs implode - is_integer vs is_int - ...
1 parent 419518e commit 7526749

File tree

74 files changed

+122
-122
lines changed

Some content is hidden

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

74 files changed

+122
-122
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ public function getStartupPageUrl()
563563
$startupPage = Mage::getStoreConfig(self::XML_PATH_STARTUP_PAGE);
564564
$aclResource = 'admin/' . $startupPage;
565565
if (Mage::getSingleton('admin/session')->isAllowed($aclResource)) {
566-
$nodePath = 'menu/' . join('/children/', explode('/', $startupPage)) . '/action';
566+
$nodePath = 'menu/' . implode('/children/', explode('/', $startupPage)) . '/action';
567567
$url = (string)Mage::getSingleton('admin/config')->getAdminhtmlConfig()->getNode($nodePath);
568568
if ($url) {
569569
return $url;

app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function render(Varien_Data_Form_Element_Abstract $element)
120120
}
121121
}
122122
}
123-
$defText = join(', ', $defTextArr);
123+
$defText = implode(', ', $defTextArr);
124124
}
125125

126126
// default value

app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Matrix.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ protected function _prepareRates($array)
8686
$parts = explode('.', $value);
8787
if( count($parts) === 2 ) {
8888
$parts[1] = str_pad(rtrim($parts[1], 0), 4, '0', STR_PAD_RIGHT);
89-
$array[$key][$code] = join('.', $parts);
89+
$array[$key][$code] = implode('.', $parts);
9090
} elseif( $value > 0 ) {
9191
$array[$key][$code] = number_format($value, 4);
9292
} else {

app/code/core/Mage/Adminhtml/Block/System/Store/Store.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function getGridHtml()
8585
*/
8686
public function getAddNewButtonHtml()
8787
{
88-
return join(' ', array(
88+
return implode(' ', array(
8989
$this->getChildHtml('add_new_website'),
9090
$this->getChildHtml('add_new_group'),
9191
$this->getChildHtml('add_new_store')

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function render(Varien_Object $row)
5050
$dataArr[] = $data;
5151
}
5252
}
53-
$data = join($this->getColumn()->getSeparator(), $dataArr);
53+
$data = implode($this->getColumn()->getSeparator(), $dataArr);
5454
// TODO run column type renderer
5555
return $data;
5656
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public function getSelectedJson()
191191
{
192192
if($selected = $this->getRequest()->getParam($this->getFormFieldNameInternal())) {
193193
$selected = explode(',', $this->quoteEscape($selected));
194-
return join(',', $selected);
194+
return implode(',', $selected);
195195
} else {
196196
return '';
197197
}
@@ -243,7 +243,7 @@ public function getGridIdsJson()
243243
$gridIds = $this->getParentBlock()->getCollection()->getAllIds();
244244

245245
if(!empty($gridIds)) {
246-
return join(",", $gridIds);
246+
return implode(",", $gridIds);
247247
}
248248
return '';
249249
}

app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Allow.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected function _afterSave()
5656
}
5757

5858
if ($exceptions) {
59-
Mage::throwException(join("\n", $exceptions));
59+
Mage::throwException(implode("\n", $exceptions));
6060
}
6161

6262
return $this;

app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Cron.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ protected function _afterSave()
5252
($frequency == $frequencyWeekly) ? '1' : '*', # Day of the Week
5353
);
5454

55-
$cronExprString = join(' ', $cronExprArray);
55+
$cronExprString = implode(' ', $cronExprArray);
5656

5757
try {
5858
Mage::getModel('core/config_data')

app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ protected function _afterSave()
138138
}
139139
}
140140
if ($exceptions) {
141-
Mage::throwException(join("\n", $exceptions));
141+
Mage::throwException(implode("\n", $exceptions));
142142
}
143143

144144
return $this;

app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Log/Cron.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ protected function _afterSave()
5959
'*', # Month of the Year
6060
($frequency == $frequencyWeekly) ? '1' : '*', # Day of the Week
6161
);
62-
$cronExprString = join(' ', $cronExprArray);
62+
$cronExprString = implode(' ', $cronExprArray);
6363
}
6464
else {
6565
$cronExprString = '';

0 commit comments

Comments
 (0)