diff --git a/src/Foundation/Message.php b/src/Foundation/Message.php index 860732a..28efb1d 100644 --- a/src/Foundation/Message.php +++ b/src/Foundation/Message.php @@ -90,9 +90,6 @@ protected function toQuery( return http_build_query($this->toPayload(), $numericPrefix, $argSeparator, $encodingType); } - /** - * @psalm-suppress UndefinedConstant - */ protected function toMultipart(int $options = MULTIPART_TRY_OPEN_FILE): MultipartStream { return new MultipartStream(Utils::multipartFor($this->toPayload(), $options)); diff --git a/src/Foundation/Support/Utils.php b/src/Foundation/Support/Utils.php index da479d4..2fdb178 100644 --- a/src/Foundation/Support/Utils.php +++ b/src/Foundation/Support/Utils.php @@ -18,8 +18,8 @@ use GuzzleHttp\RequestOptions; use Psr\Http\Message\StreamInterface; -\define('MULTIPART_TRY_OPEN_FILE', 1 << 0); -\define('MULTIPART_TRY_OPEN_URL', 1 << 1); +// \define('MULTIPART_TRY_OPEN_FILE', 1 << 0); +// \define('MULTIPART_TRY_OPEN_URL', 1 << 1); /** * @property-read list $defined diff --git a/src/Foundation/Support/helpers.php b/src/Foundation/Support/helpers.php index d1b4dbe..9d95ad5 100644 --- a/src/Foundation/Support/helpers.php +++ b/src/Foundation/Support/helpers.php @@ -11,6 +11,9 @@ * @see https://github.com/guanguans/notify */ +\define('MULTIPART_TRY_OPEN_FILE', 1 << 0); +\define('MULTIPART_TRY_OPEN_URL', 1 << 1); + if (!\function_exists('error_silencer')) { /** * @noinspection ForgottenDebugOutputInspection