Skip to content

Commit 41f07fc

Browse files
committed
static test fix
1 parent 610e13c commit 41f07fc

File tree

2 files changed

+33
-21
lines changed

2 files changed

+33
-21
lines changed

app/code/Magento/Search/Model/PopularSearchTerms.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace Magento\Search\Model;
88

99
/**
10-
* Popular search terms
10+
* Finds top search results in search
1111
*/
1212
class PopularSearchTerms
1313
{

app/code/Magento/Search/Model/ResourceModel/Query/Collection.php

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,25 @@
55
*/
66
namespace Magento\Search\Model\ResourceModel\Query;
77

8+
use Magento\Framework\Data\Collection\Db\FetchStrategyInterface;
9+
use Magento\Framework\Data\Collection\EntityFactoryInterface;
10+
use Magento\Framework\DB\Adapter\AdapterInterface;
11+
use Magento\Framework\DB\Helper;
12+
use Magento\Framework\Event\ManagerInterface;
13+
use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
14+
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;
815
use Magento\Store\Model\Store;
16+
use Magento\Store\Model\StoreManagerInterface;
17+
use Psr\Log\LoggerInterface;
918

1019
/**
1120
* Search query collection
1221
*
1322
* @api
1423
* @since 100.0.2
24+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1525
*/
16-
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
26+
class Collection extends AbstractCollection
1727
{
1828
/**
1929
* Store for filter
@@ -25,36 +35,38 @@ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\Ab
2535
/**
2636
* Store manager
2737
*
28-
* @var \Magento\Store\Model\StoreManagerInterface
38+
* @var StoreManagerInterface
2939
*/
3040
protected $_storeManager;
3141

3242
/**
3343
* Search resource helper
3444
*
35-
* @var \Magento\Framework\DB\Helper
45+
* @var Helper
3646
*/
3747
protected $_resourceHelper;
3848

3949
/**
40-
* @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
41-
* @param \Psr\Log\LoggerInterface $logger
42-
* @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
43-
* @param \Magento\Framework\Event\ManagerInterface $eventManager
44-
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
45-
* @param \Magento\Framework\DB\Helper $resourceHelper
46-
* @param \Magento\Framework\DB\Adapter\AdapterInterface $connection
47-
* @param \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource
50+
* Constructor
51+
*
52+
* @param EntityFactoryInterface $entityFactory
53+
* @param LoggerInterface $logger
54+
* @param FetchStrategyInterface $fetchStrategy
55+
* @param ManagerInterface $eventManager
56+
* @param StoreManagerInterface $storeManager
57+
* @param Helper $resourceHelper
58+
* @param AdapterInterface $connection
59+
* @param AbstractDb $resource
4860
*/
4961
public function __construct(
50-
\Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory,
51-
\Psr\Log\LoggerInterface $logger,
52-
\Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
53-
\Magento\Framework\Event\ManagerInterface $eventManager,
54-
\Magento\Store\Model\StoreManagerInterface $storeManager,
55-
\Magento\Framework\DB\Helper $resourceHelper,
56-
\Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
57-
\Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null
62+
EntityFactoryInterface $entityFactory,
63+
LoggerInterface $logger,
64+
FetchStrategyInterface $fetchStrategy,
65+
ManagerInterface $eventManager,
66+
StoreManagerInterface $storeManager,
67+
Helper $resourceHelper,
68+
AdapterInterface $connection = null,
69+
AbstractDb $resource = null
5870
) {
5971
$this->_storeManager = $storeManager;
6072
$this->_resourceHelper = $resourceHelper;
@@ -178,7 +190,7 @@ public function isTopSearchResult(string $term, int $storeId, int $maxCountCache
178190

179191
return $this->getSize() > 0;
180192
}
181-
193+
182194
/**
183195
* Set Recent Queries Order
184196
*

0 commit comments

Comments
 (0)