Skip to content

Commit 62d4a3d

Browse files
authored
Update Curl.php
1 parent 6288a8a commit 62d4a3d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Curl.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Curl
1616
* @param array<string,mixed> $options
1717
* @return array<string,mixed>
1818
*/
19-
public static function navigateCached(int $expire, string $method, string $url, string|array $data, array $headers = [], array $options = []): array
19+
public static function navigateCached(int $expire, string $method, string $url, mixed $data, array $headers = [], array $options = []): array
2020
{
2121
return self::callCached($expire, $method, $url, $data, $headers, array_merge($options, ['CURLOPT_FOLLOWLOCATION' => true]));
2222
}
@@ -27,7 +27,7 @@ public static function navigateCached(int $expire, string $method, string $url,
2727
* @param array<string,mixed> $options
2828
* @return array<string,mixed>
2929
*/
30-
public static function callCached(int $expire, string $method, string $url, string|array $data, array $headers = [], array $options = []): array
30+
public static function callCached(int $expire, string $method, string $url, mixed $data, array $headers = [], array $options = []): array
3131
{
3232
$key = $method . '_' . $url . '_' . json_encode($data) . '_' . json_encode($headers) . '_' . json_encode($options);
3333
$result = Cache::get($key);
@@ -47,7 +47,7 @@ public static function callCached(int $expire, string $method, string $url, stri
4747
* @param array<string,mixed> $options
4848
* @return array<string,mixed>
4949
*/
50-
public static function navigate(string $method, string $url, string|array $data = '', array $headers = [], array $options = []): array
50+
public static function navigate(string $method, string $url, mixed $data = '', array $headers = [], array $options = []): array
5151
{
5252
return self::call($method, $url, $data, $headers, array_merge($options, array('CURLOPT_FOLLOWLOCATION' => true)));
5353
}
@@ -58,7 +58,7 @@ public static function navigate(string $method, string $url, string|array $data
5858
* @param array<string,mixed> $options
5959
* @return array<string,mixed>
6060
*/
61-
public static function call(string $method, string $url, string|array $data = '', array $headers = [], array $options = []): array
61+
public static function call(string $method, string $url, mixed $data = '', array $headers = [], array $options = []): array
6262
{
6363
if (Debugger::$enabled) {
6464
$time = microtime(true);
@@ -145,7 +145,7 @@ public static function call(string $method, string $url, string|array $data = ''
145145
* @param array<string,string> $headers
146146
* @param array<string,mixed> $options
147147
*/
148-
protected static function setOptions(\CurlHandle $ch, string $method, string &$url, string|array &$data, array $headers, array $options): void
148+
protected static function setOptions(\CurlHandle $ch, string $method, string &$url, mixed &$data, array $headers, array $options): void
149149
{
150150
// Set default options
151151
foreach ($options as $option => $value) {

0 commit comments

Comments
 (0)