added missing named parameters, added strict_types
Signed-off-by: tracer <tracer@24unix.net>
This commit is contained in:
parent
67baa731c3
commit
367c6f7d2c
@ -145,6 +145,7 @@ class BindAPI
|
||||
/**
|
||||
* @param String $domain
|
||||
*
|
||||
* @return bool|void
|
||||
*/
|
||||
function checkNS(String $domain)
|
||||
{
|
||||
@ -165,9 +166,9 @@ class BindAPI
|
||||
type: 'nameserver' . $domain);
|
||||
}
|
||||
if ($result['header'] == 200) {
|
||||
echo COLOR_GREEN . ' OK';
|
||||
return true;
|
||||
} else {
|
||||
echo COLOR_RED . ' missing';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
echo PHP_EOL;
|
||||
@ -207,7 +208,7 @@ class BindAPI
|
||||
foreach ($domains as $domain) {
|
||||
if ($domain->id_parent_domain == 0 && !str_contains(haystack: $domain->domain, needle: $panel['name'])) {
|
||||
echo PHP_EOL . COLOR_DEFAULT . "check: " . COLOR_YELLOW . str_pad(string: $domain->domain, length: $maxDomainName);
|
||||
if ($this->checkNS($domain->domain)) {
|
||||
if ($this->checkNS(domain: $domain->domain)) {
|
||||
echo COLOR_GREEN . ' OK';
|
||||
} else {
|
||||
echo COLOR_RED . 'Missing';
|
||||
@ -791,9 +792,10 @@ class BindAPI
|
||||
{
|
||||
$arguments = $this->parseArguments();
|
||||
|
||||
$id = $this->arguments[1] ?? 0;
|
||||
$id = intval(value: $this->arguments[1] ?? 0);
|
||||
$name = $arguments['name'] ?? '';
|
||||
print_r(value: $arguments); //findme
|
||||
print("$id: id" . PHP_EOL);
|
||||
$panelID = intval(value: $arguments['panel_id'] ?? 0);
|
||||
$a = $arguments['a'] ?? '';
|
||||
$aaaa = $arguments['aaaa'] ?? '';
|
||||
|
Loading…
Reference in New Issue
Block a user