{"action":"created","comment":{"url":"https://api.github.com/repos/slimphp/Slim/pulls/comments/64793614","id":64793614,"diff_hunk":"@@ -72,15 +72,15 @@ class Route extends Routable implements RouteInterface\n     /**\n      * Create new route\n      *\n-     * @param string[]     $methods The route HTTP methods\n-     * @param string       $pattern The route pattern\n-     * @param callable     $callable The route callable\n-     * @param int          $identifier The route identifier\n-     * @param RouteGroup[] $groups The parent route groups\n+     * @param string|string[]   $methods The route HTTP methods\n+     * @param string            $pattern The route pattern\n+     * @param callable          $callable The route callable\n+     * @param RouteGroup[]      $groups The parent route groups\n+     * @param int               $identifier The route identifier\n      */\n     public function __construct($methods, $pattern, $callable, $groups = [], $identifier = 0)\n     {\n-        $this->methods  = $methods;\n+        $this->methods  = is_string($methods) ? [$methods] : $methods;","path":"Slim/Route.php","position":18,"original_position":18,"commit_id":"1ac64601141105f25e91deab22000f43ea57b8a6","original_commit_id":"1ac64601141105f25e91deab22000f43ea57b8a6","user":{"login":"llvdl","id":6775525,"avatar_url":"https://avatars.githubusercontent.com/u/6775525?v=3","gravatar_id":"","url":"https://api.github.com/users/llvdl","html_url":"https://github.com/llvdl","followers_url":"https://api.github.com/users/llvdl/followers","following_url":"https://api.github.com/users/llvdl/following{/other_user}","gists_url":"https://api.github.com/users/llvdl/gists{/gist_id}","starred_url":"https://api.github.com/users/llvdl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llvdl/subscriptions","organizations_url":"https://api.github.com/users/llvdl/orgs","repos_url":"https://api.github.com/users/llvdl/repos","events_url":"https://api.github.com/users/llvdl/events{/privacy}","received_events_url":"https://api.github.com/users/llvdl/received_events","type":"User","site_admin":false},"body":"Because FastRoute supports both a string parameter and an array of string. Because there is no `array` typehint on `$methods`, `string` was already supported. I updated the docblock to reflect this. \r\n\r\nAlso, when setting `Route::$methods` in the constructor, the value is set to an array, so `Route::getMethods()` always returns an array as stated in the docblock.","created_at":"2016-05-26T18:12:48Z","updated_at":"2016-05-26T18:12:48Z","html_url":"https://github.com/slimphp/Slim/pull/1889#discussion_r64793614","pull_request_url":"https://api.github.com/repos/slimphp/Slim/pulls/1889","_links":{"self":{"href":"https://api.github.com/repos/slimphp/Slim/pulls/comments/64793614"},"html":{"href":"https://github.com/slimphp/Slim/pull/1889#discussion_r64793614"},"pull_request":{"href":"https://api.github.com/repos/slimphp/Slim/pulls/1889"}}},"pull_request":{"url":"https://api.github.com/repos/slimphp/Slim/pulls/1889","id":70985520,"html_url":"https://github.com/slimphp/Slim/pull/1889","diff_url":"https://github.com/slimphp/Slim/pull/1889.diff","patch_url":"https://github.com/slimphp/Slim/pull/1889.patch","issue_url":"https://api.github.com/repos/slimphp/Slim/issues/1889","number":1889,"state":"open","locked":false,"title":"Small fixes","user":{"login":"llvdl","id":6775525,"avatar_url":"https://avatars.githubusercontent.com/u/6775525?v=3","gravatar_id":"","url":"https://api.github.com/users/llvdl","html_url":"https://github.com/llvdl","followers_url":"https://api.github.com/users/llvdl/followers","following_url":"https://api.github.com/users/llvdl/following{/other_user}","gists_url":"https://api.github.com/users/llvdl/gists{/gist_id}","starred_url":"https://api.github.com/users/llvdl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llvdl/subscriptions","organizations_url":"https://api.github.com/users/llvdl/orgs","repos_url":"https://api.github.com/users/llvdl/repos","events_url":"https://api.github.com/users/llvdl/events{/privacy}","received_events_url":"https://api.github.com/users/llvdl/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-22T19:17:02Z","updated_at":"2016-05-26T18:12:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"abed94829cbe3062cf5d08c6efad97cc93f78f07","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/slimphp/Slim/pulls/1889/commits","review_comments_url":"https://api.github.com/repos/slimphp/Slim/pulls/1889/comments","review_comment_url":"https://api.github.com/repos/slimphp/Slim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/slimphp/Slim/issues/1889/comments","statuses_url":"https://api.github.com/repos/slimphp/Slim/statuses/1ac64601141105f25e91deab22000f43ea57b8a6","head":{"label":"llvdl:small-fixes","ref":"small-fixes","sha":"1ac64601141105f25e91deab22000f43ea57b8a6","user":{"login":"llvdl","id":6775525,"avatar_url":"https://avatars.githubusercontent.com/u/6775525?v=3","gravatar_id":"","url":"https://api.github.com/users/llvdl","html_url":"https://github.com/llvdl","followers_url":"https://api.github.com/users/llvdl/followers","following_url":"https://api.github.com/users/llvdl/following{/other_user}","gists_url":"https://api.github.com/users/llvdl/gists{/gist_id}","starred_url":"https://api.github.com/users/llvdl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llvdl/subscriptions","organizations_url":"https://api.github.com/users/llvdl/orgs","repos_url":"https://api.github.com/users/llvdl/repos","events_url":"https://api.github.com/users/llvdl/events{/privacy}","received_events_url":"https://api.github.com/users/llvdl/received_events","type":"User","site_admin":false},"repo":{"id":55999329,"name":"Slim","full_name":"llvdl/Slim","owner":{"login":"llvdl","id":6775525,"avatar_url":"https://avatars.githubusercontent.com/u/6775525?v=3","gravatar_id":"","url":"https://api.github.com/users/llvdl","html_url":"https://github.com/llvdl","followers_url":"https://api.github.com/users/llvdl/followers","following_url":"https://api.github.com/users/llvdl/following{/other_user}","gists_url":"https://api.github.com/users/llvdl/gists{/gist_id}","starred_url":"https://api.github.com/users/llvdl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llvdl/subscriptions","organizations_url":"https://api.github.com/users/llvdl/orgs","repos_url":"https://api.github.com/users/llvdl/repos","events_url":"https://api.github.com/users/llvdl/events{/privacy}","received_events_url":"https://api.github.com/users/llvdl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/llvdl/Slim","description":"Slim Framework source code","fork":true,"url":"https://api.github.com/repos/llvdl/Slim","forks_url":"https://api.github.com/repos/llvdl/Slim/forks","keys_url":"https://api.github.com/repos/llvdl/Slim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/llvdl/Slim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/llvdl/Slim/teams","hooks_url":"https://api.github.com/repos/llvdl/Slim/hooks","issue_events_url":"https://api.github.com/repos/llvdl/Slim/issues/events{/number}","events_url":"https://api.github.com/repos/llvdl/Slim/events","assignees_url":"https://api.github.com/repos/llvdl/Slim/assignees{/user}","branches_url":"https://api.github.com/repos/llvdl/Slim/branches{/branch}","tags_url":"https://api.github.com/repos/llvdl/Slim/tags","blobs_url":"https://api.github.com/repos/llvdl/Slim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/llvdl/Slim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/llvdl/Slim/git/refs{/sha}","trees_url":"https://api.github.com/repos/llvdl/Slim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/llvdl/Slim/statuses/{sha}","languages_url":"https://api.github.com/repos/llvdl/Slim/languages","stargazers_url":"https://api.github.com/repos/llvdl/Slim/stargazers","contributors_url":"https://api.github.com/repos/llvdl/Slim/contributors","subscribers_url":"https://api.github.com/repos/llvdl/Slim/subscribers","subscription_url":"https://api.github.com/repos/llvdl/Slim/subscription","commits_url":"https://api.github.com/repos/llvdl/Slim/commits{/sha}","git_commits_url":"https://api.github.com/repos/llvdl/Slim/git/commits{/sha}","comments_url":"https://api.github.com/repos/llvdl/Slim/comments{/number}","issue_comment_url":"https://api.github.com/repos/llvdl/Slim/issues/comments{/number}","contents_url":"https://api.github.com/repos/llvdl/Slim/contents/{+path}","compare_url":"https://api.github.com/repos/llvdl/Slim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/llvdl/Slim/merges","archive_url":"https://api.github.com/repos/llvdl/Slim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/llvdl/Slim/downloads","issues_url":"https://api.github.com/repos/llvdl/Slim/issues{/number}","pulls_url":"https://api.github.com/repos/llvdl/Slim/pulls{/number}","milestones_url":"https://api.github.com/repos/llvdl/Slim/milestones{/number}","notifications_url":"https://api.github.com/repos/llvdl/Slim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/llvdl/Slim/labels{/name}","releases_url":"https://api.github.com/repos/llvdl/Slim/releases{/id}","deployments_url":"https://api.github.com/repos/llvdl/Slim/deployments","created_at":"2016-04-11T19:03:26Z","updated_at":"2016-04-11T19:03:28Z","pushed_at":"2016-05-23T18:57:51Z","git_url":"git://github.com/llvdl/Slim.git","ssh_url":"git@github.com:llvdl/Slim.git","clone_url":"https://github.com/llvdl/Slim.git","svn_url":"https://github.com/llvdl/Slim","homepage":"http://slimframework.com","size":4800,"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":"3.x"}},"base":{"label":"slimphp:3.x","ref":"3.x","sha":"dbd275b11d791635d74df04135cd0ab3dbefdb0f","user":{"login":"slimphp","id":11195762,"avatar_url":"https://avatars.githubusercontent.com/u/11195762?v=3","gravatar_id":"","url":"https://api.github.com/users/slimphp","html_url":"https://github.com/slimphp","followers_url":"https://api.github.com/users/slimphp/followers","following_url":"https://api.github.com/users/slimphp/following{/other_user}","gists_url":"https://api.github.com/users/slimphp/gists{/gist_id}","starred_url":"https://api.github.com/users/slimphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slimphp/subscriptions","organizations_url":"https://api.github.com/users/slimphp/orgs","repos_url":"https://api.github.com/users/slimphp/repos","events_url":"https://api.github.com/users/slimphp/events{/privacy}","received_events_url":"https://api.github.com/users/slimphp/received_events","type":"Organization","site_admin":false},"repo":{"id":926544,"name":"Slim","full_name":"slimphp/Slim","owner":{"login":"slimphp","id":11195762,"avatar_url":"https://avatars.githubusercontent.com/u/11195762?v=3","gravatar_id":"","url":"https://api.github.com/users/slimphp","html_url":"https://github.com/slimphp","followers_url":"https://api.github.com/users/slimphp/followers","following_url":"https://api.github.com/users/slimphp/following{/other_user}","gists_url":"https://api.github.com/users/slimphp/gists{/gist_id}","starred_url":"https://api.github.com/users/slimphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slimphp/subscriptions","organizations_url":"https://api.github.com/users/slimphp/orgs","repos_url":"https://api.github.com/users/slimphp/repos","events_url":"https://api.github.com/users/slimphp/events{/privacy}","received_events_url":"https://api.github.com/users/slimphp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/slimphp/Slim","description":"Slim Framework source code","fork":false,"url":"https://api.github.com/repos/slimphp/Slim","forks_url":"https://api.github.com/repos/slimphp/Slim/forks","keys_url":"https://api.github.com/repos/slimphp/Slim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/slimphp/Slim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/slimphp/Slim/teams","hooks_url":"https://api.github.com/repos/slimphp/Slim/hooks","issue_events_url":"https://api.github.com/repos/slimphp/Slim/issues/events{/number}","events_url":"https://api.github.com/repos/slimphp/Slim/events","assignees_url":"https://api.github.com/repos/slimphp/Slim/assignees{/user}","branches_url":"https://api.github.com/repos/slimphp/Slim/branches{/branch}","tags_url":"https://api.github.com/repos/slimphp/Slim/tags","blobs_url":"https://api.github.com/repos/slimphp/Slim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/slimphp/Slim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/slimphp/Slim/git/refs{/sha}","trees_url":"https://api.github.com/repos/slimphp/Slim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/slimphp/Slim/statuses/{sha}","languages_url":"https://api.github.com/repos/slimphp/Slim/languages","stargazers_url":"https://api.github.com/repos/slimphp/Slim/stargazers","contributors_url":"https://api.github.com/repos/slimphp/Slim/contributors","subscribers_url":"https://api.github.com/repos/slimphp/Slim/subscribers","subscription_url":"https://api.github.com/repos/slimphp/Slim/subscription","commits_url":"https://api.github.com/repos/slimphp/Slim/commits{/sha}","git_commits_url":"https://api.github.com/repos/slimphp/Slim/git/commits{/sha}","comments_url":"https://api.github.com/repos/slimphp/Slim/comments{/number}","issue_comment_url":"https://api.github.com/repos/slimphp/Slim/issues/comments{/number}","contents_url":"https://api.github.com/repos/slimphp/Slim/contents/{+path}","compare_url":"https://api.github.com/repos/slimphp/Slim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/slimphp/Slim/merges","archive_url":"https://api.github.com/repos/slimphp/Slim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/slimphp/Slim/downloads","issues_url":"https://api.github.com/repos/slimphp/Slim/issues{/number}","pulls_url":"https://api.github.com/repos/slimphp/Slim/pulls{/number}","milestones_url":"https://api.github.com/repos/slimphp/Slim/milestones{/number}","notifications_url":"https://api.github.com/repos/slimphp/Slim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/slimphp/Slim/labels{/name}","releases_url":"https://api.github.com/repos/slimphp/Slim/releases{/id}","deployments_url":"https://api.github.com/repos/slimphp/Slim/deployments","created_at":"2010-09-21T01:17:06Z","updated_at":"2016-05-26T02:39:55Z","pushed_at":"2016-05-26T08:21:20Z","git_url":"git://github.com/slimphp/Slim.git","ssh_url":"git@github.com:slimphp/Slim.git","clone_url":"https://github.com/slimphp/Slim.git","svn_url":"https://github.com/slimphp/Slim","homepage":"http://slimframework.com","size":8977,"stargazers_count":6752,"watchers_count":6752,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1308,"mirror_url":null,"open_issues_count":25,"forks":1308,"open_issues":25,"watchers":6752,"default_branch":"3.x"}},"_links":{"self":{"href":"https://api.github.com/repos/slimphp/Slim/pulls/1889"},"html":{"href":"https://github.com/slimphp/Slim/pull/1889"},"issue":{"href":"https://api.github.com/repos/slimphp/Slim/issues/1889"},"comments":{"href":"https://api.github.com/repos/slimphp/Slim/issues/1889/comments"},"review_comments":{"href":"https://api.github.com/repos/slimphp/Slim/pulls/1889/comments"},"review_comment":{"href":"https://api.github.com/repos/slimphp/Slim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/slimphp/Slim/pulls/1889/commits"},"statuses":{"href":"https://api.github.com/repos/slimphp/Slim/statuses/1ac64601141105f25e91deab22000f43ea57b8a6"}}}}
{"actor":{"display_login":"llvdl"}}