{"action":"created","issue":{"url":"https://api.github.com/repos/slimphp/Slim/issues/1595","labels_url":"https://api.github.com/repos/slimphp/Slim/issues/1595/labels{/name}","comments_url":"https://api.github.com/repos/slimphp/Slim/issues/1595/comments","events_url":"https://api.github.com/repos/slimphp/Slim/issues/1595/events","html_url":"https://github.com/slimphp/Slim/pull/1595","id":117116235,"number":1595,"title":"Changed inline output of NotAllowed to use protected functions","user":{"login":"pokmot","id":546113,"avatar_url":"https://avatars.githubusercontent.com/u/546113?v=3","gravatar_id":"","url":"https://api.github.com/users/pokmot","html_url":"https://github.com/pokmot","followers_url":"https://api.github.com/users/pokmot/followers","following_url":"https://api.github.com/users/pokmot/following{/other_user}","gists_url":"https://api.github.com/users/pokmot/gists{/gist_id}","starred_url":"https://api.github.com/users/pokmot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pokmot/subscriptions","organizations_url":"https://api.github.com/users/pokmot/orgs","repos_url":"https://api.github.com/users/pokmot/repos","events_url":"https://api.github.com/users/pokmot/events{/privacy}","received_events_url":"https://api.github.com/users/pokmot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/slimphp/Slim/labels/Slim%203","name":"Slim 3","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/slimphp/Slim/milestones/24","html_url":"https://github.com/slimphp/Slim/milestones/3.0.0%20RC3","labels_url":"https://api.github.com/repos/slimphp/Slim/milestones/24/labels","id":1414120,"number":24,"title":"3.0.0 RC3","description":"","creator":{"login":"silentworks","id":79497,"avatar_url":"https://avatars.githubusercontent.com/u/79497?v=3","gravatar_id":"","url":"https://api.github.com/users/silentworks","html_url":"https://github.com/silentworks","followers_url":"https://api.github.com/users/silentworks/followers","following_url":"https://api.github.com/users/silentworks/following{/other_user}","gists_url":"https://api.github.com/users/silentworks/gists{/gist_id}","starred_url":"https://api.github.com/users/silentworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silentworks/subscriptions","organizations_url":"https://api.github.com/users/silentworks/orgs","repos_url":"https://api.github.com/users/silentworks/repos","events_url":"https://api.github.com/users/silentworks/events{/privacy}","received_events_url":"https://api.github.com/users/silentworks/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":0,"state":"open","created_at":"2015-11-16T16:53:37Z","updated_at":"2015-11-16T16:55:52Z","due_on":"2015-12-19T00:00:00Z","closed_at":null},"comments":3,"created_at":"2015-11-16T12:49:15Z","updated_at":"2015-11-16T22:57:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/slimphp/Slim/pulls/1595","html_url":"https://github.com/slimphp/Slim/pull/1595","diff_url":"https://github.com/slimphp/Slim/pull/1595.diff","patch_url":"https://github.com/slimphp/Slim/pull/1595.patch"},"body":"This way the class can be extended and messages customized by overriding the method.\r\n\r\nAlso reintroduced 'default:', line 66, in the switch test as otherwise $output could be undefined when reaching line 74.\r\n\r\nDiscussed in issue #1588 "},"comment":{"url":"https://api.github.com/repos/slimphp/Slim/issues/comments/157201638","html_url":"https://github.com/slimphp/Slim/pull/1595#issuecomment-157201638","issue_url":"https://api.github.com/repos/slimphp/Slim/issues/1595","id":157201638,"user":{"login":"juliangut","id":1104131,"avatar_url":"https://avatars.githubusercontent.com/u/1104131?v=3","gravatar_id":"","url":"https://api.github.com/users/juliangut","html_url":"https://github.com/juliangut","followers_url":"https://api.github.com/users/juliangut/followers","following_url":"https://api.github.com/users/juliangut/following{/other_user}","gists_url":"https://api.github.com/users/juliangut/gists{/gist_id}","starred_url":"https://api.github.com/users/juliangut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliangut/subscriptions","organizations_url":"https://api.github.com/users/juliangut/orgs","repos_url":"https://api.github.com/users/juliangut/repos","events_url":"https://api.github.com/users/juliangut/events{/privacy}","received_events_url":"https://api.github.com/users/juliangut/received_events","type":"User","site_admin":false},"created_at":"2015-11-16T22:57:59Z","updated_at":"2015-11-16T22:57:59Z","body":"Another thing, @pokmot comments that default is needed so that $output is not undefined BUT as $contentType is determied by an array_intersect $contentType will always have one of `$this->knownContentTypes` or \"text/html\" anyway. I'm not against `default` on switch statements of course but I consider it unnecessary when the possible values are all controlled"}}