mirror of
https://github.com/MetaProvide/talked-client.git
synced 2025-05-14 20:52:29 +00:00
Add some more type hints
This commit is contained in:
parent
53b0b2549e
commit
937fc023fa
1 changed files with 4 additions and 4 deletions
|
@ -142,7 +142,7 @@ You have the following options available:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function sendGetRequest($serverUrl, $endpoint, $headers = []) {
|
protected function sendGetRequest(string $serverUrl, string $endpoint, array $headers = []): string {
|
||||||
if ($this->config->getAppValue('talked', 'server_url', '0')) {
|
if ($this->config->getAppValue('talked', 'server_url', '0')) {
|
||||||
$headers = $this->addBasicAuthHeaders($headers);
|
$headers = $this->addBasicAuthHeaders($headers);
|
||||||
}
|
}
|
||||||
|
@ -168,7 +168,7 @@ You have the following options available:
|
||||||
return $message;
|
return $message;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function sendPostRequest($serverUrl, $endpoint, $payload, $headers = []) {
|
protected function sendPostRequest(string $serverUrl, string $endpoint, array $payload, array $headers = []): string {
|
||||||
if ($this->config->getAppValue('talked', 'server_url', '0')) {
|
if ($this->config->getAppValue('talked', 'server_url', '0')) {
|
||||||
$headers = $this->addBasicAuthHeaders($headers);
|
$headers = $this->addBasicAuthHeaders($headers);
|
||||||
}
|
}
|
||||||
|
@ -198,7 +198,7 @@ You have the following options available:
|
||||||
return $message;
|
return $message;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function addBasicAuthHeaders() {
|
protected function addBasicAuthHeaders(): array {
|
||||||
$username = $this->config->getAppValue('talked', 'http_basic_auth_username');
|
$username = $this->config->getAppValue('talked', 'http_basic_auth_username');
|
||||||
$password = $this->config->getAppValue('talked', 'http_basic_auth_password');
|
$password = $this->config->getAppValue('talked', 'http_basic_auth_password');
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue