Skip to content

Commit

Permalink
PHPCS
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano committed Sep 19, 2024
1 parent 8e085f9 commit 01a5dbb
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 35 deletions.
4 changes: 2 additions & 2 deletions app/code/core/Mage/Adminhtml/Model/Customer/Observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function customerAttributeEditPrepareForm($observer)
$fieldset = $form->getElement('base_fieldset');

// frontend properties fieldset
$fieldset = $form->addFieldset('front_fieldset', ['legend'=>Mage::helper('adminhtml')->__('Extra Properties')]);
$fieldset = $form->addFieldset('front_fieldset', ['legend' => Mage::helper('adminhtml')->__('Extra Properties')]);

$fieldset->addField('use_in_forms', 'multiselect', [
'name' => 'use_in_forms',
Expand Down Expand Up @@ -92,7 +92,7 @@ public function customerAddressAttributeEditPrepareForm($observer)
$fieldset = $form->getElement('base_fieldset');

// frontend properties fieldset
$fieldset = $form->addFieldset('front_fieldset', ['legend'=>Mage::helper('adminhtml')->__('Extra Properties')]);
$fieldset = $form->addFieldset('front_fieldset', ['legend' => Mage::helper('adminhtml')->__('Extra Properties')]);

$fieldset->addField('use_in_forms', 'multiselect', [
'name' => 'use_in_forms',
Expand Down
4 changes: 2 additions & 2 deletions app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ public function getHeaderText()

public function getValidationUrl()
{
return $this->getUrl('*/*/validate', ['_current'=>true]);
return $this->getUrl('*/*/validate', ['_current' => true]);
}

public function getSaveUrl()
{
return $this->getUrl('*/*/save', ['_current'=>true, 'back'=>null]);
return $this->getUrl('*/*/save', ['_current' => true, 'back' => null]);
}

public function getHeaderCssClass()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected function _prepareForm()

$response = new Varien_Object();
$response->setTypes([]);
Mage::dispatchEvent("adminhtml_{$attributeTypeCode}_attribute_types", ['response'=>$response]);
Mage::dispatchEvent("adminhtml_{$attributeTypeCode}_attribute_types", ['response' => $response]);
$_disabledTypes = [];
$_hiddenFields = [];
foreach ($response->getTypes() as $type) {
Expand All @@ -73,9 +73,9 @@ protected function _prepareForm()
$frontendInputElm->setValues($frontendInputValues);

$scopes = [
Mage_Eav_Model_Entity_Attribute::SCOPE_STORE =>Mage::helper('eav')->__('Store View'),
Mage_Eav_Model_Entity_Attribute::SCOPE_WEBSITE =>Mage::helper('eav')->__('Website'),
Mage_Eav_Model_Entity_Attribute::SCOPE_GLOBAL =>Mage::helper('eav')->__('Global'),
Mage_Eav_Model_Entity_Attribute::SCOPE_STORE => Mage::helper('eav')->__('Store View'),
Mage_Eav_Model_Entity_Attribute::SCOPE_WEBSITE => Mage::helper('eav')->__('Website'),
Mage_Eav_Model_Entity_Attribute::SCOPE_GLOBAL => Mage::helper('eav')->__('Global'),
];

if ($attributeObject->getAttributeCode() == 'status') {
Expand All @@ -85,14 +85,14 @@ protected function _prepareForm()
$response = new Varien_Object();
$response->setScopes($scopes);
$response->setAttribute($attributeObject);
Mage::dispatchEvent("adminhtml_{$attributeTypeCode}_attribute_scopes", ['response'=>$response]);
Mage::dispatchEvent("adminhtml_{$attributeTypeCode}_attribute_scopes", ['response' => $response]);

$fieldset->addField('is_global', 'select', [
'name' => 'is_global',
'label' => Mage::helper('eav')->__('Scope'),
'title' => Mage::helper('eav')->__('Scope'),
'note' => Mage::helper('eav')->__('Declare attribute value saving scope'),
'values'=> $response->getScopes(),
'values' => $response->getScopes(),
], 'attribute_code');

Mage::dispatchEvent("adminhtml_{$attributeTypeCode}_attribute_edit_prepare_form", [
Expand Down
12 changes: 6 additions & 6 deletions app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ protected function _prepareColumns()
parent::_prepareColumns();

$this->addColumn('is_global', [
'header'=>Mage::helper('eav')->__('Scope'),
'sortable'=>true,
'index'=>'is_global',
'header' => Mage::helper('eav')->__('Scope'),
'sortable' => true,
'index' => 'is_global',
'type' => 'options',
'options' => [
Mage_Eav_Model_Entity_Attribute::SCOPE_STORE =>Mage::helper('eav')->__('Store View'),
Mage_Eav_Model_Entity_Attribute::SCOPE_WEBSITE =>Mage::helper('eav')->__('Website'),
Mage_Eav_Model_Entity_Attribute::SCOPE_GLOBAL =>Mage::helper('eav')->__('Global'),
Mage_Eav_Model_Entity_Attribute::SCOPE_STORE => Mage::helper('eav')->__('Store View'),
Mage_Eav_Model_Entity_Attribute::SCOPE_WEBSITE => Mage::helper('eav')->__('Website'),
Mage_Eav_Model_Entity_Attribute::SCOPE_GLOBAL => Mage::helper('eav')->__('Global'),
],
'align' => 'center',
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ protected function _prepareColumns()

public function getRowUrl($row)
{
return $this->getUrl('*/*/edit', ['id'=>$row->getAttributeSetId()]);
return $this->getUrl('*/*/edit', ['id' => $row->getAttributeSetId()]);
}
}
14 changes: 7 additions & 7 deletions app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected function _prepareLayout()
'label' => Mage::helper('eav')->__('Delete Selected Group'),
'onclick' => 'editSet.submit();',
'class' => 'delete'
])
])
);

$this->setChild(
Expand All @@ -56,7 +56,7 @@ protected function _prepareLayout()
'label' => Mage::helper('eav')->__('Add New'),
'onclick' => 'editSet.addGroup();',
'class' => 'add'
])
])
);

