From 4cf4d00e1156b54a7249a2de9d42f2b228a44c2e Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Thu, 19 Sep 2024 18:21:54 +0200 Subject: [PATCH] phpcbf --- .../Mage/Eav/Block/Adminhtml/Attribute/Edit.php | 4 ++-- .../Block/Adminhtml/Attribute/Edit/Tab/Main.php | 12 ++++++------ .../Mage/Eav/Block/Adminhtml/Attribute/Grid.php | 12 ++++++------ .../Eav/Block/Adminhtml/Attribute/Set/Grid.php | 2 +- .../Eav/Block/Adminhtml/Attribute/Set/Main.php | 14 +++++++------- .../Adminhtml/Attribute/Set/Main/Formattribute.php | 2 +- .../Adminhtml/Attribute/Set/Main/Formgroup.php | 2 +- .../Block/Adminhtml/Attribute/Set/Main/Formset.php | 2 +- .../Block/Adminhtml/Attribute/Set/Toolbar/Add.php | 4 ++-- .../Eav/Block/Adminhtml/Helper/Form/Boolean.php | 2 +- .../Adminhtml/Attribute/AbstractController.php | 2 +- 11 files changed, 29 insertions(+), 29 deletions(-) diff --git a/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Edit.php b/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Edit.php index 3fff53e84aa..92d392313c8 100644 --- a/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Edit.php +++ b/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Edit.php @@ -63,12 +63,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() diff --git a/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Edit/Tab/Main.php b/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Edit/Tab/Main.php index 32de6c2dfbe..53522620493 100644 --- a/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Edit/Tab/Main.php +++ b/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Edit/Tab/Main.php @@ -51,7 +51,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) { @@ -70,9 +70,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') { @@ -82,14 +82,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", [ diff --git a/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Grid.php b/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Grid.php index 71bf067af34..be8ae7e950a 100644 --- a/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Grid.php +++ b/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Grid.php @@ -46,14 +46,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', ]); diff --git a/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Grid.php b/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Grid.php index fcfb5192790..fac71759098 100644 --- a/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Grid.php +++ b/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Grid.php @@ -67,6 +67,6 @@ protected function _prepareColumns() public function getRowUrl($row) { - return $this->getUrl('*/*/edit', ['id'=>$row->getAttributeSetId()]); + return $this->getUrl('*/*/edit', ['id' => $row->getAttributeSetId()]); } } diff --git a/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Main.php b/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Main.php index d9030820eab..179262e8341 100644 --- a/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Main.php +++ b/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Main.php @@ -61,7 +61,7 @@ protected function _prepareLayout() 'label' => Mage::helper('eav')->__('Delete Selected Group'), 'onclick' => 'editSet.submit();', 'class' => 'delete' - ]) + ]) ); $this->setChild( @@ -70,7 +70,7 @@ protected function _prepareLayout() 'label' => Mage::helper('eav')->__('Add New'), 'onclick' => 'editSet.addGroup();', 'class' => 'add' - ]) + ]) ); $this->setChild( @@ -79,7 +79,7 @@ protected function _prepareLayout() 'label' => Mage::helper('eav')->__('Back'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/') . '\')', 'class' => 'back' - ]) + ]) ); $this->setChild( @@ -87,7 +87,7 @@ protected function _prepareLayout() $this->getLayout()->createBlock('adminhtml/widget_button')->setData([ 'label' => Mage::helper('eav')->__('Reset'), 'onclick' => 'window.location.reload()' - ]) + ]) ); $this->setChild( @@ -96,7 +96,7 @@ protected function _prepareLayout() 'label' => Mage::helper('eav')->__('Save Attribute Set'), 'onclick' => 'editSet.save();', 'class' => 'save' - ]) + ]) ); if ($entity_type = Mage::registry('entity_type')) { @@ -113,7 +113,7 @@ protected function _prepareLayout() 'label' => Mage::helper('eav')->__('Delete Attribute Set'), 'onclick' => 'deleteConfirm(\'' . $deleteConfirmMessage . '\', \'' . $deleteUrl . '\')', 'class' => 'delete' - ]) + ]) ); $this->setChild( @@ -121,7 +121,7 @@ protected function _prepareLayout() $this->getLayout()->createBlock('adminhtml/widget_button')->setData([ 'label' => Mage::helper('eav')->__('New Set Name'), 'onclick' => 'editSet.rename()' - ]) + ]) ); return parent::_prepareLayout(); diff --git a/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Main/Formattribute.php b/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Main/Formattribute.php index 5cde32a5924..7c438ff5335 100644 --- a/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Main/Formattribute.php +++ b/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Main/Formattribute.php @@ -35,7 +35,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', diff --git a/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Main/Formgroup.php b/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Main/Formgroup.php index edb52594f03..88d21d333d4 100644 --- a/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Main/Formgroup.php +++ b/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Main/Formgroup.php @@ -35,7 +35,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', diff --git a/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Main/Formset.php b/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Main/Formset.php index dbc3121455a..d84774ba7bf 100644 --- a/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Main/Formset.php +++ b/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Main/Formset.php @@ -41,7 +41,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.'), diff --git a/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Toolbar/Add.php b/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Toolbar/Add.php index bee78224fd7..2e25a997d12 100644 --- a/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Toolbar/Add.php +++ b/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Toolbar/Add.php @@ -41,7 +41,7 @@ protected function _prepareLayout() 'label' => Mage::helper('eav')->__('Save Attribute Set'), 'onclick' => 'if (addSet.submit()) disableElements(\'save\');', 'class' => 'save' - ]) + ]) ); $this->setChild( 'back_button', @@ -50,7 +50,7 @@ protected function _prepareLayout() 'label' => Mage::helper('eav')->__('Back'), 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/') . '\')', 'class' => 'back' - ]) + ]) ); $this->setChild( diff --git a/app/code/core/Mage/Eav/Block/Adminhtml/Helper/Form/Boolean.php b/app/code/core/Mage/Eav/Block/Adminhtml/Helper/Form/Boolean.php index 7666bd72a97..8f50af07888 100644 --- a/app/code/core/Mage/Eav/Block/Adminhtml/Helper/Form/Boolean.php +++ b/app/code/core/Mage/Eav/Block/Adminhtml/Helper/Form/Boolean.php @@ -27,7 +27,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([ diff --git a/app/code/core/Mage/Eav/controllers/Adminhtml/Attribute/AbstractController.php b/app/code/core/Mage/Eav/controllers/Adminhtml/Attribute/AbstractController.php index 802465ce745..127cf2973c4 100644 --- a/app/code/core/Mage/Eav/controllers/Adminhtml/Attribute/AbstractController.php +++ b/app/code/core/Mage/Eav/controllers/Adminhtml/Attribute/AbstractController.php @@ -301,7 +301,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('*/*/', []); }