{"action":"created","comment":{"url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/pulls/comments/37436200","id":37436200,"diff_hunk":"@@ -0,0 +1,34 @@\n+<?php\n+\n+namespace Wikibase\\DataModel\\Services\\Lookup;\n+\n+use Wikibase\\DataModel\\Entity\\EntityId;\n+\n+/**\n+ * @since 1.2\n+ *\n+ * @licence GNU GPL v2+\n+ * @author Adam Shorland\n+ */\n+class PropertyDataTypeLookupException extends \\RuntimeException {\n+\n+\tprivate $entityId;\n+\n+\tpublic function __construct( EntityId $entityId, $message = null, \\Exception $previous = null ) {","path":"src/Lookup/PropertyDataTypeLookupException.php","position":17,"original_position":17,"commit_id":"b8f3a3da7405875a0156aa78214ead7df354dbf6","original_commit_id":"b8f3a3da7405875a0156aa78214ead7df354dbf6","user":{"login":"JeroenDeDauw","id":146040,"avatar_url":"https://avatars.githubusercontent.com/u/146040?v=3","gravatar_id":"","url":"https://api.github.com/users/JeroenDeDauw","html_url":"https://github.com/JeroenDeDauw","followers_url":"https://api.github.com/users/JeroenDeDauw/followers","following_url":"https://api.github.com/users/JeroenDeDauw/following{/other_user}","gists_url":"https://api.github.com/users/JeroenDeDauw/gists{/gist_id}","starred_url":"https://api.github.com/users/JeroenDeDauw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeroenDeDauw/subscriptions","organizations_url":"https://api.github.com/users/JeroenDeDauw/orgs","repos_url":"https://api.github.com/users/JeroenDeDauw/repos","events_url":"https://api.github.com/users/JeroenDeDauw/events{/privacy}","received_events_url":"https://api.github.com/users/JeroenDeDauw/received_events","type":"User","site_admin":false},"body":"`PropertyId`","created_at":"2015-08-19T16:35:09Z","updated_at":"2015-08-19T16:35:09Z","html_url":"https://github.com/wmde/WikibaseDataModelServices/pull/44#discussion_r37436200","pull_request_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/pulls/44","_links":{"self":{"href":"https://api.github.com/repos/wmde/WikibaseDataModelServices/pulls/comments/37436200"},"html":{"href":"https://github.com/wmde/WikibaseDataModelServices/pull/44#discussion_r37436200"},"pull_request":{"href":"https://api.github.com/repos/wmde/WikibaseDataModelServices/pulls/44"}}},"pull_request":{"url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/pulls/44","id":42581302,"html_url":"https://github.com/wmde/WikibaseDataModelServices/pull/44","diff_url":"https://github.com/wmde/WikibaseDataModelServices/pull/44.diff","patch_url":"https://github.com/wmde/WikibaseDataModelServices/pull/44.patch","issue_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/issues/44","number":44,"state":"open","locked":false,"title":"Cleanup throws and null returns in all Lookups RFC","user":{"login":"addshore","id":3308769,"avatar_url":"https://avatars.githubusercontent.com/u/3308769?v=3","gravatar_id":"","url":"https://api.github.com/users/addshore","html_url":"https://github.com/addshore","followers_url":"https://api.github.com/users/addshore/followers","following_url":"https://api.github.com/users/addshore/following{/other_user}","gists_url":"https://api.github.com/users/addshore/gists{/gist_id}","starred_url":"https://api.github.com/users/addshore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/addshore/subscriptions","organizations_url":"https://api.github.com/users/addshore/orgs","repos_url":"https://api.github.com/users/addshore/repos","events_url":"https://api.github.com/users/addshore/events{/privacy}","received_events_url":"https://api.github.com/users/addshore/received_events","type":"User","site_admin":false},"body":"This is going to start of as an RFC so that I can get peoples general thoughts on this and ideas / comments.\r\nRight now the lookups do odd stuff in odd ways etc. and this is trying to fix all of that....\r\n\r\nThis tries to fix all of the lookups to do things the same way.\r\n\r\nWhen trying to lookup a value that does not exist then return null.\r\nIn the case we were looking for multiple values / an array then\r\nreturn an empty array.\r\n\r\nIf something when wrong during the lookup then throw an exception.\r\nEntityIdLookupException has been created for this, which could also\r\nbe called a ByEntityIdLookupException.....","created_at":"2015-08-17T12:12:28Z","updated_at":"2015-08-19T16:35:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"096f10fe0a7ffc327754f918d21f541d1df13fe2","assignee":null,"milestone":{"url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/milestones/1","html_url":"https://github.com/wmde/WikibaseDataModelServices/milestones/1.2","labels_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/milestones/1/labels","id":1260286,"number":1,"title":"1.2","description":null,"creator":{"login":"addshore","id":3308769,"avatar_url":"https://avatars.githubusercontent.com/u/3308769?v=3","gravatar_id":"","url":"https://api.github.com/users/addshore","html_url":"https://github.com/addshore","followers_url":"https://api.github.com/users/addshore/followers","following_url":"https://api.github.com/users/addshore/following{/other_user}","gists_url":"https://api.github.com/users/addshore/gists{/gist_id}","starred_url":"https://api.github.com/users/addshore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/addshore/subscriptions","organizations_url":"https://api.github.com/users/addshore/orgs","repos_url":"https://api.github.com/users/addshore/repos","events_url":"https://api.github.com/users/addshore/events{/privacy}","received_events_url":"https://api.github.com/users/addshore/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":1,"state":"open","created_at":"2015-08-18T09:01:15Z","updated_at":"2015-08-18T15:55:50Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/pulls/44/commits","review_comments_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/pulls/44/comments","review_comment_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/issues/44/comments","statuses_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/statuses/b8f3a3da7405875a0156aa78214ead7df354dbf6","head":{"label":"wmde:nullAndExceptions","ref":"nullAndExceptions","sha":"b8f3a3da7405875a0156aa78214ead7df354dbf6","user":{"login":"wmde","id":664724,"avatar_url":"https://avatars.githubusercontent.com/u/664724?v=3","gravatar_id":"","url":"https://api.github.com/users/wmde","html_url":"https://github.com/wmde","followers_url":"https://api.github.com/users/wmde/followers","following_url":"https://api.github.com/users/wmde/following{/other_user}","gists_url":"https://api.github.com/users/wmde/gists{/gist_id}","starred_url":"https://api.github.com/users/wmde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmde/subscriptions","organizations_url":"https://api.github.com/users/wmde/orgs","repos_url":"https://api.github.com/users/wmde/repos","events_url":"https://api.github.com/users/wmde/events{/privacy}","received_events_url":"https://api.github.com/users/wmde/received_events","type":"Organization","site_admin":false},"repo":{"id":37833375,"name":"WikibaseDataModelServices","full_name":"wmde/WikibaseDataModelServices","owner":{"login":"wmde","id":664724,"avatar_url":"https://avatars.githubusercontent.com/u/664724?v=3","gravatar_id":"","url":"https://api.github.com/users/wmde","html_url":"https://github.com/wmde","followers_url":"https://api.github.com/users/wmde/followers","following_url":"https://api.github.com/users/wmde/following{/other_user}","gists_url":"https://api.github.com/users/wmde/gists{/gist_id}","starred_url":"https://api.github.com/users/wmde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmde/subscriptions","organizations_url":"https://api.github.com/users/wmde/orgs","repos_url":"https://api.github.com/users/wmde/repos","events_url":"https://api.github.com/users/wmde/events{/privacy}","received_events_url":"https://api.github.com/users/wmde/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wmde/WikibaseDataModelServices","description":"A collection of services around Wikibase DataModel","fork":false,"url":"https://api.github.com/repos/wmde/WikibaseDataModelServices","forks_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/forks","keys_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/teams","hooks_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/hooks","issue_events_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/issues/events{/number}","events_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/events","assignees_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/assignees{/user}","branches_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/branches{/branch}","tags_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/tags","blobs_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/git/refs{/sha}","trees_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/statuses/{sha}","languages_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/languages","stargazers_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/stargazers","contributors_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/contributors","subscribers_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/subscribers","subscription_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/subscription","commits_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/commits{/sha}","git_commits_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/git/commits{/sha}","comments_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/comments{/number}","issue_comment_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/issues/comments{/number}","contents_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/contents/{+path}","compare_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/merges","archive_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/downloads","issues_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/issues{/number}","pulls_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/pulls{/number}","milestones_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/milestones{/number}","notifications_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/labels{/name}","releases_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/releases{/id}","created_at":"2015-06-22T01:47:49Z","updated_at":"2015-06-22T02:25:22Z","pushed_at":"2015-08-18T21:47:25Z","git_url":"git://github.com/wmde/WikibaseDataModelServices.git","ssh_url":"git@github.com:wmde/WikibaseDataModelServices.git","clone_url":"https://github.com/wmde/WikibaseDataModelServices.git","svn_url":"https://github.com/wmde/WikibaseDataModelServices","homepage":"http://wikiba.se","size":696,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"wmde:master","ref":"master","sha":"ab7b276ea16ff45fce39c222451301feb5b75665","user":{"login":"wmde","id":664724,"avatar_url":"https://avatars.githubusercontent.com/u/664724?v=3","gravatar_id":"","url":"https://api.github.com/users/wmde","html_url":"https://github.com/wmde","followers_url":"https://api.github.com/users/wmde/followers","following_url":"https://api.github.com/users/wmde/following{/other_user}","gists_url":"https://api.github.com/users/wmde/gists{/gist_id}","starred_url":"https://api.github.com/users/wmde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmde/subscriptions","organizations_url":"https://api.github.com/users/wmde/orgs","repos_url":"https://api.github.com/users/wmde/repos","events_url":"https://api.github.com/users/wmde/events{/privacy}","received_events_url":"https://api.github.com/users/wmde/received_events","type":"Organization","site_admin":false},"repo":{"id":37833375,"name":"WikibaseDataModelServices","full_name":"wmde/WikibaseDataModelServices","owner":{"login":"wmde","id":664724,"avatar_url":"https://avatars.githubusercontent.com/u/664724?v=3","gravatar_id":"","url":"https://api.github.com/users/wmde","html_url":"https://github.com/wmde","followers_url":"https://api.github.com/users/wmde/followers","following_url":"https://api.github.com/users/wmde/following{/other_user}","gists_url":"https://api.github.com/users/wmde/gists{/gist_id}","starred_url":"https://api.github.com/users/wmde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmde/subscriptions","organizations_url":"https://api.github.com/users/wmde/orgs","repos_url":"https://api.github.com/users/wmde/repos","events_url":"https://api.github.com/users/wmde/events{/privacy}","received_events_url":"https://api.github.com/users/wmde/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wmde/WikibaseDataModelServices","description":"A collection of services around Wikibase DataModel","fork":false,"url":"https://api.github.com/repos/wmde/WikibaseDataModelServices","forks_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/forks","keys_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/teams","hooks_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/hooks","issue_events_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/issues/events{/number}","events_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/events","assignees_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/assignees{/user}","branches_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/branches{/branch}","tags_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/tags","blobs_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/git/refs{/sha}","trees_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/statuses/{sha}","languages_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/languages","stargazers_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/stargazers","contributors_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/contributors","subscribers_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/subscribers","subscription_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/subscription","commits_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/commits{/sha}","git_commits_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/git/commits{/sha}","comments_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/comments{/number}","issue_comment_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/issues/comments{/number}","contents_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/contents/{+path}","compare_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/merges","archive_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/downloads","issues_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/issues{/number}","pulls_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/pulls{/number}","milestones_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/milestones{/number}","notifications_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/labels{/name}","releases_url":"https://api.github.com/repos/wmde/WikibaseDataModelServices/releases{/id}","created_at":"2015-06-22T01:47:49Z","updated_at":"2015-06-22T02:25:22Z","pushed_at":"2015-08-18T21:47:25Z","git_url":"git://github.com/wmde/WikibaseDataModelServices.git","ssh_url":"git@github.com:wmde/WikibaseDataModelServices.git","clone_url":"https://github.com/wmde/WikibaseDataModelServices.git","svn_url":"https://github.com/wmde/WikibaseDataModelServices","homepage":"http://wikiba.se","size":696,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wmde/WikibaseDataModelServices/pulls/44"},"html":{"href":"https://github.com/wmde/WikibaseDataModelServices/pull/44"},"issue":{"href":"https://api.github.com/repos/wmde/WikibaseDataModelServices/issues/44"},"comments":{"href":"https://api.github.com/repos/wmde/WikibaseDataModelServices/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/wmde/WikibaseDataModelServices/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/wmde/WikibaseDataModelServices/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wmde/WikibaseDataModelServices/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/wmde/WikibaseDataModelServices/statuses/b8f3a3da7405875a0156aa78214ead7df354dbf6"}}}}