{"action":"created","comment":{"url":"https://api.github.com/repos/equip/framework/pulls/comments/62433204","id":62433204,"diff_hunk":"@@ -26,27 +25,42 @@ public function __construct(Engine $engine)\n      */\n     public function body(PayloadInterface $payload)\n     {\n-        $template = $this->template($payload);\n-        $template = $this->engine->make($template);\n-        return $this->render($template, $payload);\n+        return $this->render($payload);\n     }\n \n     /**\n      * @param PayloadInterface $payload\n+     *\n      * @return string\n      */\n+    protected function render(PayloadInterface $payload)\n+    {\n+        $template = $this->template($payload);\n+        $output = $this->output($payload);\n+\n+        return $this->engine->render($template, $output);\n+    }\n+\n+    /**\n+     * @param PayloadInterface $payload\n+     *\n+     * @return string Template name\n+     */\n     protected function template(PayloadInterface $payload)\n     {\n         return $payload->getOutput()['template'];\n     }\n \n     /**\n-     * @param Template $template\n      * @param PayloadInterface $payload\n-     * @return string\n+     *\n+     * @return array $output\n      */\n-    protected function render(Template $template, PayloadInterface $payload)\n+    protected function output(PayloadInterface $payload)\n     {\n-        return $template->render($payload->getOutput());\n+        $output = $payload->getOutput();\n+        unset($output['template']);","path":"src/Formatter/PlatesFormatter.php","position":53,"original_position":53,"commit_id":"176b2d0050977d178c8d52ab996e5b405ba2b82b","original_commit_id":"176b2d0050977d178c8d52ab996e5b405ba2b82b","user":{"login":"shadowhand","id":38203,"avatar_url":"https://avatars.githubusercontent.com/u/38203?v=3","gravatar_id":"","url":"https://api.github.com/users/shadowhand","html_url":"https://github.com/shadowhand","followers_url":"https://api.github.com/users/shadowhand/followers","following_url":"https://api.github.com/users/shadowhand/following{/other_user}","gists_url":"https://api.github.com/users/shadowhand/gists{/gist_id}","starred_url":"https://api.github.com/users/shadowhand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shadowhand/subscriptions","organizations_url":"https://api.github.com/users/shadowhand/orgs","repos_url":"https://api.github.com/users/shadowhand/repos","events_url":"https://api.github.com/users/shadowhand/events{/privacy}","received_events_url":"https://api.github.com/users/shadowhand/received_events","type":"User","site_admin":false},"body":"I'm not sure I see the benefit to doing this. What if you wanted to render the template name for debugging purposes? What are you gaining by removing this?","created_at":"2016-05-08T14:59:25Z","updated_at":"2016-05-08T14:59:25Z","html_url":"https://github.com/equip/framework/pull/40#discussion_r62433204","pull_request_url":"https://api.github.com/repos/equip/framework/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/equip/framework/pulls/comments/62433204"},"html":{"href":"https://github.com/equip/framework/pull/40#discussion_r62433204"},"pull_request":{"href":"https://api.github.com/repos/equip/framework/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/equip/framework/pulls/40","id":69249422,"html_url":"https://github.com/equip/framework/pull/40","diff_url":"https://github.com/equip/framework/pull/40.diff","patch_url":"https://github.com/equip/framework/pull/40.patch","issue_url":"https://api.github.com/repos/equip/framework/issues/40","number":40,"state":"open","locked":false,"title":"Refactoring PlatesFormatter","user":{"login":"AlexMasterov","id":700213,"avatar_url":"https://avatars.githubusercontent.com/u/700213?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexMasterov","html_url":"https://github.com/AlexMasterov","followers_url":"https://api.github.com/users/AlexMasterov/followers","following_url":"https://api.github.com/users/AlexMasterov/following{/other_user}","gists_url":"https://api.github.com/users/AlexMasterov/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexMasterov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexMasterov/subscriptions","organizations_url":"https://api.github.com/users/AlexMasterov/orgs","repos_url":"https://api.github.com/users/AlexMasterov/repos","events_url":"https://api.github.com/users/AlexMasterov/events{/privacy}","received_events_url":"https://api.github.com/users/AlexMasterov/received_events","type":"User","site_admin":false},"body":"Refactoring `PlatesFormatter` and corrected his test for this branch.\r\nI also added the method [`PlatesFormatter::output`](https://github.com/equip/framework/blob/085cdf7b5d016b6dd4186a22333fea8f25765776/src/Formatter/PlatesFormatter.php#L59) to remove from the array output template name.\r\n\r\nI think that key for a template name needs the suffix `@template` or something. A value should be formatted like `@domain::index`. But the difficulty is to do this for any formatter that uses templates. (Unification)","created_at":"2016-05-07T18:35:05Z","updated_at":"2016-05-08T14:59:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a8292ed3280e85232ce1bfd32335a7ee2b3a5c41","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/equip/framework/pulls/40/commits","review_comments_url":"https://api.github.com/repos/equip/framework/pulls/40/comments","review_comment_url":"https://api.github.com/repos/equip/framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/equip/framework/issues/40/comments","statuses_url":"https://api.github.com/repos/equip/framework/statuses/176b2d0050977d178c8d52ab996e5b405ba2b82b","head":{"label":"AlexMasterov:fix/status-responder","ref":"fix/status-responder","sha":"176b2d0050977d178c8d52ab996e5b405ba2b82b","user":{"login":"AlexMasterov","id":700213,"avatar_url":"https://avatars.githubusercontent.com/u/700213?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexMasterov","html_url":"https://github.com/AlexMasterov","followers_url":"https://api.github.com/users/AlexMasterov/followers","following_url":"https://api.github.com/users/AlexMasterov/following{/other_user}","gists_url":"https://api.github.com/users/AlexMasterov/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexMasterov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexMasterov/subscriptions","organizations_url":"https://api.github.com/users/AlexMasterov/orgs","repos_url":"https://api.github.com/users/AlexMasterov/repos","events_url":"https://api.github.com/users/AlexMasterov/events{/privacy}","received_events_url":"https://api.github.com/users/AlexMasterov/received_events","type":"User","site_admin":false},"repo":{"id":56206091,"name":"framework","full_name":"AlexMasterov/framework","owner":{"login":"AlexMasterov","id":700213,"avatar_url":"https://avatars.githubusercontent.com/u/700213?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexMasterov","html_url":"https://github.com/AlexMasterov","followers_url":"https://api.github.com/users/AlexMasterov/followers","following_url":"https://api.github.com/users/AlexMasterov/following{/other_user}","gists_url":"https://api.github.com/users/AlexMasterov/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexMasterov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexMasterov/subscriptions","organizations_url":"https://api.github.com/users/AlexMasterov/orgs","repos_url":"https://api.github.com/users/AlexMasterov/repos","events_url":"https://api.github.com/users/AlexMasterov/events{/privacy}","received_events_url":"https://api.github.com/users/AlexMasterov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AlexMasterov/framework","description":"A tiny, yet powerful, PHP micro-framework.","fork":true,"url":"https://api.github.com/repos/AlexMasterov/framework","forks_url":"https://api.github.com/repos/AlexMasterov/framework/forks","keys_url":"https://api.github.com/repos/AlexMasterov/framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlexMasterov/framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlexMasterov/framework/teams","hooks_url":"https://api.github.com/repos/AlexMasterov/framework/hooks","issue_events_url":"https://api.github.com/repos/AlexMasterov/framework/issues/events{/number}","events_url":"https://api.github.com/repos/AlexMasterov/framework/events","assignees_url":"https://api.github.com/repos/AlexMasterov/framework/assignees{/user}","branches_url":"https://api.github.com/repos/AlexMasterov/framework/branches{/branch}","tags_url":"https://api.github.com/repos/AlexMasterov/framework/tags","blobs_url":"https://api.github.com/repos/AlexMasterov/framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlexMasterov/framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlexMasterov/framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlexMasterov/framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlexMasterov/framework/statuses/{sha}","languages_url":"https://api.github.com/repos/AlexMasterov/framework/languages","stargazers_url":"https://api.github.com/repos/AlexMasterov/framework/stargazers","contributors_url":"https://api.github.com/repos/AlexMasterov/framework/contributors","subscribers_url":"https://api.github.com/repos/AlexMasterov/framework/subscribers","subscription_url":"https://api.github.com/repos/AlexMasterov/framework/subscription","commits_url":"https://api.github.com/repos/AlexMasterov/framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlexMasterov/framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlexMasterov/framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlexMasterov/framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlexMasterov/framework/contents/{+path}","compare_url":"https://api.github.com/repos/AlexMasterov/framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlexMasterov/framework/merges","archive_url":"https://api.github.com/repos/AlexMasterov/framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlexMasterov/framework/downloads","issues_url":"https://api.github.com/repos/AlexMasterov/framework/issues{/number}","pulls_url":"https://api.github.com/repos/AlexMasterov/framework/pulls{/number}","milestones_url":"https://api.github.com/repos/AlexMasterov/framework/milestones{/number}","notifications_url":"https://api.github.com/repos/AlexMasterov/framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlexMasterov/framework/labels{/name}","releases_url":"https://api.github.com/repos/AlexMasterov/framework/releases{/id}","deployments_url":"https://api.github.com/repos/AlexMasterov/framework/deployments","created_at":"2016-04-14T04:01:24Z","updated_at":"2016-04-14T04:01:25Z","pushed_at":"2016-05-07T18:14:30Z","git_url":"git://github.com/AlexMasterov/framework.git","ssh_url":"git@github.com:AlexMasterov/framework.git","clone_url":"https://github.com/AlexMasterov/framework.git","svn_url":"https://github.com/AlexMasterov/framework","homepage":"http://equip.github.io","size":324,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"equip:fix/status-responder","ref":"fix/status-responder","sha":"f7537ee36b8abfc36682d27fdffa5883fad44b22","user":{"login":"equip","id":16503086,"avatar_url":"https://avatars.githubusercontent.com/u/16503086?v=3","gravatar_id":"","url":"https://api.github.com/users/equip","html_url":"https://github.com/equip","followers_url":"https://api.github.com/users/equip/followers","following_url":"https://api.github.com/users/equip/following{/other_user}","gists_url":"https://api.github.com/users/equip/gists{/gist_id}","starred_url":"https://api.github.com/users/equip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/equip/subscriptions","organizations_url":"https://api.github.com/users/equip/orgs","repos_url":"https://api.github.com/users/equip/repos","events_url":"https://api.github.com/users/equip/events{/privacy}","received_events_url":"https://api.github.com/users/equip/received_events","type":"Organization","site_admin":false},"repo":{"id":49070457,"name":"framework","full_name":"equip/framework","owner":{"login":"equip","id":16503086,"avatar_url":"https://avatars.githubusercontent.com/u/16503086?v=3","gravatar_id":"","url":"https://api.github.com/users/equip","html_url":"https://github.com/equip","followers_url":"https://api.github.com/users/equip/followers","following_url":"https://api.github.com/users/equip/following{/other_user}","gists_url":"https://api.github.com/users/equip/gists{/gist_id}","starred_url":"https://api.github.com/users/equip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/equip/subscriptions","organizations_url":"https://api.github.com/users/equip/orgs","repos_url":"https://api.github.com/users/equip/repos","events_url":"https://api.github.com/users/equip/events{/privacy}","received_events_url":"https://api.github.com/users/equip/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/equip/framework","description":"A tiny, yet powerful, PHP micro-framework.","fork":false,"url":"https://api.github.com/repos/equip/framework","forks_url":"https://api.github.com/repos/equip/framework/forks","keys_url":"https://api.github.com/repos/equip/framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/equip/framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/equip/framework/teams","hooks_url":"https://api.github.com/repos/equip/framework/hooks","issue_events_url":"https://api.github.com/repos/equip/framework/issues/events{/number}","events_url":"https://api.github.com/repos/equip/framework/events","assignees_url":"https://api.github.com/repos/equip/framework/assignees{/user}","branches_url":"https://api.github.com/repos/equip/framework/branches{/branch}","tags_url":"https://api.github.com/repos/equip/framework/tags","blobs_url":"https://api.github.com/repos/equip/framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/equip/framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/equip/framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/equip/framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/equip/framework/statuses/{sha}","languages_url":"https://api.github.com/repos/equip/framework/languages","stargazers_url":"https://api.github.com/repos/equip/framework/stargazers","contributors_url":"https://api.github.com/repos/equip/framework/contributors","subscribers_url":"https://api.github.com/repos/equip/framework/subscribers","subscription_url":"https://api.github.com/repos/equip/framework/subscription","commits_url":"https://api.github.com/repos/equip/framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/equip/framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/equip/framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/equip/framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/equip/framework/contents/{+path}","compare_url":"https://api.github.com/repos/equip/framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/equip/framework/merges","archive_url":"https://api.github.com/repos/equip/framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/equip/framework/downloads","issues_url":"https://api.github.com/repos/equip/framework/issues{/number}","pulls_url":"https://api.github.com/repos/equip/framework/pulls{/number}","milestones_url":"https://api.github.com/repos/equip/framework/milestones{/number}","notifications_url":"https://api.github.com/repos/equip/framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/equip/framework/labels{/name}","releases_url":"https://api.github.com/repos/equip/framework/releases{/id}","deployments_url":"https://api.github.com/repos/equip/framework/deployments","created_at":"2016-01-05T14:20:46Z","updated_at":"2016-05-08T06:25:03Z","pushed_at":"2016-05-07T18:35:06Z","git_url":"git://github.com/equip/framework.git","ssh_url":"git@github.com:equip/framework.git","clone_url":"https://github.com/equip/framework.git","svn_url":"https://github.com/equip/framework","homepage":"http://equip.github.io","size":332,"stargazers_count":37,"watchers_count":37,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":3,"forks":19,"open_issues":3,"watchers":37,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/equip/framework/pulls/40"},"html":{"href":"https://github.com/equip/framework/pull/40"},"issue":{"href":"https://api.github.com/repos/equip/framework/issues/40"},"comments":{"href":"https://api.github.com/repos/equip/framework/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/equip/framework/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/equip/framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/equip/framework/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/equip/framework/statuses/176b2d0050977d178c8d52ab996e5b405ba2b82b"}}}}