{"action":"created","comment":{"url":"https://api.github.com/repos/wmde/WikibaseDataModel/pulls/comments/32817250","id":32817250,"diff_hunk":"@@ -0,0 +1,109 @@\n+<?php\n+\n+namespace Wikibase\\DataModel\\Term;\n+\n+use Comparable;\n+use InvalidArgumentException;\n+\n+/**\n+ * Imutable value object.\n+ *\n+ * @since 3.1.0\n+ *\n+ * @licence GNU GPL v2+\n+ * @author Thiemo Mättig\n+ */\n+class EntityTerms implements Comparable {\n+\n+\t/**\n+\t * @var string\n+\t */\n+\tprivate $languageCode;\n+\n+\t/**\n+\t * @var Term\n+\t */\n+\tprivate $label;\n+\n+\t/**\n+\t * @var Term\n+\t */\n+\tprivate $description;\n+\n+\t/**\n+\t * @var AliasGroup\n+\t */\n+\tprivate $aliases;\n+\n+\t/**\n+\t * @param string $languageCode\n+\t * @param Term|null $label\n+\t * @param Term|null $description\n+\t * @param AliasGroup|null $aliases\n+\t *\n+\t * @throws InvalidArgumentException\n+\t */\n+\tpublic function __construct(\n+\t\t$languageCode,\n+\t\tTerm $label = null,\n+\t\tTerm $description = null,\n+\t\tAliasGroup $aliases = null\n+\t) {\n+\t\tif ( !is_string( $languageCode ) || $languageCode === '' ) {\n+\t\t\tthrow new InvalidArgumentException( '$languageCode must be a non-empty string' );\n+\t\t}\n+\n+\t\t$this->languageCode = $languageCode;\n+\t\t$this->label = $label ?: new Term( $languageCode, '' );","path":"src/Term/EntityTerms.php","position":57,"original_position":57,"commit_id":"63d8ea877d9dcc63f498a82afa05c40ea8ed211a","original_commit_id":"63d8ea877d9dcc63f498a82afa05c40ea8ed211a","user":{"login":"thiemowmde","id":6576639,"avatar_url":"https://avatars.githubusercontent.com/u/6576639?v=3","gravatar_id":"","url":"https://api.github.com/users/thiemowmde","html_url":"https://github.com/thiemowmde","followers_url":"https://api.github.com/users/thiemowmde/followers","following_url":"https://api.github.com/users/thiemowmde/following{/other_user}","gists_url":"https://api.github.com/users/thiemowmde/gists{/gist_id}","starred_url":"https://api.github.com/users/thiemowmde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thiemowmde/subscriptions","organizations_url":"https://api.github.com/users/thiemowmde/orgs","repos_url":"https://api.github.com/users/thiemowmde/repos","events_url":"https://api.github.com/users/thiemowmde/events{/privacy}","received_events_url":"https://api.github.com/users/thiemowmde/received_events","type":"User","site_admin":false},"body":"There is no concept of \"has\" in this proposal.","created_at":"2015-06-19T10:18:20Z","updated_at":"2015-06-19T10:18:20Z","html_url":"https://github.com/wmde/WikibaseDataModel/pull/506#discussion_r32817250","pull_request_url":"https://api.github.com/repos/wmde/WikibaseDataModel/pulls/506","_links":{"self":{"href":"https://api.github.com/repos/wmde/WikibaseDataModel/pulls/comments/32817250"},"html":{"href":"https://github.com/wmde/WikibaseDataModel/pull/506#discussion_r32817250"},"pull_request":{"href":"https://api.github.com/repos/wmde/WikibaseDataModel/pulls/506"}}},"pull_request":{"url":"https://api.github.com/repos/wmde/WikibaseDataModel/pulls/506","id":38052373,"html_url":"https://github.com/wmde/WikibaseDataModel/pull/506","diff_url":"https://github.com/wmde/WikibaseDataModel/pull/506.diff","patch_url":"https://github.com/wmde/WikibaseDataModel/pull/506.patch","issue_url":"https://api.github.com/repos/wmde/WikibaseDataModel/issues/506","number":506,"state":"open","locked":false,"title":"[RFC] Add EntityTerms and provider interface","user":{"login":"thiemowmde","id":6576639,"avatar_url":"https://avatars.githubusercontent.com/u/6576639?v=3","gravatar_id":"","url":"https://api.github.com/users/thiemowmde","html_url":"https://github.com/thiemowmde","followers_url":"https://api.github.com/users/thiemowmde/followers","following_url":"https://api.github.com/users/thiemowmde/following{/other_user}","gists_url":"https://api.github.com/users/thiemowmde/gists{/gist_id}","starred_url":"https://api.github.com/users/thiemowmde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thiemowmde/subscriptions","organizations_url":"https://api.github.com/users/thiemowmde/orgs","repos_url":"https://api.github.com/users/thiemowmde/repos","events_url":"https://api.github.com/users/thiemowmde/events{/privacy}","received_events_url":"https://api.github.com/users/thiemowmde/received_events","type":"User","site_admin":false},"body":"* Should the interface also contain some convenience methods, e.g. getLabel, which just returns a string?\r\n* Should the setters be in a separate \"holder\" interface?\r\n* Tests missing.\r\n\r\n[Bug: T87237](https://phabricator.wikimedia.org/T87237)","created_at":"2015-06-18T20:59:21Z","updated_at":"2015-06-19T10:18:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9da0df365ccf2de0c08480200484e51f793329f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wmde/WikibaseDataModel/pulls/506/commits","review_comments_url":"https://api.github.com/repos/wmde/WikibaseDataModel/pulls/506/comments","review_comment_url":"https://api.github.com/repos/wmde/WikibaseDataModel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wmde/WikibaseDataModel/issues/506/comments","statuses_url":"https://api.github.com/repos/wmde/WikibaseDataModel/statuses/63d8ea877d9dcc63f498a82afa05c40ea8ed211a","head":{"label":"wmde:entityTerms","ref":"entityTerms","sha":"63d8ea877d9dcc63f498a82afa05c40ea8ed211a","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":15110788,"name":"WikibaseDataModel","full_name":"wmde/WikibaseDataModel","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/WikibaseDataModel","description":"PHP implementation of the Wikibase Data Model","fork":false,"url":"https://api.github.com/repos/wmde/WikibaseDataModel","forks_url":"https://api.github.com/repos/wmde/WikibaseDataModel/forks","keys_url":"https://api.github.com/repos/wmde/WikibaseDataModel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wmde/WikibaseDataModel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wmde/WikibaseDataModel/teams","hooks_url":"https://api.github.com/repos/wmde/WikibaseDataModel/hooks","issue_events_url":"https://api.github.com/repos/wmde/WikibaseDataModel/issues/events{/number}","events_url":"https://api.github.com/repos/wmde/WikibaseDataModel/events","assignees_url":"https://api.github.com/repos/wmde/WikibaseDataModel/assignees{/user}","branches_url":"https://api.github.com/repos/wmde/WikibaseDataModel/branches{/branch}","tags_url":"https://api.github.com/repos/wmde/WikibaseDataModel/tags","blobs_url":"https://api.github.com/repos/wmde/WikibaseDataModel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wmde/WikibaseDataModel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wmde/WikibaseDataModel/git/refs{/sha}","trees_url":"https://api.github.com/repos/wmde/WikibaseDataModel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wmde/WikibaseDataModel/statuses/{sha}","languages_url":"https://api.github.com/repos/wmde/WikibaseDataModel/languages","stargazers_url":"https://api.github.com/repos/wmde/WikibaseDataModel/stargazers","contributors_url":"https://api.github.com/repos/wmde/WikibaseDataModel/contributors","subscribers_url":"https://api.github.com/repos/wmde/WikibaseDataModel/subscribers","subscription_url":"https://api.github.com/repos/wmde/WikibaseDataModel/subscription","commits_url":"https://api.github.com/repos/wmde/WikibaseDataModel/commits{/sha}","git_commits_url":"https://api.github.com/repos/wmde/WikibaseDataModel/git/commits{/sha}","comments_url":"https://api.github.com/repos/wmde/WikibaseDataModel/comments{/number}","issue_comment_url":"https://api.github.com/repos/wmde/WikibaseDataModel/issues/comments{/number}","contents_url":"https://api.github.com/repos/wmde/WikibaseDataModel/contents/{+path}","compare_url":"https://api.github.com/repos/wmde/WikibaseDataModel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wmde/WikibaseDataModel/merges","archive_url":"https://api.github.com/repos/wmde/WikibaseDataModel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wmde/WikibaseDataModel/downloads","issues_url":"https://api.github.com/repos/wmde/WikibaseDataModel/issues{/number}","pulls_url":"https://api.github.com/repos/wmde/WikibaseDataModel/pulls{/number}","milestones_url":"https://api.github.com/repos/wmde/WikibaseDataModel/milestones{/number}","notifications_url":"https://api.github.com/repos/wmde/WikibaseDataModel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wmde/WikibaseDataModel/labels{/name}","releases_url":"https://api.github.com/repos/wmde/WikibaseDataModel/releases{/id}","created_at":"2013-12-11T15:20:51Z","updated_at":"2015-05-20T16:32:51Z","pushed_at":"2015-06-18T20:59:21Z","git_url":"git://github.com/wmde/WikibaseDataModel.git","ssh_url":"git@github.com:wmde/WikibaseDataModel.git","clone_url":"https://github.com/wmde/WikibaseDataModel.git","svn_url":"https://github.com/wmde/WikibaseDataModel","homepage":"http://wikiba.se/","size":5933,"stargazers_count":8,"watchers_count":8,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":27,"forks":6,"open_issues":27,"watchers":8,"default_branch":"master"}},"base":{"label":"wmde:master","ref":"master","sha":"eab85dfdfeafa1494afe222856c64b342a6ca473","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":15110788,"name":"WikibaseDataModel","full_name":"wmde/WikibaseDataModel","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/WikibaseDataModel","description":"PHP implementation of the Wikibase Data Model","fork":false,"url":"https://api.github.com/repos/wmde/WikibaseDataModel","forks_url":"https://api.github.com/repos/wmde/WikibaseDataModel/forks","keys_url":"https://api.github.com/repos/wmde/WikibaseDataModel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wmde/WikibaseDataModel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wmde/WikibaseDataModel/teams","hooks_url":"https://api.github.com/repos/wmde/WikibaseDataModel/hooks","issue_events_url":"https://api.github.com/repos/wmde/WikibaseDataModel/issues/events{/number}","events_url":"https://api.github.com/repos/wmde/WikibaseDataModel/events","assignees_url":"https://api.github.com/repos/wmde/WikibaseDataModel/assignees{/user}","branches_url":"https://api.github.com/repos/wmde/WikibaseDataModel/branches{/branch}","tags_url":"https://api.github.com/repos/wmde/WikibaseDataModel/tags","blobs_url":"https://api.github.com/repos/wmde/WikibaseDataModel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wmde/WikibaseDataModel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wmde/WikibaseDataModel/git/refs{/sha}","trees_url":"https://api.github.com/repos/wmde/WikibaseDataModel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wmde/WikibaseDataModel/statuses/{sha}","languages_url":"https://api.github.com/repos/wmde/WikibaseDataModel/languages","stargazers_url":"https://api.github.com/repos/wmde/WikibaseDataModel/stargazers","contributors_url":"https://api.github.com/repos/wmde/WikibaseDataModel/contributors","subscribers_url":"https://api.github.com/repos/wmde/WikibaseDataModel/subscribers","subscription_url":"https://api.github.com/repos/wmde/WikibaseDataModel/subscription","commits_url":"https://api.github.com/repos/wmde/WikibaseDataModel/commits{/sha}","git_commits_url":"https://api.github.com/repos/wmde/WikibaseDataModel/git/commits{/sha}","comments_url":"https://api.github.com/repos/wmde/WikibaseDataModel/comments{/number}","issue_comment_url":"https://api.github.com/repos/wmde/WikibaseDataModel/issues/comments{/number}","contents_url":"https://api.github.com/repos/wmde/WikibaseDataModel/contents/{+path}","compare_url":"https://api.github.com/repos/wmde/WikibaseDataModel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wmde/WikibaseDataModel/merges","archive_url":"https://api.github.com/repos/wmde/WikibaseDataModel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wmde/WikibaseDataModel/downloads","issues_url":"https://api.github.com/repos/wmde/WikibaseDataModel/issues{/number}","pulls_url":"https://api.github.com/repos/wmde/WikibaseDataModel/pulls{/number}","milestones_url":"https://api.github.com/repos/wmde/WikibaseDataModel/milestones{/number}","notifications_url":"https://api.github.com/repos/wmde/WikibaseDataModel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wmde/WikibaseDataModel/labels{/name}","releases_url":"https://api.github.com/repos/wmde/WikibaseDataModel/releases{/id}","created_at":"2013-12-11T15:20:51Z","updated_at":"2015-05-20T16:32:51Z","pushed_at":"2015-06-18T20:59:21Z","git_url":"git://github.com/wmde/WikibaseDataModel.git","ssh_url":"git@github.com:wmde/WikibaseDataModel.git","clone_url":"https://github.com/wmde/WikibaseDataModel.git","svn_url":"https://github.com/wmde/WikibaseDataModel","homepage":"http://wikiba.se/","size":5933,"stargazers_count":8,"watchers_count":8,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":27,"forks":6,"open_issues":27,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wmde/WikibaseDataModel/pulls/506"},"html":{"href":"https://github.com/wmde/WikibaseDataModel/pull/506"},"issue":{"href":"https://api.github.com/repos/wmde/WikibaseDataModel/issues/506"},"comments":{"href":"https://api.github.com/repos/wmde/WikibaseDataModel/issues/506/comments"},"review_comments":{"href":"https://api.github.com/repos/wmde/WikibaseDataModel/pulls/506/comments"},"review_comment":{"href":"https://api.github.com/repos/wmde/WikibaseDataModel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wmde/WikibaseDataModel/pulls/506/commits"},"statuses":{"href":"https://api.github.com/repos/wmde/WikibaseDataModel/statuses/63d8ea877d9dcc63f498a82afa05c40ea8ed211a"}}}}