mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
Fix typehint
This commit is contained in:
parent
b6f5e801a8
commit
7eb8322d71
|
|
@ -213,7 +213,7 @@ abstract class HeaderAbstract
|
|||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
abstract public function get(string $key) : array;
|
||||
abstract public function get(string $key = null) : array;
|
||||
|
||||
/**
|
||||
* Header has key?
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ final class Rest
|
|||
*
|
||||
* @param Request $request Request
|
||||
*
|
||||
* @return string Returns the request result
|
||||
* @return Request Returns the request result
|
||||
*
|
||||
* @throws \Exception this exception is thrown if an internal curl_init error occurs
|
||||
*
|
||||
|
|
@ -51,7 +51,7 @@ final class Rest
|
|||
$headers[$key] = $key . ': ' . \implode('', $header);
|
||||
}
|
||||
|
||||
curl_setopt($curl, \CURLOPT_HTTPHEADER, $headers);
|
||||
\curl_setopt($curl, \CURLOPT_HTTPHEADER, $headers);
|
||||
\curl_setopt($curl, \CURLOPT_HEADER, true);
|
||||
|
||||
switch ($request->getMethod()) {
|
||||
|
|
@ -82,7 +82,7 @@ final class Rest
|
|||
$cHeaderString = '';
|
||||
$response = new Response();
|
||||
|
||||
curl_setopt($curl, \CURLOPT_HEADERFUNCTION,
|
||||
\curl_setopt($curl, \CURLOPT_HEADERFUNCTION,
|
||||
function($curl, $header) use ($response, &$cHeaderString) {
|
||||
$cHeaderString .= $header;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user