Skip to content

Commit eb79b38

Browse files
committed
7241 Undo creation of constants due to @api reasons
See #11462 (review)
1 parent 519b805 commit eb79b38

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

app/code/Magento/Config/Model/Config/Source/Nooptreq.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,15 @@
1111
*/
1212
class Nooptreq implements \Magento\Framework\Option\ArrayInterface
1313
{
14-
const VALUE_NO = '';
15-
const VALUE_OPTIONAL = 'opt';
16-
const VALUE_REQUIRED = 'req';
17-
1814
/**
1915
* @return array
2016
*/
2117
public function toOptionArray()
2218
{
2319
return [
24-
['value' => self::VALUE_NO, 'label' => __('No')],
25-
['value' => self::VALUE_OPTIONAL, 'label' => __('Optional')],
26-
['value' => self::VALUE_REQUIRED, 'label' => __('Required')]
20+
['value' => '', 'label' => __('No')],
21+
['value' => 'opt', 'label' => __('Optional')],
22+
['value' => 'req', 'label' => __('Required')]
2723
];
2824
}
2925
}

app/code/Magento/Customer/Model/Options.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function getNamePrefixOptions($store = null)
4545
{
4646
return $this->prepareNamePrefixSuffixOptions(
4747
$this->addressHelper->getConfig('prefix_options', $store),
48-
$this->addressHelper->getConfig('prefix_show', $store) == NooptreqSource::VALUE_OPTIONAL
48+
$this->addressHelper->getConfig('prefix_show', $store) == 'opt'
4949
);
5050
}
5151

@@ -59,7 +59,7 @@ public function getNameSuffixOptions($store = null)
5959
{
6060
return $this->prepareNamePrefixSuffixOptions(
6161
$this->addressHelper->getConfig('suffix_options', $store),
62-
$this->addressHelper->getConfig('suffix_show', $store) == NooptreqSource::VALUE_OPTIONAL
62+
$this->addressHelper->getConfig('suffix_show', $store) == 'opt'
6363
);
6464
}
6565

0 commit comments

Comments
 (0)