{"action":"created","comment":{"url":"https://api.github.com/repos/xi-project/xi-sms/pulls/comments/24297042","id":24297042,"diff_hunk":"@@ -34,22 +34,13 @@ class SmsMessage\n      * @param string $from\n      * @param array|string $to\n      */\n-    public function __construct($body = null, $from = null, $to = array())\n+    public function __construct($body, $from, $to)\n     {\n         $this->body = $body;\n         $this->from = $from;\n \n-        if ($to) {\n-            $this->setTo($to);\n-        }\n-    }\n-\n-    /**\n-     * @param string $body\n-     */\n-    public function setBody($body)\n-    {\n-        $this->body = $body;\n+        $to_array = $this->checkTo($to);","path":"library/Xi/Sms/SmsMessage.php","position":21,"original_position":21,"commit_id":"433532c2d48e21f65f62f9dc1451bb1d928bfd72","original_commit_id":"433532c2d48e21f65f62f9dc1451bb1d928bfd72","user":{"login":"PKJedi","id":465797,"avatar_url":"https://avatars.githubusercontent.com/u/465797?v=3","gravatar_id":"","url":"https://api.github.com/users/PKJedi","html_url":"https://github.com/PKJedi","followers_url":"https://api.github.com/users/PKJedi/followers","following_url":"https://api.github.com/users/PKJedi/following{/other_user}","gists_url":"https://api.github.com/users/PKJedi/gists{/gist_id}","starred_url":"https://api.github.com/users/PKJedi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PKJedi/subscriptions","organizations_url":"https://api.github.com/users/PKJedi/orgs","repos_url":"https://api.github.com/users/PKJedi/repos","events_url":"https://api.github.com/users/PKJedi/events{/privacy}","received_events_url":"https://api.github.com/users/PKJedi/received_events","type":"User","site_admin":false},"body":"Could $to_array and checkTo() be replaced with just an array cast?\r\n\r\n    $this->to = (array)$to;\r\n","created_at":"2015-02-08T09:05:48Z","updated_at":"2015-02-08T09:05:48Z","html_url":"https://github.com/xi-project/xi-sms/pull/14#discussion_r24297042","pull_request_url":"https://api.github.com/repos/xi-project/xi-sms/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/xi-project/xi-sms/pulls/comments/24297042"},"html":{"href":"https://github.com/xi-project/xi-sms/pull/14#discussion_r24297042"},"pull_request":{"href":"https://api.github.com/repos/xi-project/xi-sms/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/xi-project/xi-sms/pulls/14","id":28811826,"html_url":"https://github.com/xi-project/xi-sms/pull/14","diff_url":"https://github.com/xi-project/xi-sms/pull/14.diff","patch_url":"https://github.com/xi-project/xi-sms/pull/14.patch","issue_url":"https://api.github.com/repos/xi-project/xi-sms/issues/14","number":14,"state":"open","locked":false,"title":"enforcing message to contain from, to and body","user":{"login":"rajibmp","id":2764745,"avatar_url":"https://avatars.githubusercontent.com/u/2764745?v=3","gravatar_id":"","url":"https://api.github.com/users/rajibmp","html_url":"https://github.com/rajibmp","followers_url":"https://api.github.com/users/rajibmp/followers","following_url":"https://api.github.com/users/rajibmp/following{/other_user}","gists_url":"https://api.github.com/users/rajibmp/gists{/gist_id}","starred_url":"https://api.github.com/users/rajibmp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajibmp/subscriptions","organizations_url":"https://api.github.com/users/rajibmp/orgs","repos_url":"https://api.github.com/users/rajibmp/repos","events_url":"https://api.github.com/users/rajibmp/events{/privacy}","received_events_url":"https://api.github.com/users/rajibmp/received_events","type":"User","site_admin":false},"body":"Important thing like To, From and Body of SMS should always be enforced while creating Object. This eliminates use of setters...","created_at":"2015-02-06T14:26:29Z","updated_at":"2015-02-08T09:05:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4034598ed939e4675085fdc89cef043311e271d3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/xi-project/xi-sms/pulls/14/commits","review_comments_url":"https://api.github.com/repos/xi-project/xi-sms/pulls/14/comments","review_comment_url":"https://api.github.com/repos/xi-project/xi-sms/pulls/comments/{number}","comments_url":"https://api.github.com/repos/xi-project/xi-sms/issues/14/comments","statuses_url":"https://api.github.com/repos/xi-project/xi-sms/statuses/433532c2d48e21f65f62f9dc1451bb1d928bfd72","head":{"label":"rajibmp:setters","ref":"setters","sha":"433532c2d48e21f65f62f9dc1451bb1d928bfd72","user":{"login":"rajibmp","id":2764745,"avatar_url":"https://avatars.githubusercontent.com/u/2764745?v=3","gravatar_id":"","url":"https://api.github.com/users/rajibmp","html_url":"https://github.com/rajibmp","followers_url":"https://api.github.com/users/rajibmp/followers","following_url":"https://api.github.com/users/rajibmp/following{/other_user}","gists_url":"https://api.github.com/users/rajibmp/gists{/gist_id}","starred_url":"https://api.github.com/users/rajibmp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajibmp/subscriptions","organizations_url":"https://api.github.com/users/rajibmp/orgs","repos_url":"https://api.github.com/users/rajibmp/repos","events_url":"https://api.github.com/users/rajibmp/events{/privacy}","received_events_url":"https://api.github.com/users/rajibmp/received_events","type":"User","site_admin":false},"repo":{"id":30357390,"name":"xi-sms","full_name":"rajibmp/xi-sms","owner":{"login":"rajibmp","id":2764745,"avatar_url":"https://avatars.githubusercontent.com/u/2764745?v=3","gravatar_id":"","url":"https://api.github.com/users/rajibmp","html_url":"https://github.com/rajibmp","followers_url":"https://api.github.com/users/rajibmp/followers","following_url":"https://api.github.com/users/rajibmp/following{/other_user}","gists_url":"https://api.github.com/users/rajibmp/gists{/gist_id}","starred_url":"https://api.github.com/users/rajibmp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajibmp/subscriptions","organizations_url":"https://api.github.com/users/rajibmp/orgs","repos_url":"https://api.github.com/users/rajibmp/repos","events_url":"https://api.github.com/users/rajibmp/events{/privacy}","received_events_url":"https://api.github.com/users/rajibmp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rajibmp/xi-sms","description":"SMS for PHP 5.3+","fork":true,"url":"https://api.github.com/repos/rajibmp/xi-sms","forks_url":"https://api.github.com/repos/rajibmp/xi-sms/forks","keys_url":"https://api.github.com/repos/rajibmp/xi-sms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rajibmp/xi-sms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rajibmp/xi-sms/teams","hooks_url":"https://api.github.com/repos/rajibmp/xi-sms/hooks","issue_events_url":"https://api.github.com/repos/rajibmp/xi-sms/issues/events{/number}","events_url":"https://api.github.com/repos/rajibmp/xi-sms/events","assignees_url":"https://api.github.com/repos/rajibmp/xi-sms/assignees{/user}","branches_url":"https://api.github.com/repos/rajibmp/xi-sms/branches{/branch}","tags_url":"https://api.github.com/repos/rajibmp/xi-sms/tags","blobs_url":"https://api.github.com/repos/rajibmp/xi-sms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rajibmp/xi-sms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rajibmp/xi-sms/git/refs{/sha}","trees_url":"https://api.github.com/repos/rajibmp/xi-sms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rajibmp/xi-sms/statuses/{sha}","languages_url":"https://api.github.com/repos/rajibmp/xi-sms/languages","stargazers_url":"https://api.github.com/repos/rajibmp/xi-sms/stargazers","contributors_url":"https://api.github.com/repos/rajibmp/xi-sms/contributors","subscribers_url":"https://api.github.com/repos/rajibmp/xi-sms/subscribers","subscription_url":"https://api.github.com/repos/rajibmp/xi-sms/subscription","commits_url":"https://api.github.com/repos/rajibmp/xi-sms/commits{/sha}","git_commits_url":"https://api.github.com/repos/rajibmp/xi-sms/git/commits{/sha}","comments_url":"https://api.github.com/repos/rajibmp/xi-sms/comments{/number}","issue_comment_url":"https://api.github.com/repos/rajibmp/xi-sms/issues/comments/{number}","contents_url":"https://api.github.com/repos/rajibmp/xi-sms/contents/{+path}","compare_url":"https://api.github.com/repos/rajibmp/xi-sms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rajibmp/xi-sms/merges","archive_url":"https://api.github.com/repos/rajibmp/xi-sms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rajibmp/xi-sms/downloads","issues_url":"https://api.github.com/repos/rajibmp/xi-sms/issues{/number}","pulls_url":"https://api.github.com/repos/rajibmp/xi-sms/pulls{/number}","milestones_url":"https://api.github.com/repos/rajibmp/xi-sms/milestones{/number}","notifications_url":"https://api.github.com/repos/rajibmp/xi-sms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rajibmp/xi-sms/labels{/name}","releases_url":"https://api.github.com/repos/rajibmp/xi-sms/releases{/id}","created_at":"2015-02-05T13:44:28Z","updated_at":"2015-02-05T14:04:17Z","pushed_at":"2015-02-06T14:23:14Z","git_url":"git://github.com/rajibmp/xi-sms.git","ssh_url":"git@github.com:rajibmp/xi-sms.git","clone_url":"https://github.com/rajibmp/xi-sms.git","svn_url":"https://github.com/rajibmp/xi-sms","homepage":null,"size":155,"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":"xi-project:master","ref":"master","sha":"2c59acd5b88e9a2f82c2c4d96941fae10d3beda9","user":{"login":"xi-project","id":847868,"avatar_url":"https://avatars.githubusercontent.com/u/847868?v=3","gravatar_id":"","url":"https://api.github.com/users/xi-project","html_url":"https://github.com/xi-project","followers_url":"https://api.github.com/users/xi-project/followers","following_url":"https://api.github.com/users/xi-project/following{/other_user}","gists_url":"https://api.github.com/users/xi-project/gists{/gist_id}","starred_url":"https://api.github.com/users/xi-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xi-project/subscriptions","organizations_url":"https://api.github.com/users/xi-project/orgs","repos_url":"https://api.github.com/users/xi-project/repos","events_url":"https://api.github.com/users/xi-project/events{/privacy}","received_events_url":"https://api.github.com/users/xi-project/received_events","type":"Organization","site_admin":false},"repo":{"id":7163896,"name":"xi-sms","full_name":"xi-project/xi-sms","owner":{"login":"xi-project","id":847868,"avatar_url":"https://avatars.githubusercontent.com/u/847868?v=3","gravatar_id":"","url":"https://api.github.com/users/xi-project","html_url":"https://github.com/xi-project","followers_url":"https://api.github.com/users/xi-project/followers","following_url":"https://api.github.com/users/xi-project/following{/other_user}","gists_url":"https://api.github.com/users/xi-project/gists{/gist_id}","starred_url":"https://api.github.com/users/xi-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xi-project/subscriptions","organizations_url":"https://api.github.com/users/xi-project/orgs","repos_url":"https://api.github.com/users/xi-project/repos","events_url":"https://api.github.com/users/xi-project/events{/privacy}","received_events_url":"https://api.github.com/users/xi-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xi-project/xi-sms","description":"SMS for PHP 5.3+","fork":false,"url":"https://api.github.com/repos/xi-project/xi-sms","forks_url":"https://api.github.com/repos/xi-project/xi-sms/forks","keys_url":"https://api.github.com/repos/xi-project/xi-sms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xi-project/xi-sms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xi-project/xi-sms/teams","hooks_url":"https://api.github.com/repos/xi-project/xi-sms/hooks","issue_events_url":"https://api.github.com/repos/xi-project/xi-sms/issues/events{/number}","events_url":"https://api.github.com/repos/xi-project/xi-sms/events","assignees_url":"https://api.github.com/repos/xi-project/xi-sms/assignees{/user}","branches_url":"https://api.github.com/repos/xi-project/xi-sms/branches{/branch}","tags_url":"https://api.github.com/repos/xi-project/xi-sms/tags","blobs_url":"https://api.github.com/repos/xi-project/xi-sms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xi-project/xi-sms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xi-project/xi-sms/git/refs{/sha}","trees_url":"https://api.github.com/repos/xi-project/xi-sms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xi-project/xi-sms/statuses/{sha}","languages_url":"https://api.github.com/repos/xi-project/xi-sms/languages","stargazers_url":"https://api.github.com/repos/xi-project/xi-sms/stargazers","contributors_url":"https://api.github.com/repos/xi-project/xi-sms/contributors","subscribers_url":"https://api.github.com/repos/xi-project/xi-sms/subscribers","subscription_url":"https://api.github.com/repos/xi-project/xi-sms/subscription","commits_url":"https://api.github.com/repos/xi-project/xi-sms/commits{/sha}","git_commits_url":"https://api.github.com/repos/xi-project/xi-sms/git/commits{/sha}","comments_url":"https://api.github.com/repos/xi-project/xi-sms/comments{/number}","issue_comment_url":"https://api.github.com/repos/xi-project/xi-sms/issues/comments/{number}","contents_url":"https://api.github.com/repos/xi-project/xi-sms/contents/{+path}","compare_url":"https://api.github.com/repos/xi-project/xi-sms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xi-project/xi-sms/merges","archive_url":"https://api.github.com/repos/xi-project/xi-sms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xi-project/xi-sms/downloads","issues_url":"https://api.github.com/repos/xi-project/xi-sms/issues{/number}","pulls_url":"https://api.github.com/repos/xi-project/xi-sms/pulls{/number}","milestones_url":"https://api.github.com/repos/xi-project/xi-sms/milestones{/number}","notifications_url":"https://api.github.com/repos/xi-project/xi-sms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xi-project/xi-sms/labels{/name}","releases_url":"https://api.github.com/repos/xi-project/xi-sms/releases{/id}","created_at":"2012-12-14T10:45:26Z","updated_at":"2015-02-08T09:02:22Z","pushed_at":"2015-02-08T09:02:22Z","git_url":"git://github.com/xi-project/xi-sms.git","ssh_url":"git@github.com:xi-project/xi-sms.git","clone_url":"https://github.com/xi-project/xi-sms.git","svn_url":"https://github.com/xi-project/xi-sms","homepage":null,"size":339,"stargazers_count":5,"watchers_count":5,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":4,"forks":10,"open_issues":4,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xi-project/xi-sms/pulls/14"},"html":{"href":"https://github.com/xi-project/xi-sms/pull/14"},"issue":{"href":"https://api.github.com/repos/xi-project/xi-sms/issues/14"},"comments":{"href":"https://api.github.com/repos/xi-project/xi-sms/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/xi-project/xi-sms/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/xi-project/xi-sms/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/xi-project/xi-sms/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/xi-project/xi-sms/statuses/433532c2d48e21f65f62f9dc1451bb1d928bfd72"}}}}