Skip to content

Commit 40345c5

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-52836' into MAGETWO-52836
2 parents 339d8cd + fe35cb1 commit 40345c5

File tree

7 files changed

+22
-8
lines changed

7 files changed

+22
-8
lines changed

app/code/Magento/Customer/Model/Attribute.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,5 +203,4 @@ public function __wakeup()
203203
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
204204
$this->indexerRegistry = $objectManager->get(\Magento\Framework\Indexer\IndexerRegistry::class);
205205
}
206-
207206
}

app/code/Magento/Customer/Model/Metadata/CachedMetadata.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ private function getCache()
107107
if (!$this->cache) {
108108
$this->cache = ObjectManager::getInstance()->get(AttributeCache::class);
109109
}
110-
return $this->cache;
110+
111+
return $this->cache;
111112
}
112113
}

app/code/Magento/Customer/Model/Metadata/CustomerCachedMetadata.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
*/
1414
class CustomerCachedMetadata extends CachedMetadata implements CustomerMetadataInterface
1515
{
16+
/**
17+
* @var string
18+
*/
1619
protected $entityType = 'customer';
1720

1821
/**

app/code/Magento/Eav/Model/Entity/Attribute.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -522,10 +522,12 @@ public function __wakeup()
522522
*/
523523
private function getReservedAttributeList()
524524
{
525-
if($this->reservedAttributeList) {
526-
$this->reservedAttributeList = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Catalog\Model\Product\ReservedAttributeList::class);
525+
if ($this->reservedAttributeList) {
526+
$this->reservedAttributeList = \Magento\Framework\App\ObjectManager::getInstance()->get(
527+
\Magento\Catalog\Model\Product\ReservedAttributeList::class
528+
);
527529
}
530+
528531
return $this->reservedAttributeList;
529532
}
530-
531533
}

app/code/Magento/Eav/Model/Entity/AttributeCache.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class AttributeCache
2222
* @var CacheInterface
2323
*/
2424
private $cache;
25+
2526
/**
2627
* @var StateInterface
2728
*/
@@ -104,7 +105,7 @@ public function getAttributes($entityType, $suffix = '')
104105
* @param string $suffix
105106
* @return bool
106107
*/
107-
public function saveAttributes($entityType, $attributes, $suffix = '')
108+
public function saveAttributes($entityType, $attributes, $suffix = '')
108109
{
109110
if (in_array($entityType, $this->unsupportedTypes)) {
110111
return true;

app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* EAV attribute resource model
1818
*
1919
* @author Magento Core Team <core@magentocommerce.com>
20+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2021
*/
2122
class Attribute extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
2223
{
@@ -225,6 +226,7 @@ private function getAttributeCache()
225226
}
226227
return $this->attributeCache;
227228
}
229+
228230
/**
229231
* @return Config
230232
* @deprecated
@@ -236,6 +238,7 @@ private function getConfig()
236238
}
237239
return $this->config;
238240
}
241+
239242
/**
240243
* Save store labels
241244
*
@@ -728,5 +731,4 @@ public function __wakeup()
728731
$this->_storeManager = \Magento\Framework\App\ObjectManager::getInstance()
729732
->get(\Magento\Store\Model\StoreManagerInterface::class);
730733
}
731-
732734
}

dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/AbstractTypeTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,13 @@ public function testGetAttributeById()
124124
'catalog_product',
125125
'sku'
126126
);
127-
$this->assertSame($sku->getAttributeId(), $this->_model->getAttributeById($sku->getId(), $product)->getAttributeId());
127+
$this->assertSame(
128+
$sku->getAttributeId(),
129+
$this->_model->getAttributeById(
130+
$sku->getId(),
131+
$product
132+
)->getAttributeId()
133+
);
128134
}
129135

130136
/**

0 commit comments

Comments
 (0)