Skip to content

Commit 0c3d681

Browse files
committed
Added Constant Usage
1 parent d15a03d commit 0c3d681

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/code/Magento/Catalog/Model/Config/Source/SortOrder.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
*/
1212
namespace Magento\Catalog\Model\Config\Source;
1313

14+
use Magento\Catalog\Model\ResourceModel\Product\Collection;
15+
1416
class SortOrder implements \Magento\Framework\Data\OptionSourceInterface
1517
{
1618
/**
@@ -21,8 +23,8 @@ class SortOrder implements \Magento\Framework\Data\OptionSourceInterface
2123
public function toOptionArray(): array
2224
{
2325
return [
24-
['value' => 'ASC', 'label' => __('Ascending')],
25-
['value' => 'DESC', 'label' => __('Descending')],
26+
['value' => Collection::SORT_ORDER_ASC, 'label' => __('Ascending')],
27+
['value' => Collection::SORT_ORDER_DESC, 'label' => __('Descending')],
2628
];
2729
}
2830
}

0 commit comments

Comments
 (0)