Skip to content

Commit

Permalink
fix(Support): Fix undefined constant issue
Browse files Browse the repository at this point in the history
- Commented out unnecessary constant definitions in Utils.php and helpers.php files
  • Loading branch information
guanguans committed Jun 14, 2024
1 parent a1dca16 commit 87368a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 0 additions & 3 deletions src/Foundation/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions src/Foundation/Support/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> $defined
Expand Down
3 changes: 3 additions & 0 deletions src/Foundation/Support/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 87368a6

Please sign in to comment.