Skip to content

Commit

Permalink
Add to string to Response
Browse files Browse the repository at this point in the history
  • Loading branch information
midnite81 committed Jul 28, 2018
1 parent f90ba6b commit 70bb159
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/.idea
/.test
/build
/docs
/vendor
composer.lock
.DS_Store
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"require-dev": {
"phpunit/phpunit": "^6|^7",
"mockery/mockery": "^1.1",
"satooshi/php-coveralls": "1.0.*"
"satooshi/php-coveralls": "1.0.*",
"symfony/finder": "^4.1"
},
"autoload": {
"psr-4": {
Expand Down
10 changes: 10 additions & 0 deletions src/Services/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,14 @@ public function get($key)
{
return ! empty($this->attributes[$key]) ? $this->attributes[$key] : null;
}

/**
* To String
*
* @return string
*/
public function __toString()
{
return json_encode($this->attributes);
}
}

0 comments on commit 70bb159

Please sign in to comment.