Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding macroable to responses #292

Merged
merged 1 commit into from
Jul 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/mantle/http-client/class-response.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use InvalidArgumentException;
use LogicException;
use Mantle\Support\Collection;
use Mantle\Support\Traits\Macroable;
use SimpleXMLElement;
use WP_Error;
use WP_HTTP_Cookie;
Expand All @@ -22,6 +23,8 @@
* Response object from WordPress HTTP API.
*/
class Response implements ArrayAccess {
use Macroable;

/**
* Raw response from `wp_remote_request()`.
*
Expand Down
3 changes: 3 additions & 0 deletions src/mantle/http/class-response.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@
use Mantle\Contracts\Support\Arrayable;
use Mantle\Contracts\Support\Htmlable;
use Mantle\Contracts\Support\Jsonable;
use Mantle\Support\Traits\Macroable;
use Symfony\Component\HttpFoundation\Response as HttpFoundationResponse;
use Symfony\Component\HttpFoundation\ResponseHeaderBag;

/**
* HTTP Response
*/
class Response extends HttpFoundationResponse {
use Macroable;

/**
* The original content of the response.
*
Expand Down