Skip to content

Commit

Permalink
FRW-7400 Upgraded PHPStan to 1.10.*. (#10911)
Browse files Browse the repository at this point in the history
FRW-7400 Update PHPStan to 1.10.*
  • Loading branch information
olhalivitchuk committed May 6, 2024
1 parent a1ae429 commit 4e74992
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,30 +80,36 @@ protected function getAttributeEntity($idProductSearchAttribute)
* @param string $searchText
* @param int $limit
*
* @return array
* @return array<string>
*/
public function suggestUnusedKeys($searchText = '', $limit = 10)
{
$query = $this->productSearchQueryContainer
->queryUnusedProductAttributeKeys();

return $this->applySearchParamsToQuery($query, $searchText, $limit)
/** @var array<string> $suggestedUnusedKeys */
$suggestedUnusedKeys = $this->applySearchParamsToQuery($query, $searchText, $limit)
->find();

return $suggestedUnusedKeys;
}

/**
* @param string $searchText
* @param int $limit
*
* @return array
* @return array<string>
*/
public function suggestKeys($searchText = '', $limit = 10)
{
$query = $this->productSearchQueryContainer
->queryAllProductAttributeKeys();

return $this->applySearchParamsToQuery($query, $searchText, $limit)
->find();
/** @var array<string> $suggestedKeys */
$suggestedKeys = $this->applySearchParamsToQuery($query, $searchText, $limit)
->find();

return $suggestedKeys;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ProductSearchAttributeMapCollector implements ProductSearchAttributeMapCol
protected $productSearchQueryContainer;

/**
* @var \Propel\Runtime\Collection\ObjectCollection<\Orm\Zed\ProductSearch\Persistence\SpyProductSearchAttributeMap>
* @var \Propel\Runtime\Collection\Collection<\Orm\Zed\ProductSearch\Persistence\SpyProductSearchAttributeMap>
*/
protected static $rawAttributeMap;

Expand Down Expand Up @@ -51,7 +51,7 @@ public function getProductSearchAttributeMap()
}

/**
* @return \Propel\Runtime\Collection\ObjectCollection<\Orm\Zed\ProductSearch\Persistence\SpyProductSearchAttributeMap>
* @return \Propel\Runtime\Collection\Collection<\Orm\Zed\ProductSearch\Persistence\SpyProductSearchAttributeMap>
*/
protected function getRawAttributeMap()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,14 @@ public function getProductSearchEntitiesCountGroupedByIdProductAndIdLocale(array
*/
public function getAllProductAttributeKeys(): array
{
return $this->getFactory()
/** @var array<string> $allProductAttributeKeys */
$allProductAttributeKeys = $this->getFactory()
->createProductAttributeKeyQuery()
->addSelectColumn(SpyProductAttributeKeyTableMap::COL_KEY)
->setFormatter(new PropelArraySetFormatter())
->find();

return $allProductAttributeKeys;
}

/**
Expand Down

0 comments on commit 4e74992

Please sign in to comment.