Skip to content

Commit 5c8572e

Browse files
authored
Fix php8.1 support
1 parent 5109b3f commit 5c8572e

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

Model/Config/PathType.php

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22
/**
33
* Copyright © OpenGento, All rights reserved.
4+
* See LICENSE bundled with this library for license details.
45
*/
56
declare(strict_types=1);
67

@@ -10,21 +11,28 @@
1011

1112
enum PathType: string
1213
{
14+
private const STORE_CODE = 'store_code';
15+
private const COUNTRY_CODE = 'country_code';
16+
private const LANGUAGE_CODE = 'language_code';
17+
private const LOCALE_UNDERSCORE = 'locale_underscore';
18+
private const LOCALE_HYPHEN = 'locale_hyphen';
19+
private const CUSTOM = 'custom';
20+
1321
private const PHRASES = [
14-
self::StoreCode->value => 'Store Code',
15-
self::CountryCode->value => 'Country Code',
16-
self::LanguageCode->value => 'Language Code',
17-
self::LocaleUnderscore->value => 'Locale Code (_)',
18-
self::LocaleHyphen->value => 'Locale Code (-)',
19-
self::Custom->value => 'Custom',
22+
self::STORE_CODE => 'Store Code',
23+
self::COUNTRY_CODEe => 'Country Code',
24+
self::LANGUAGE_CODE => 'Language Code',
25+
self::LOCALE_UNDERSCORE => 'Locale Code (_)',
26+
self::LOCALE_HYPHEN => 'Locale Code (-)',
27+
self::CUSTOM => 'Custom',
2028
];
2129

22-
case StoreCode = 'store_code';
23-
case CountryCode = 'country_code';
24-
case LanguageCode = 'language_code';
25-
case LocaleUnderscore = 'locale_underscore';
26-
case LocaleHyphen = 'locale_hyphen';
27-
case Custom = 'custom';
30+
case StoreCode = self::STORE_CODE;
31+
case CountryCode = self::COUNTRY_CODE;
32+
case LanguageCode = self::LANGUAGE_CODE;
33+
case LocaleUnderscore = self::LOCALE_UNDERSCORE;
34+
case LocaleHyphen = self::LOCALE_HYPHEN;
35+
case Custom = self::CUSTOM;
2836

2937
public function getLabel(): Phrase
3038
{

0 commit comments

Comments
 (0)