Skip to content

Commit e4c42b1

Browse files
committed
MAGETWO-58386: Eliminate dependencies on modules from lib/Magento.
1 parent eb5d0e7 commit e4c42b1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/internal/Magento/Framework/EntityManager/CustomAttributesMapper.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,19 @@ class CustomAttributesMapper implements MapperInterface
1818
/**
1919
* CustomAttributesMapper constructor.
2020
*
21-
* @param MapperInterface|null $mapper
21+
* @param MapperInterface $mapper
2222
*/
23-
public function __construct(MapperInterface $mapper = null)
23+
public function __construct(MapperInterface $mapper)
2424
{
2525
$this->mapper = $mapper;
2626
}
2727

2828
/**
2929
* {@inheritdoc}
30-
* @deprecated
3130
*/
3231
public function entityToDatabase($entityType, $data)
3332
{
34-
return $this->mapper !== null ? $this->mapper->entityToDatabase($entityType, $data) : $data;
33+
return $this->mapper->entityToDatabase($entityType, $data);
3534
}
3635

3736
/**
@@ -40,6 +39,6 @@ public function entityToDatabase($entityType, $data)
4039
*/
4140
public function databaseToEntity($entityType, $data)
4241
{
43-
return $this->mapper !== null ? $this->mapper->databaseToEntity($entityType, $data) : $data;
42+
return $this->mapper->databaseToEntity($entityType, $data);
4443
}
4544
}

0 commit comments

Comments
 (0)