Skip to content

Commit 6c94101

Browse files
committed
Autocomplete can return city value as NULL
1 parent fc71185 commit 6c94101

2 files changed

Lines changed: 14 additions & 8 deletions

File tree

src/Response/Autocomplete/AutocompleteResult.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class AutocompleteResult extends ObjectPrototype
1515
/** @var string */
1616
private $name;
1717

18-
/** @var string */
18+
/** @var string|NULL */
1919
private $city;
2020

2121
/** @var bool */
@@ -24,8 +24,8 @@ class AutocompleteResult extends ObjectPrototype
2424
public function __construct(
2525
string $ico,
2626
string $name,
27-
string $city,
28-
bool $cancelled)
27+
string $city = NULL,
28+
bool $cancelled = FALSE)
2929
{
3030
$this->ico = $ico;
3131
$this->name = $name;
@@ -43,7 +43,10 @@ public function getName(): string
4343
return $this->name;
4444
}
4545

46-
public function getCity(): string
46+
/**
47+
* @return string|NULL
48+
*/
49+
public function getCity()
4750
{
4851
return $this->city;
4952
}

src/Response/CzAutocomplete/CzAutocompleteResult.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class CzAutocompleteResult extends ObjectPrototype
1515
/** @var string */
1616
private $name;
1717

18-
/** @var string */
18+
/** @var string|NULL */
1919
private $city;
2020

2121
/** @var bool */
@@ -24,8 +24,8 @@ class CzAutocompleteResult extends ObjectPrototype
2424
public function __construct(
2525
string $ico,
2626
string $name,
27-
string $city,
28-
bool $cancelled)
27+
string $city = NULL,
28+
bool $cancelled = FALSE)
2929
{
3030
$this->ico = $ico;
3131
$this->name = $name;
@@ -43,7 +43,10 @@ public function getName(): string
4343
return $this->name;
4444
}
4545

46-
public function getCity(): string
46+
/**
47+
* @return string|NULL
48+
*/
49+
public function getCity()
4750
{
4851
return $this->city;
4952
}

0 commit comments

Comments
 (0)