Skip to content

Commit

Permalink
[TASK] Argument hierarchy suggesstion fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
hojalatheef committed Jan 9, 2025
1 parent 69d68dc commit 8f2e2a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Classes/Controller/CompanyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function listAction(string $letter = ''): ResponseInterface
'categories' => $this->categoryRepository->findRelated(),
]);

CacheUtility::addPageCacheTagsByQuery($this->request, $companies->getQuery());
CacheUtility::addPageCacheTagsByQuery($companies->getQuery(), $this->request);

return $this->htmlResponse();
}
Expand All @@ -92,7 +92,7 @@ public function listMyCompaniesAction(): ResponseInterface
'categories' => $this->categoryRepository->findRelated(),
]);

CacheUtility::addPageCacheTagsByQuery($this->request, $companies->getQuery());
CacheUtility::addPageCacheTagsByQuery($companies->getQuery(), $this->request);

return $this->htmlResponse();
}
Expand All @@ -104,7 +104,7 @@ public function showAction(int $company): ResponseInterface
'company' => $companyObject,
]);

CacheUtility::addCacheTagsByCompanyRecords($this->request, [$companyObject]);
CacheUtility::addCacheTagsByCompanyRecords([$companyObject], $this->request);

return $this->htmlResponse();
}
Expand Down
4 changes: 2 additions & 2 deletions Classes/Utility/CacheUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CacheUtility
* Following cache tags will be added to TSFE:
* "tx_yellowpages2_uid_[company:uid]"
*/
public static function addCacheTagsByCompanyRecords(ServerRequestInterface $request, array $companyRecords): void
public static function addCacheTagsByCompanyRecords(array $companyRecords, ServerRequestInterface $request): void
{
if (!self::getApplicationType()->isFrontend()) {
return;
Expand All @@ -51,7 +51,7 @@ public static function addCacheTagsByCompanyRecords(ServerRequestInterface $requ
* Adds page cache tags by used storagePages.
* This adds tags with the scheme tx_yellowpages2_pid_[company:pid]
*/
public static function addPageCacheTagsByQuery(ServerRequestInterface $request, QueryInterface $query): void
public static function addPageCacheTagsByQuery(QueryInterface $query, ServerRequestInterface $request): void
{
if (!self::getApplicationType()->isFrontend()) {
return;
Expand Down

0 comments on commit 8f2e2a5

Please sign in to comment.