Skip to content

Commit b49d3e1

Browse files
authored
Update CheckHost.php
1 parent 644a17d commit b49d3e1

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/CheckHost.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ class CheckHost
1313
private int $timeout;
1414

1515
/**
16-
* @param array|string|null $selected_countries
16+
* @param array|null $selected_countries
1717
* @param bool $except
1818
* @param string|null $proxy
1919
* @param int $timeout
2020
*/
21-
public function __construct(array|string|null $selected_countries = null, bool $except = false, string|null $proxy = null, int $timeout = 60) {
21+
public function __construct(array|null $selected_countries = null, bool $except = false, string|null $proxy = null, int $timeout = 60) {
2222
$this->nodes = [];
2323
$this->setCountry($selected_countries, $except);
2424
$this->proxy = $proxy;
@@ -80,19 +80,16 @@ public function updateNodes(): bool {
8080
}
8181

8282
/**
83-
* @param array|string|null $countries
83+
* @param array|null $countries
8484
* @param bool $except
8585
* @return bool
8686
*/
87-
public function setCountry(array|string|null $countries = null, bool $except = false): bool {
87+
public function setCountry(array|null $countries = null, bool $except = false): bool {
8888
if (is_null($countries)) {
8989
$countries_list = [];
9090
}
91-
elseif (is_array($countries)) {
92-
$countries_list = array_map('strtolower', $countries);
93-
}
9491
else {
95-
$countries_list = [strtolower($countries)];
92+
$countries_list = array_map('strtolower', $countries);
9693
}
9794
$this->selected_countries = $countries;
9895

0 commit comments

Comments
 (0)