Fix returns in Console commands

pull/14529/head
Art4 2024-11-05 12:13:18 +00:00
rodzic 01ba276455
commit 4b971f84fd
3 zmienionych plików z 7 dodań i 4 usunięć

Wyświetl plik

@ -144,6 +144,8 @@ HELP;
}
$this->out($table->getTable());
return 0;
}
/**

Wyświetl plik

@ -158,9 +158,10 @@ HELP;
if ($result['success']) {
$this->out('User ' . $user['nickname'] . ' now connected to ' . $url . ', contact ID ' . $result['cid']);
} else {
throw new RuntimeException($result['message']);
return true;
}
throw new RuntimeException($result['message']);
}
/**

Wyświetl plik

@ -122,7 +122,7 @@ HELP;
case 'search':
return $this->searchUser();
case 'config':
return $this->configUser();
return ($this->configUser()) ? 0 : 1;
default:
throw new \Asika\SimpleConsole\CommandArgsException('Wrong command.');
}
@ -513,6 +513,6 @@ HELP;
return false;
}
return false;
return true;
}
}