Skip to content

Removed extra whitespaces #21740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
* See COPYING.txt for license details.
*/

/**
* Product attribute add/edit form main tab
*
* @author Magento Core Team <[email protected]>
*/
namespace Magento\Eav\Block\Adminhtml\Attribute\Edit\Main;

use Magento\Catalog\Model\ResourceModel\Eav\Attribute;

/**
* Product attribute add/edit form main tab
*/
abstract class AbstractMain extends \Magento\Backend\Block\Widget\Form\Generic
{
/**
Expand Down Expand Up @@ -110,7 +108,6 @@ protected function _prepareForm()

/** @var \Magento\Framework\Data\Form $form */
$form = $this->_formFactory->create(

['data' => ['id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post']]
);

Expand Down Expand Up @@ -280,10 +277,11 @@ protected function _initFormValues()
}

/**
* Processing block html after rendering
* Processing block html after rendering.
*
* Adding js block to the end of this block
*
* @param string $html
* @param string $html
* @return string
*/
protected function _afterToHtml($html)
Expand Down
11 changes: 7 additions & 4 deletions app/code/Magento/Eav/Setup/EavSetup.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
use Magento\Eav\Model\Entity\Setup\PropertyMapperInterface;
use Magento\Eav\Model\ResourceModel\Entity\Attribute\Group\CollectionFactory;
use Magento\Framework\App\CacheInterface;
use Magento\Framework\App\ObjectManager;
use Magento\Framework\App\ResourceConnection;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Setup\ModuleDataSetupInterface;

/**
* Base eav setup class.
*
* @api
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
Expand Down Expand Up @@ -101,7 +101,8 @@ public function __construct(
}

/**
* Gets setup model
* Gets setup model.
*
* @deprecated
* @return ModuleDataSetupInterface
*/
Expand Down Expand Up @@ -568,6 +569,8 @@ public function addAttributeGroup($entityTypeId, $setId, $name, $sortOrder = nul
}

/**
* Convert group name to attribute group code.
*
* @param string $groupName
* @return string
* @since 100.1.0
Expand Down Expand Up @@ -1063,7 +1066,7 @@ private function _updateAttributeAdditionalData($entityTypeId, $id, $field, $val
return $this;
}
}

$attributeId = $this->getAttributeId($entityTypeId, $id);
if (false === $attributeId) {
throw new LocalizedException(__('Attribute with ID: "%1" does not exist', $id));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ public function addValueSortToCollectionDataProvider()
'expectedJoinCondition' => [
0 => [
'requisites' => ['code_t1' => "table"],
'condition' =>
"e.entity_id=code_t1.entity_id AND code_t1.attribute_id='123' AND code_t1.store_id='0'",
'condition' => "e.entity_id=code_t1.entity_id AND code_t1.attribute_id='123'"
. " AND code_t1.store_id='0'",
],
1 => [
'requisites' => ['code_t2' => "table"],
'condition' =>
"e.entity_id=code_t2.entity_id AND code_t2.attribute_id='123' AND code_t2.store_id='12'",
'condition' => "e.entity_id=code_t2.entity_id AND code_t2.attribute_id='123'"
. " AND code_t2.store_id='12'",
],
],
'expectedOrder' => 'IF(code_t2.value_id > 0, code_t2.value, code_t1.value) ASC',
Expand All @@ -118,13 +118,13 @@ public function addValueSortToCollectionDataProvider()
'expectedJoinCondition' => [
0 => [
'requisites' => ['code_t1' => "table"],
'condition' =>
"e.entity_id=code_t1.entity_id AND code_t1.attribute_id='123' AND code_t1.store_id='0'",
'condition' => "e.entity_id=code_t1.entity_id AND code_t1.attribute_id='123'"
. " AND code_t1.store_id='0'",
],
1 => [
'requisites' => ['code_t2' => "table"],
'condition' =>
"e.entity_id=code_t2.entity_id AND code_t2.attribute_id='123' AND code_t2.store_id='12'",
'condition' => "e.entity_id=code_t2.entity_id AND code_t2.attribute_id='123'"
. " AND code_t2.store_id='12'",
],
],
'expectedOrder' => 'IF(code_t2.value_id > 0, code_t2.value, code_t1.value) DESC',
Expand All @@ -135,8 +135,8 @@ public function addValueSortToCollectionDataProvider()
'expectedJoinCondition' => [
0 => [
'requisites' => ['code_t' => "table"],
'condition' =>
"e.entity_id=code_t.entity_id AND code_t.attribute_id='123' AND code_t.store_id='0'",
'condition' => "e.entity_id=code_t.entity_id AND code_t.attribute_id='123'"
. " AND code_t.store_id='0'",
],
],
'expectedOrder' => 'code_t.value DESC',
Expand All @@ -147,8 +147,8 @@ public function addValueSortToCollectionDataProvider()
'expectedJoinCondition' => [
0 => [
'requisites' => ['code_t' => "table"],
'condition' =>
"e.entity_id=code_t.entity_id AND code_t.attribute_id='123' AND code_t.store_id='0'",
'condition' => "e.entity_id=code_t.entity_id AND code_t.attribute_id='123'"
. " AND code_t.store_id='0'",
],
],
'expectedOrder' => 'code_t.value ASC',
Expand Down