{"action":"created","comment":{"url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/pulls/comments/49390358","id":49390358,"diff_hunk":"@@ -0,0 +1,73 @@\n+<?php\n+\n+namespace UNL\\Services\\CourseApproval\\Course;\n+\n+class Activities implements \\Countable, \\Iterator\n+{\n+    protected $xmlActivities;\n+\n+    protected $currentActivity = 0;\n+\n+    public static function getPossibleActivities()\n+    {\n+        //Value=>Description\n+        return array(\n+            'lec' => 'Lecture',\n+            'lab' => 'Lab',\n+            'stu' => 'Studio',\n+            'fld' => 'Field',\n+            'quz' => 'Quiz',\n+            'rct' => 'Recitation',\n+            'ind' => 'Independent Study',\n+            'psi' => 'Personalized System of Instruction',\n+        );\n+    }\n+\n+    public function __construct(\\SimpleXMLElement $xml)\n+    {\n+        $this->xmlActivities = $xml;\n+    }\n+\n+    public function current()\n+    {\n+        return $this->xmlActivities[$this->currentActivity];\n+    }\n+\n+    public function next()\n+    {\n+        ++$this->currentActivity;\n+    }\n+\n+    public function rewind()\n+    {\n+        $this->currentActivity = 0;\n+    }\n+\n+    public function valid()\n+    {\n+        if ($this->currentActivity >= $this->count()) {\n+            return false;\n+        }\n+        return true;\n+    }\n+\n+    public function key()\n+    {\n+        return (string)$this->current()->type;\n+    }\n+\n+    public function count()\n+    {\n+        return count($this->xmlActivities);\n+    }\n+\n+    public static function getFullDescription($activity)\n+    {\n+        $activities = static::getPossibleActivities();","path":"src/Course/Activities.php","position":66,"original_position":66,"commit_id":"353697eb6c37caa62034044ba983f8e3fa0b822d","original_commit_id":"353697eb6c37caa62034044ba983f8e3fa0b822d","user":{"login":"kabel","id":675956,"avatar_url":"https://avatars.githubusercontent.com/u/675956?v=3","gravatar_id":"","url":"https://api.github.com/users/kabel","html_url":"https://github.com/kabel","followers_url":"https://api.github.com/users/kabel/followers","following_url":"https://api.github.com/users/kabel/following{/other_user}","gists_url":"https://api.github.com/users/kabel/gists{/gist_id}","starred_url":"https://api.github.com/users/kabel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kabel/subscriptions","organizations_url":"https://api.github.com/users/kabel/orgs","repos_url":"https://api.github.com/users/kabel/repos","events_url":"https://api.github.com/users/kabel/events{/privacy}","received_events_url":"https://api.github.com/users/kabel/received_events","type":"User","site_admin":false},"body":"Late-static binding is, indeed, very cool.","created_at":"2016-01-11T22:40:44Z","updated_at":"2016-01-11T22:40:44Z","html_url":"https://github.com/unl/UNL_Services_CourseApproval/pull/3#discussion_r49390358","pull_request_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/pulls/comments/49390358"},"html":{"href":"https://github.com/unl/UNL_Services_CourseApproval/pull/3#discussion_r49390358"},"pull_request":{"href":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/pulls/3","id":55687277,"html_url":"https://github.com/unl/UNL_Services_CourseApproval/pull/3","diff_url":"https://github.com/unl/UNL_Services_CourseApproval/pull/3.diff","patch_url":"https://github.com/unl/UNL_Services_CourseApproval/pull/3.patch","issue_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/issues/3","number":3,"state":"open","locked":false,"title":"Convert to composer lib with coverage tests","user":{"login":"kabel","id":675956,"avatar_url":"https://avatars.githubusercontent.com/u/675956?v=3","gravatar_id":"","url":"https://api.github.com/users/kabel","html_url":"https://github.com/kabel","followers_url":"https://api.github.com/users/kabel/followers","following_url":"https://api.github.com/users/kabel/following{/other_user}","gists_url":"https://api.github.com/users/kabel/gists{/gist_id}","starred_url":"https://api.github.com/users/kabel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kabel/subscriptions","organizations_url":"https://api.github.com/users/kabel/orgs","repos_url":"https://api.github.com/users/kabel/repos","events_url":"https://api.github.com/users/kabel/events{/privacy}","received_events_url":"https://api.github.com/users/kabel/received_events","type":"User","site_admin":false},"body":"API rewrite in order to utilize namespaces and be psr-4 autoload ready.","created_at":"2016-01-11T22:24:09Z","updated_at":"2016-01-11T22:40:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"63ef7567f1a063cd53f63a087a99b1f48b9550c9","assignee":{"login":"mfairchild365","id":498678,"avatar_url":"https://avatars.githubusercontent.com/u/498678?v=3","gravatar_id":"","url":"https://api.github.com/users/mfairchild365","html_url":"https://github.com/mfairchild365","followers_url":"https://api.github.com/users/mfairchild365/followers","following_url":"https://api.github.com/users/mfairchild365/following{/other_user}","gists_url":"https://api.github.com/users/mfairchild365/gists{/gist_id}","starred_url":"https://api.github.com/users/mfairchild365/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfairchild365/subscriptions","organizations_url":"https://api.github.com/users/mfairchild365/orgs","repos_url":"https://api.github.com/users/mfairchild365/repos","events_url":"https://api.github.com/users/mfairchild365/events{/privacy}","received_events_url":"https://api.github.com/users/mfairchild365/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/pulls/3/commits","review_comments_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/pulls/3/comments","review_comment_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/pulls/comments{/number}","comments_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/issues/3/comments","statuses_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/statuses/353697eb6c37caa62034044ba983f8e3fa0b822d","head":{"label":"unl:composer","ref":"composer","sha":"353697eb6c37caa62034044ba983f8e3fa0b822d","user":{"login":"unl","id":704049,"avatar_url":"https://avatars.githubusercontent.com/u/704049?v=3","gravatar_id":"","url":"https://api.github.com/users/unl","html_url":"https://github.com/unl","followers_url":"https://api.github.com/users/unl/followers","following_url":"https://api.github.com/users/unl/following{/other_user}","gists_url":"https://api.github.com/users/unl/gists{/gist_id}","starred_url":"https://api.github.com/users/unl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unl/subscriptions","organizations_url":"https://api.github.com/users/unl/orgs","repos_url":"https://api.github.com/users/unl/repos","events_url":"https://api.github.com/users/unl/events{/privacy}","received_events_url":"https://api.github.com/users/unl/received_events","type":"Organization","site_admin":false},"repo":{"id":2822923,"name":"UNL_Services_CourseApproval","full_name":"unl/UNL_Services_CourseApproval","owner":{"login":"unl","id":704049,"avatar_url":"https://avatars.githubusercontent.com/u/704049?v=3","gravatar_id":"","url":"https://api.github.com/users/unl","html_url":"https://github.com/unl","followers_url":"https://api.github.com/users/unl/followers","following_url":"https://api.github.com/users/unl/following{/other_user}","gists_url":"https://api.github.com/users/unl/gists{/gist_id}","starred_url":"https://api.github.com/users/unl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unl/subscriptions","organizations_url":"https://api.github.com/users/unl/orgs","repos_url":"https://api.github.com/users/unl/repos","events_url":"https://api.github.com/users/unl/events{/privacy}","received_events_url":"https://api.github.com/users/unl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/unl/UNL_Services_CourseApproval","description":"Client library for the CREQ course data service","fork":false,"url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval","forks_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/forks","keys_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/teams","hooks_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/hooks","issue_events_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/issues/events{/number}","events_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/events","assignees_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/assignees{/user}","branches_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/branches{/branch}","tags_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/tags","blobs_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/git/refs{/sha}","trees_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/statuses/{sha}","languages_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/languages","stargazers_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/stargazers","contributors_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/contributors","subscribers_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/subscribers","subscription_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/subscription","commits_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/commits{/sha}","git_commits_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/git/commits{/sha}","comments_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/comments{/number}","issue_comment_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/issues/comments{/number}","contents_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/contents/{+path}","compare_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/merges","archive_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/downloads","issues_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/issues{/number}","pulls_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/pulls{/number}","milestones_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/milestones{/number}","notifications_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/labels{/name}","releases_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/releases{/id}","created_at":"2011-11-21T20:48:54Z","updated_at":"2013-12-02T16:00:40Z","pushed_at":"2016-01-11T22:24:09Z","git_url":"git://github.com/unl/UNL_Services_CourseApproval.git","ssh_url":"git@github.com:unl/UNL_Services_CourseApproval.git","clone_url":"https://github.com/unl/UNL_Services_CourseApproval.git","svn_url":"https://github.com/unl/UNL_Services_CourseApproval","homepage":"","size":906,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"unl:master","ref":"master","sha":"a69b3e6c51ad55d5488d883776efe88cfacd6e7a","user":{"login":"unl","id":704049,"avatar_url":"https://avatars.githubusercontent.com/u/704049?v=3","gravatar_id":"","url":"https://api.github.com/users/unl","html_url":"https://github.com/unl","followers_url":"https://api.github.com/users/unl/followers","following_url":"https://api.github.com/users/unl/following{/other_user}","gists_url":"https://api.github.com/users/unl/gists{/gist_id}","starred_url":"https://api.github.com/users/unl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unl/subscriptions","organizations_url":"https://api.github.com/users/unl/orgs","repos_url":"https://api.github.com/users/unl/repos","events_url":"https://api.github.com/users/unl/events{/privacy}","received_events_url":"https://api.github.com/users/unl/received_events","type":"Organization","site_admin":false},"repo":{"id":2822923,"name":"UNL_Services_CourseApproval","full_name":"unl/UNL_Services_CourseApproval","owner":{"login":"unl","id":704049,"avatar_url":"https://avatars.githubusercontent.com/u/704049?v=3","gravatar_id":"","url":"https://api.github.com/users/unl","html_url":"https://github.com/unl","followers_url":"https://api.github.com/users/unl/followers","following_url":"https://api.github.com/users/unl/following{/other_user}","gists_url":"https://api.github.com/users/unl/gists{/gist_id}","starred_url":"https://api.github.com/users/unl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unl/subscriptions","organizations_url":"https://api.github.com/users/unl/orgs","repos_url":"https://api.github.com/users/unl/repos","events_url":"https://api.github.com/users/unl/events{/privacy}","received_events_url":"https://api.github.com/users/unl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/unl/UNL_Services_CourseApproval","description":"Client library for the CREQ course data service","fork":false,"url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval","forks_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/forks","keys_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/teams","hooks_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/hooks","issue_events_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/issues/events{/number}","events_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/events","assignees_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/assignees{/user}","branches_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/branches{/branch}","tags_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/tags","blobs_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/git/refs{/sha}","trees_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/statuses/{sha}","languages_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/languages","stargazers_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/stargazers","contributors_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/contributors","subscribers_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/subscribers","subscription_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/subscription","commits_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/commits{/sha}","git_commits_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/git/commits{/sha}","comments_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/comments{/number}","issue_comment_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/issues/comments{/number}","contents_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/contents/{+path}","compare_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/merges","archive_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/downloads","issues_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/issues{/number}","pulls_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/pulls{/number}","milestones_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/milestones{/number}","notifications_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/labels{/name}","releases_url":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/releases{/id}","created_at":"2011-11-21T20:48:54Z","updated_at":"2013-12-02T16:00:40Z","pushed_at":"2016-01-11T22:24:09Z","git_url":"git://github.com/unl/UNL_Services_CourseApproval.git","ssh_url":"git@github.com:unl/UNL_Services_CourseApproval.git","clone_url":"https://github.com/unl/UNL_Services_CourseApproval.git","svn_url":"https://github.com/unl/UNL_Services_CourseApproval","homepage":"","size":906,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/pulls/3"},"html":{"href":"https://github.com/unl/UNL_Services_CourseApproval/pull/3"},"issue":{"href":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/issues/3"},"comments":{"href":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/unl/UNL_Services_CourseApproval/statuses/353697eb6c37caa62034044ba983f8e3fa0b822d"}}}}