Skip to content

Commit 9dada41

Browse files
authored
Let all main request methods return mixed
Many of them have `string`, but that's not what `exec()` returns and at least when a response parser is used, the returned value is not a string, which confuses tools like type checkers.
1 parent c91a646 commit 9dada41

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Curl/Curl.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ public function progress($callback)
248248
* @param $query_parameters
249249
* @param $data
250250
*
251-
* @return string
251+
* @return mixed
252252
*/
253253
public function delete($url, $query_parameters = array(), $data = array())
254254
{
@@ -459,7 +459,7 @@ public function getOpt($option)
459459
* @param $url
460460
* @param $data
461461
*
462-
* @return string
462+
* @return mixed
463463
*/
464464
public function head($url, $data = array())
465465
{
@@ -480,7 +480,7 @@ public function head($url, $data = array())
480480
* @param $url
481481
* @param $data
482482
*
483-
* @return string
483+
* @return mixed
484484
*/
485485
public function options($url, $data = array())
486486
{
@@ -501,7 +501,7 @@ public function options($url, $data = array())
501501
* @param $url
502502
* @param $data
503503
*
504-
* @return string
504+
* @return mixed
505505
*/
506506
public function patch($url, $data = array())
507507
{
@@ -539,7 +539,7 @@ public function patch($url, $data = array())
539539
* to reset this option. Using these PHP engines, it is therefore impossible to
540540
* restore this behavior on an existing php-curl-class Curl object.
541541
*
542-
* @return string
542+
* @return mixed
543543
*
544544
* [1] https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.2
545545
* [2] https://github.com/php/php-src/pull/531
@@ -585,7 +585,7 @@ public function post($url, $data = array(), $follow_303_with_post = false)
585585
* @param $url
586586
* @param $data
587587
*
588-
* @return string
588+
* @return mixed
589589
*/
590590
public function put($url, $data = array())
591591
{
@@ -614,7 +614,7 @@ public function put($url, $data = array())
614614
* @param $url
615615
* @param $data
616616
*
617-
* @return string
617+
* @return mixed
618618
*/
619619
public function search($url, $data = array())
620620
{

0 commit comments

Comments
 (0)