fix phpstan issues.

This commit is contained in:
James Cole
2024-02-29 06:39:58 +01:00
parent d7fa8b283e
commit 9d0488ffbc
4 changed files with 22 additions and 21 deletions

View File

@@ -1101,7 +1101,7 @@ class GroupCollector implements GroupCollectorInterface
*/
foreach ($this->sorting as $field => $direction) {
$func = 'ASC' === $direction ? 'sortBy' : 'sortByDesc';
$collection = $collection->{$func}(function (array $product, int $key) use ($field) {
$collection = $collection->{$func}(function (array $product, int $key) use ($field) { // @phpstan-ignore-line
// depends on $field:
if ('description' === $field) {
if (1 === count($product['transactions'])) {