$this->setChild(
Expand All @@ -65,15 +65,15 @@ protected function _prepareLayout()
'label' => Mage::helper('eav')->__('Back'),
'onclick' => 'setLocation(\'' . $this->getUrl('*/*/') . '\')',
'class' => 'back'
])
])
);

$this->setChild(
'reset_button',
$this->getLayout()->createBlock('adminhtml/widget_button')->setData([
'label' => Mage::helper('eav')->__('Reset'),
'onclick' => 'window.location.reload()'
])
])
);

$this->setChild(
Expand All @@ -82,7 +82,7 @@ protected function _prepareLayout()
'label' => Mage::helper('eav')->__('Save Attribute Set'),
'onclick' => 'editSet.save();',
'class' => 'save'
])
])
);

if ($entity_type = Mage::registry('entity_type')) {
Expand All @@ -99,15 +99,15 @@ protected function _prepareLayout()
'label' => Mage::helper('eav')->__('Delete Attribute Set'),
'onclick' => 'deleteConfirm(\'' . $deleteConfirmMessage . '\', \'' . $deleteUrl . '\')',
'class' => 'delete'
])
])
);

$this->setChild(
'rename_button',
$this->getLayout()->createBlock('adminhtml/widget_button')->setData([
'label' => Mage::helper('eav')->__('New Set Name'),
'onclick' => 'editSet.rename()'
])
])
);

return parent::_prepareLayout();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ protected function _prepareForm()
{
$form = new Varien_Data_Form();

$fieldset = $form->addFieldset('set_fieldset', ['legend'=>Mage::helper('eav')->__('Add New Attribute')]);
$fieldset = $form->addFieldset('set_fieldset', ['legend' => Mage::helper('eav')->__('Add New Attribute')]);

$fieldset->addField(
'new_attribute',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ protected function _prepareForm()
{
$form = new Varien_Data_Form();

$fieldset = $form->addFieldset('set_fieldset', ['legend'=>Mage::helper('eav')->__('Add New Group')]);
$fieldset = $form->addFieldset('set_fieldset', ['legend' => Mage::helper('eav')->__('Add New Group')]);

$fieldset->addField(
'attribute_group_name',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protected function _prepareForm()
->load($this->getRequest()->getParam('id'));

$form = new Varien_Data_Form();
$fieldset = $form->addFieldset('set_name', ['legend'=> Mage::helper('eav')->__('Edit Set Name')]);
$fieldset = $form->addFieldset('set_name', ['legend' => Mage::helper('eav')->__('Edit Set Name')]);
$fieldset->addField('attribute_set_name', 'text', [
'label' => Mage::helper('eav')->__('Name'),
'note' => Mage::helper('eav')->__('For internal use.'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ protected function _prepareLayout()
'save_button',
$this->getLayout()->createBlock('adminhtml/widget_button')
->setData([
'label' => Mage::helper('eav')->__('Save Attribute Set'),
'onclick' => 'if (addSet.submit()) disableElements(\'save\');',
'label' => Mage::helper('eav')->__('Save Attribute Set'),
'onclick' => 'if (addSet.submit()) disableElements(\'save\');',
'class' => 'save'
])
])
);
$this->setChild(
'back_button',
$this->getLayout()->createBlock('adminhtml/widget_button')
->setData([
'label' => Mage::helper('eav')->__('Back'),
'onclick' => 'setLocation(\'' . $this->getUrl('*/*/') . '\')',
'label' => Mage::helper('eav')->__('Back'),
'onclick' => 'setLocation(\'' . $this->getUrl('*/*/') . '\')',
'class' => 'back'
])
])
);

$this->setChild(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
class Mage_Eav_Block_Adminhtml_Helper_Form_Boolean extends Varien_Data_Form_Element_Select
{
public function __construct($attributes=[])
public function __construct($attributes = [])
{
parent::__construct($attributes);
$this->setValues([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public function saveAction()
Mage::app()->cleanCache([Mage_Core_Model_Translate::CACHE_TAG]);
$session->setAttributeData(false);
if ($redirectBack) {
$this->_redirect('*/*/edit', ['attribute_id' => $model->getId(),'_current'=>true]);
$this->_redirect('*/*/edit', ['attribute_id' => $model->getId(),'_current' => true]);
} else {
$this->_redirect('*/*/', []);
}
Expand Down

0 comments on commit 01a5dbb

Please sign in to comment.