php-mod / curl

This library provides an object-oriented and dependency free wrapper of the PHP cURL extension.
MIT License
328 stars 120 forks source link

Docblock to post() is too specific (array) #69

Closed olleharstedt closed 3 years ago

olleharstedt commented 4 years ago

Docblock to post():

    /**
     * Make a post request with optional post data.
     *
     * @param string $url  The url to make the post request
     * @param array  $data Post data to pass to the url
     * @param boolean $asJson Whether the data should be passed as json or not. {@insce 2.2.1}
     * @return self
     */

but then preparePayload accepts

    /**
     * @param array|object|string $data
     */

for $data. Can we update post() with this signature too? Right now, Psalm shows an error because of it.