File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
app/code/Magento/Eav/Model Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -544,14 +544,13 @@ private function createAttribute($model)
544
544
*
545
545
* @param mixed $entityType
546
546
* @param \Magento\Framework\DataObject $object
547
- * @return array
547
+ * @return string[]
548
548
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
549
549
* @SuppressWarnings(PHPMD.NPathComplexity)
550
550
*/
551
551
public function getEntityAttributeCodes ($ entityType , $ object = null )
552
552
{
553
- $ attributes = array_keys ($ this ->getEntityAttributes ($ entityType , $ object ));
554
- return $ attributes ;
553
+ return array_keys ($ this ->getEntityAttributes ($ entityType , $ object ));
555
554
}
556
555
557
556
/**
Original file line number Diff line number Diff line change @@ -1186,7 +1186,7 @@ protected function _getOrigObject($object)
1186
1186
*
1187
1187
* @param array &$delete
1188
1188
* @param AbstractAttribute $attribute
1189
- * @param \Magento\Eav\Model\Entity\ AbstractEntity $object
1189
+ * @param AbstractEntity $object
1190
1190
* @return void
1191
1191
*/
1192
1192
private function _aggregateDeleteData (&$ delete , $ attribute , $ object )
@@ -1920,8 +1920,12 @@ public function afterDelete(\Magento\Framework\DataObject $object)
1920
1920
}
1921
1921
1922
1922
/**
1923
+ * Load attributes for object
1924
+ * if the object will not pass all attributes for this entity type will be loaded
1925
+ *
1923
1926
* @param array $attributes
1924
- * @param |null $object
1927
+ * @param AbstractEntity|null $object
1928
+ * @return void
1925
1929
*/
1926
1930
protected function loadAttributesForObject ($ attributes , $ object = null )
1927
1931
{
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ public function __construct(
57
57
*/
58
58
public function loadAllAttributes (AbstractEntity $ resource , DataObject $ object = null )
59
59
{
60
- $ attributes = ( array ) $ this ->config ->getEntityAttributes ($ resource ->getEntityType (), $ object );
60
+ $ attributes = $ this ->config ->getEntityAttributes ($ resource ->getEntityType (), $ object );
61
61
$ attributeCodes = array_keys ($ attributes );
62
62
/**
63
63
* Check and init default attributes
You can’t perform that action at this time.
0 commit comments