mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-06 04:28:41 +00:00
Fix typehint
This commit is contained in:
parent
b6f5e801a8
commit
7eb8322d71
|
|
@ -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?
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user