Skip to content

Commit 3c98751

Browse files
committed
Removed useless sprintf, which resulted in removing additional code no longer used
1 parent 00fb2aa commit 3c98751

File tree

1 file changed

+1
-25
lines changed
  • app/code/Magento/Downloadable/Model/ResourceModel

1 file changed

+1
-25
lines changed

app/code/Magento/Downloadable/Model/ResourceModel/Link.php

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
*/
66
namespace Magento\Downloadable\Model\ResourceModel;
77

8-
use Magento\Catalog\Api\Data\ProductInterface;
9-
use Magento\Framework\App\ObjectManager;
10-
use Magento\Framework\EntityManager\MetadataPool;
11-
128
/**
139
* Downloadable Product Samples resource model
1410
*
@@ -17,11 +13,6 @@
1713
*/
1814
class Link extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
1915
{
20-
/**
21-
* @var MetadataPool
22-
*/
23-
private $metadataPool;
24-
2516
/**
2617
* Catalog data
2718
*
@@ -210,10 +201,7 @@ public function getSearchableData($productId, $storeId)
210201
[]
211202
)->join(
212203
['cpe' => $this->getTable('catalog_product_entity')],
213-
sprintf(
214-
'cpe.entity_id = m.product_id',
215-
$this->getMetadataPool()->getMetadata(ProductInterface::class)->getLinkField()
216-
),
204+
'cpe.entity_id = m.product_id',
217205
[]
218206
)->joinLeft(
219207
['st' => $this->getTable('downloadable_link_title')],
@@ -234,16 +222,4 @@ protected function _createCurrency()
234222
{
235223
return $this->_currencyFactory->create();
236224
}
237-
238-
/**
239-
* Get MetadataPool instance
240-
* @return MetadataPool
241-
*/
242-
private function getMetadataPool()
243-
{
244-
if (!$this->metadataPool) {
245-
$this->metadataPool = ObjectManager::getInstance()->get(MetadataPool::class);
246-
}
247-
return $this->metadataPool;
248-
}
249225
}

0 commit comments

Comments
 (0)