From 8f0f50fa9601a9c702946d0672ffb66e5e7f645a Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Mon, 3 Oct 2016 16:09:47 +0900 Subject: [PATCH] use toString() over string cast --- composer.json | 2 +- src/Provide/Transfer/HttpResponder.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index ab4d21a6..d5e5108c 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ ], "require": { "php": ">=5.5.0", - "bear/resource": "~1.0", + "bear/resource": "~1.3", "doctrine/cache": "~1.0", "psr/log": "~1.0" }, diff --git a/src/Provide/Transfer/HttpResponder.php b/src/Provide/Transfer/HttpResponder.php index 5d5a282e..e1ed496a 100644 --- a/src/Provide/Transfer/HttpResponder.php +++ b/src/Provide/Transfer/HttpResponder.php @@ -18,7 +18,7 @@ public function __invoke(ResourceObject $resourceObject, array $server) { unset($server); // render - $body = (string) $resourceObject; + $body = $resourceObject->toString(); // code http_response_code($resourceObject->code); @@ -32,3 +32,4 @@ public function __invoke(ResourceObject $resourceObject, array $server) echo $body; } } +