Skip to content

Commit 46fcd2c

Browse files
32460 change class description
1 parent b6256e4 commit 46fcd2c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

app/code/Magento/CatalogGraphQl/Model/Resolver/Products/Query/CategoryUrlPathArgsProcessor.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
use Magento\Framework\GraphQl\Query\Resolver\ArgumentsProcessorInterface;
1414

1515
/**
16-
* Category Path processor class for category uid and category id arguments
16+
* Category Path processor class for category url path argument
1717
*/
1818
class CategoryUrlPathArgsProcessor implements ArgumentsProcessorInterface
1919
{
2020
private const ID = 'category_id';
2121

2222
private const UID = 'category_uid';
2323

24-
private const PATH = 'category_url_path';
24+
private const URL_PATH = 'category_url_path';
2525

2626
/**
2727
* @var CollectionFactory
@@ -50,16 +50,16 @@ public function process(
5050
): array {
5151
$idFilter = $args['filter'][self::ID] ?? [];
5252
$uidFilter = $args['filter'][self::UID] ?? [];
53-
$pathFilter = $args['filter'][self::PATH] ?? [];
53+
$pathFilter = $args['filter'][self::URL_PATH] ?? [];
5454

5555
if (!empty($pathFilter) && $fieldName === 'products') {
5656
if (!empty($idFilter)) {
5757
throw new GraphQlInputException(
58-
__('`%1` and `%2` can\'t be used at the same time.', [self::ID, self::PATH])
58+
__('`%1` and `%2` can\'t be used at the same time.', [self::ID, self::URL_PATH])
5959
);
6060
} elseif (!empty($uidFilter)) {
6161
throw new GraphQlInputException(
62-
__('`%1` and `%2` can\'t be used at the same time.', [self::UID, self::PATH])
62+
__('`%1` and `%2` can\'t be used at the same time.', [self::UID, self::URL_PATH])
6363
);
6464
}
6565

@@ -70,13 +70,13 @@ public function process(
7070

7171
if ($collection->count() === 0) {
7272
throw new GraphQlInputException(
73-
__('No category with the provided `%1` was found', ['category_url_path'])
73+
__('No category with the provided `%1` was found', [self::URL_PATH])
7474
);
7575
}
7676
$category = $collection->getFirstItem();
7777
$args['filter'][self::ID]['eq'] = $category->getId();
7878

79-
unset($args['filter'][self::PATH]);
79+
unset($args['filter'][self::URL_PATH]);
8080
}
8181
return $args;
8282
}

0 commit comments

Comments
 (0)