Skip to content

Commit

Permalink
ENGCOM-4498: Removed extra whitespaces magento#21740
Browse files Browse the repository at this point in the history
  • Loading branch information
sidolov authored Mar 15, 2019
2 parents 28ee51d + 2a4b53b commit 91a26a9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 24 deletions.
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

0 comments on commit 91a26a9

Please sign in to comment.