Skip to content

Commit c9f30a6

Browse files
authored
Update Data.php
1 parent 1bfad97 commit c9f30a6

File tree

1 file changed

+10
-5
lines changed
  • app/code/Magento/Directory/Block

1 file changed

+10
-5
lines changed

app/code/Magento/Directory/Block/Data.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<?php
2-
declare(strict_types=1);
32
/**
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
6+
declare(strict_types=1);
7+
78
namespace Magento\Directory\Block;
89

910
/**
@@ -185,14 +186,18 @@ public function getRegionHtmlSelect(): string
185186
/**
186187
* Returns region html select
187188
*
188-
* @param null|string $value
189+
* @param null|int $value
189190
* @param string $name
190191
* @param string $id
191192
* @param string $title
192193
* @return string
193194
*/
194-
public function getRegionSelect(int $value = null, string $name = 'region', string $id = 'state', string $title = 'State/Province'): string
195-
{
195+
public function getRegionSelect(
196+
?int $value = null,
197+
string $name = 'region',
198+
string $id = 'state',
199+
string $title = 'State/Province'
200+
): string {
196201
\Magento\Framework\Profiler::start('TEST: ' . __METHOD__, ['group' => 'TEST', 'method' => __METHOD__]);
197202
if ($value === null) {
198203
$value = (int)$this->getRegionId();
@@ -216,7 +221,7 @@ public function getRegionSelect(int $value = null, string $name = 'region', stri
216221
)->setClass(
217222
'required-entry validate-state'
218223
)->setValue(
219-
(int)$value
224+
$value
220225
)->setOptions(
221226
$options
222227
)->getHtml();

0 commit comments

Comments
 (0)