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
|
* @param String $domain
|
||||||
*
|
*
|
||||||
|
* @return bool|void
|
||||||
*/
|
*/
|
||||||
function checkNS(String $domain)
|
function checkNS(String $domain)
|
||||||
{
|
{
|
||||||
|
@ -165,9 +166,9 @@ class BindAPI
|
||||||
type: 'nameserver' . $domain);
|
type: 'nameserver' . $domain);
|
||||||
}
|
}
|
||||||
if ($result['header'] == 200) {
|
if ($result['header'] == 200) {
|
||||||
echo COLOR_GREEN . ' OK';
|
return true;
|
||||||
} else {
|
} else {
|
||||||
echo COLOR_RED . ' missing';
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo PHP_EOL;
|
echo PHP_EOL;
|
||||||
|
@ -207,7 +208,7 @@ class BindAPI
|
||||||
foreach ($domains as $domain) {
|
foreach ($domains as $domain) {
|
||||||
if ($domain->id_parent_domain == 0 && !str_contains(haystack: $domain->domain, needle: $panel['name'])) {
|
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);
|
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';
|
echo COLOR_GREEN . ' OK';
|
||||||
} else {
|
} else {
|
||||||
echo COLOR_RED . 'Missing';
|
echo COLOR_RED . 'Missing';
|
||||||
|
@ -791,9 +792,10 @@ class BindAPI
|
||||||
{
|
{
|
||||||
$arguments = $this->parseArguments();
|
$arguments = $this->parseArguments();
|
||||||
|
|
||||||
$id = $this->arguments[1] ?? 0;
|
$id = intval(value: $this->arguments[1] ?? 0);
|
||||||
$name = $arguments['name'] ?? '';
|
$name = $arguments['name'] ?? '';
|
||||||
print_r(value: $arguments); //findme
|
print_r(value: $arguments); //findme
|
||||||
|
print("$id: id" . PHP_EOL);
|
||||||
$panelID = intval(value: $arguments['panel_id'] ?? 0);
|
$panelID = intval(value: $arguments['panel_id'] ?? 0);
|
||||||
$a = $arguments['a'] ?? '';
|
$a = $arguments['a'] ?? '';
|
||||||
$aaaa = $arguments['aaaa'] ?? '';
|
$aaaa = $arguments['aaaa'] ?? '';
|
||||||
|
|
Loading…
Reference in New Issue