Fix typehint

This commit is contained in:
Dennis Eichhorn 2019-05-01 20:59:26 +02:00
parent b6f5e801a8
commit 7eb8322d71
2 changed files with 4 additions and 4 deletions

View File

@ -213,7 +213,7 @@ abstract class HeaderAbstract
* *
* @since 1.0.0 * @since 1.0.0
*/ */
abstract public function get(string $key) : array; abstract public function get(string $key = null) : array;
/** /**
* Header has key? * Header has key?

View File

@ -30,7 +30,7 @@ final class Rest
* *
* @param Request $request Request * @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 * @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); $headers[$key] = $key . ': ' . \implode('', $header);
} }
curl_setopt($curl, \CURLOPT_HTTPHEADER, $headers); \curl_setopt($curl, \CURLOPT_HTTPHEADER, $headers);
\curl_setopt($curl, \CURLOPT_HEADER, true); \curl_setopt($curl, \CURLOPT_HEADER, true);
switch ($request->getMethod()) { switch ($request->getMethod()) {
@ -82,7 +82,7 @@ final class Rest
$cHeaderString = ''; $cHeaderString = '';
$response = new Response(); $response = new Response();
curl_setopt($curl, \CURLOPT_HEADERFUNCTION, \curl_setopt($curl, \CURLOPT_HEADERFUNCTION,
function($curl, $header) use ($response, &$cHeaderString) { function($curl, $header) use ($response, &$cHeaderString) {
$cHeaderString .= $header; $cHeaderString .= $header;