{"action":"created","comment":{"url":"https://api.github.com/repos/jmartin82/virtual-storage/pulls/comments/77134791","id":77134791,"diff_hunk":"@@ -0,0 +1,104 @@\n+<?php\n+namespace Cmp\\Storage;\n+\n+\n+use ArrayIterator;\n+use IteratorAggregate;\n+use Traversable;\n+\n+/**\n+ * Class MountPointHeap\n+ *\n+ * @package Cmp\\Storage\n+ */\n+class MountPointSortedSet implements IteratorAggregate\n+{\n+\n+    private $mountPoints;\n+\n+\n+    public function __construct()\n+    {\n+        $this->mountPoints = [];\n+    }\n+\n+    public function set(MountPoint $value)\n+    {\n+\n+        $this->mountPoints[$value->getVirtualPath()->getPath()] = $value;\n+        $this->sort();\n+    }\n+\n+    public function contains($path)\n+    {\n+        if (!isset($this->mountPoints[$path])) {\n+            return false;\n+        }\n+\n+        return true;\n+    }\n+\n+    /**\n+     * @param $path\n+     *\n+     * @return MountPoint|bool\n+     */\n+    public function get($path)\n+    {\n+        if (!$this->contains($path)) {\n+            return false;\n+        }\n+\n+        return $this->mountPoints[$path];\n+    }\n+\n+    public function remove($path)\n+    {\n+        if (!$this->contains($path)) {\n+            return false;\n+        }\n+\n+\n+        unset($this->mountPoints[$path]);\n+\n+        return $this->sort();\n+    }\n+\n+\n+    /**\n+     * @param MountPoint $value1","path":"src/Cmp/Storage/MountPointSortedSet.php","position":69,"original_position":69,"commit_id":"390590d54ea769c253803b7ffd8f8cc2a53d56d3","original_commit_id":"390590d54ea769c253803b7ffd8f8cc2a53d56d3","user":{"login":"marcrubiocmp","id":17856285,"avatar_url":"https://avatars.githubusercontent.com/u/17856285?v=3","gravatar_id":"","url":"https://api.github.com/users/marcrubiocmp","html_url":"https://github.com/marcrubiocmp","followers_url":"https://api.github.com/users/marcrubiocmp/followers","following_url":"https://api.github.com/users/marcrubiocmp/following{/other_user}","gists_url":"https://api.github.com/users/marcrubiocmp/gists{/gist_id}","starred_url":"https://api.github.com/users/marcrubiocmp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcrubiocmp/subscriptions","organizations_url":"https://api.github.com/users/marcrubiocmp/orgs","repos_url":"https://api.github.com/users/marcrubiocmp/repos","events_url":"https://api.github.com/users/marcrubiocmp/events{/privacy}","received_events_url":"https://api.github.com/users/marcrubiocmp/received_events","type":"User","site_admin":false},"body":"I guess it should be a string type now?","created_at":"2016-09-01T08:38:35Z","updated_at":"2016-09-01T08:38:35Z","html_url":"https://github.com/jmartin82/virtual-storage/pull/8#discussion_r77134791","pull_request_url":"https://api.github.com/repos/jmartin82/virtual-storage/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/jmartin82/virtual-storage/pulls/comments/77134791"},"html":{"href":"https://github.com/jmartin82/virtual-storage/pull/8#discussion_r77134791"},"pull_request":{"href":"https://api.github.com/repos/jmartin82/virtual-storage/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/jmartin82/virtual-storage/pulls/8","id":83477052,"html_url":"https://github.com/jmartin82/virtual-storage/pull/8","diff_url":"https://github.com/jmartin82/virtual-storage/pull/8.diff","patch_url":"https://github.com/jmartin82/virtual-storage/pull/8.patch","issue_url":"https://api.github.com/repos/jmartin82/virtual-storage/issues/8","number":8,"state":"open","locked":false,"title":"First mountpoints implementation","user":{"login":"jmartin82","id":152270,"avatar_url":"https://avatars.githubusercontent.com/u/152270?v=3","gravatar_id":"","url":"https://api.github.com/users/jmartin82","html_url":"https://github.com/jmartin82","followers_url":"https://api.github.com/users/jmartin82/followers","following_url":"https://api.github.com/users/jmartin82/following{/other_user}","gists_url":"https://api.github.com/users/jmartin82/gists{/gist_id}","starred_url":"https://api.github.com/users/jmartin82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmartin82/subscriptions","organizations_url":"https://api.github.com/users/jmartin82/orgs","repos_url":"https://api.github.com/users/jmartin82/repos","events_url":"https://api.github.com/users/jmartin82/events{/privacy}","received_events_url":"https://api.github.com/users/jmartin82/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-31T15:38:41Z","updated_at":"2016-09-01T08:38:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a385212ddf99aac629dde6e638a2b6f6b06e2c06","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jmartin82/virtual-storage/pulls/8/commits","review_comments_url":"https://api.github.com/repos/jmartin82/virtual-storage/pulls/8/comments","review_comment_url":"https://api.github.com/repos/jmartin82/virtual-storage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jmartin82/virtual-storage/issues/8/comments","statuses_url":"https://api.github.com/repos/jmartin82/virtual-storage/statuses/390590d54ea769c253803b7ffd8f8cc2a53d56d3","head":{"label":"jmartin82:add-mountpoints","ref":"add-mountpoints","sha":"390590d54ea769c253803b7ffd8f8cc2a53d56d3","user":{"login":"jmartin82","id":152270,"avatar_url":"https://avatars.githubusercontent.com/u/152270?v=3","gravatar_id":"","url":"https://api.github.com/users/jmartin82","html_url":"https://github.com/jmartin82","followers_url":"https://api.github.com/users/jmartin82/followers","following_url":"https://api.github.com/users/jmartin82/following{/other_user}","gists_url":"https://api.github.com/users/jmartin82/gists{/gist_id}","starred_url":"https://api.github.com/users/jmartin82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmartin82/subscriptions","organizations_url":"https://api.github.com/users/jmartin82/orgs","repos_url":"https://api.github.com/users/jmartin82/repos","events_url":"https://api.github.com/users/jmartin82/events{/privacy}","received_events_url":"https://api.github.com/users/jmartin82/received_events","type":"User","site_admin":false},"repo":{"id":63775594,"name":"virtual-storage","full_name":"jmartin82/virtual-storage","owner":{"login":"jmartin82","id":152270,"avatar_url":"https://avatars.githubusercontent.com/u/152270?v=3","gravatar_id":"","url":"https://api.github.com/users/jmartin82","html_url":"https://github.com/jmartin82","followers_url":"https://api.github.com/users/jmartin82/followers","following_url":"https://api.github.com/users/jmartin82/following{/other_user}","gists_url":"https://api.github.com/users/jmartin82/gists{/gist_id}","starred_url":"https://api.github.com/users/jmartin82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmartin82/subscriptions","organizations_url":"https://api.github.com/users/jmartin82/orgs","repos_url":"https://api.github.com/users/jmartin82/repos","events_url":"https://api.github.com/users/jmartin82/events{/privacy}","received_events_url":"https://api.github.com/users/jmartin82/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmartin82/virtual-storage","description":null,"fork":false,"url":"https://api.github.com/repos/jmartin82/virtual-storage","forks_url":"https://api.github.com/repos/jmartin82/virtual-storage/forks","keys_url":"https://api.github.com/repos/jmartin82/virtual-storage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmartin82/virtual-storage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmartin82/virtual-storage/teams","hooks_url":"https://api.github.com/repos/jmartin82/virtual-storage/hooks","issue_events_url":"https://api.github.com/repos/jmartin82/virtual-storage/issues/events{/number}","events_url":"https://api.github.com/repos/jmartin82/virtual-storage/events","assignees_url":"https://api.github.com/repos/jmartin82/virtual-storage/assignees{/user}","branches_url":"https://api.github.com/repos/jmartin82/virtual-storage/branches{/branch}","tags_url":"https://api.github.com/repos/jmartin82/virtual-storage/tags","blobs_url":"https://api.github.com/repos/jmartin82/virtual-storage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmartin82/virtual-storage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmartin82/virtual-storage/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmartin82/virtual-storage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmartin82/virtual-storage/statuses/{sha}","languages_url":"https://api.github.com/repos/jmartin82/virtual-storage/languages","stargazers_url":"https://api.github.com/repos/jmartin82/virtual-storage/stargazers","contributors_url":"https://api.github.com/repos/jmartin82/virtual-storage/contributors","subscribers_url":"https://api.github.com/repos/jmartin82/virtual-storage/subscribers","subscription_url":"https://api.github.com/repos/jmartin82/virtual-storage/subscription","commits_url":"https://api.github.com/repos/jmartin82/virtual-storage/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmartin82/virtual-storage/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmartin82/virtual-storage/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmartin82/virtual-storage/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmartin82/virtual-storage/contents/{+path}","compare_url":"https://api.github.com/repos/jmartin82/virtual-storage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmartin82/virtual-storage/merges","archive_url":"https://api.github.com/repos/jmartin82/virtual-storage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmartin82/virtual-storage/downloads","issues_url":"https://api.github.com/repos/jmartin82/virtual-storage/issues{/number}","pulls_url":"https://api.github.com/repos/jmartin82/virtual-storage/pulls{/number}","milestones_url":"https://api.github.com/repos/jmartin82/virtual-storage/milestones{/number}","notifications_url":"https://api.github.com/repos/jmartin82/virtual-storage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmartin82/virtual-storage/labels{/name}","releases_url":"https://api.github.com/repos/jmartin82/virtual-storage/releases{/id}","deployments_url":"https://api.github.com/repos/jmartin82/virtual-storage/deployments","created_at":"2016-07-20T11:20:04Z","updated_at":"2016-07-25T14:54:01Z","pushed_at":"2016-08-31T15:38:42Z","git_url":"git://github.com/jmartin82/virtual-storage.git","ssh_url":"git@github.com:jmartin82/virtual-storage.git","clone_url":"https://github.com/jmartin82/virtual-storage.git","svn_url":"https://github.com/jmartin82/virtual-storage","homepage":null,"size":89,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"jmartin82:master","ref":"master","sha":"dbd2e44fead0fc706cd4547853383214db03aebb","user":{"login":"jmartin82","id":152270,"avatar_url":"https://avatars.githubusercontent.com/u/152270?v=3","gravatar_id":"","url":"https://api.github.com/users/jmartin82","html_url":"https://github.com/jmartin82","followers_url":"https://api.github.com/users/jmartin82/followers","following_url":"https://api.github.com/users/jmartin82/following{/other_user}","gists_url":"https://api.github.com/users/jmartin82/gists{/gist_id}","starred_url":"https://api.github.com/users/jmartin82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmartin82/subscriptions","organizations_url":"https://api.github.com/users/jmartin82/orgs","repos_url":"https://api.github.com/users/jmartin82/repos","events_url":"https://api.github.com/users/jmartin82/events{/privacy}","received_events_url":"https://api.github.com/users/jmartin82/received_events","type":"User","site_admin":false},"repo":{"id":63775594,"name":"virtual-storage","full_name":"jmartin82/virtual-storage","owner":{"login":"jmartin82","id":152270,"avatar_url":"https://avatars.githubusercontent.com/u/152270?v=3","gravatar_id":"","url":"https://api.github.com/users/jmartin82","html_url":"https://github.com/jmartin82","followers_url":"https://api.github.com/users/jmartin82/followers","following_url":"https://api.github.com/users/jmartin82/following{/other_user}","gists_url":"https://api.github.com/users/jmartin82/gists{/gist_id}","starred_url":"https://api.github.com/users/jmartin82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmartin82/subscriptions","organizations_url":"https://api.github.com/users/jmartin82/orgs","repos_url":"https://api.github.com/users/jmartin82/repos","events_url":"https://api.github.com/users/jmartin82/events{/privacy}","received_events_url":"https://api.github.com/users/jmartin82/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmartin82/virtual-storage","description":null,"fork":false,"url":"https://api.github.com/repos/jmartin82/virtual-storage","forks_url":"https://api.github.com/repos/jmartin82/virtual-storage/forks","keys_url":"https://api.github.com/repos/jmartin82/virtual-storage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmartin82/virtual-storage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmartin82/virtual-storage/teams","hooks_url":"https://api.github.com/repos/jmartin82/virtual-storage/hooks","issue_events_url":"https://api.github.com/repos/jmartin82/virtual-storage/issues/events{/number}","events_url":"https://api.github.com/repos/jmartin82/virtual-storage/events","assignees_url":"https://api.github.com/repos/jmartin82/virtual-storage/assignees{/user}","branches_url":"https://api.github.com/repos/jmartin82/virtual-storage/branches{/branch}","tags_url":"https://api.github.com/repos/jmartin82/virtual-storage/tags","blobs_url":"https://api.github.com/repos/jmartin82/virtual-storage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmartin82/virtual-storage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmartin82/virtual-storage/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmartin82/virtual-storage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmartin82/virtual-storage/statuses/{sha}","languages_url":"https://api.github.com/repos/jmartin82/virtual-storage/languages","stargazers_url":"https://api.github.com/repos/jmartin82/virtual-storage/stargazers","contributors_url":"https://api.github.com/repos/jmartin82/virtual-storage/contributors","subscribers_url":"https://api.github.com/repos/jmartin82/virtual-storage/subscribers","subscription_url":"https://api.github.com/repos/jmartin82/virtual-storage/subscription","commits_url":"https://api.github.com/repos/jmartin82/virtual-storage/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmartin82/virtual-storage/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmartin82/virtual-storage/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmartin82/virtual-storage/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmartin82/virtual-storage/contents/{+path}","compare_url":"https://api.github.com/repos/jmartin82/virtual-storage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmartin82/virtual-storage/merges","archive_url":"https://api.github.com/repos/jmartin82/virtual-storage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmartin82/virtual-storage/downloads","issues_url":"https://api.github.com/repos/jmartin82/virtual-storage/issues{/number}","pulls_url":"https://api.github.com/repos/jmartin82/virtual-storage/pulls{/number}","milestones_url":"https://api.github.com/repos/jmartin82/virtual-storage/milestones{/number}","notifications_url":"https://api.github.com/repos/jmartin82/virtual-storage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmartin82/virtual-storage/labels{/name}","releases_url":"https://api.github.com/repos/jmartin82/virtual-storage/releases{/id}","deployments_url":"https://api.github.com/repos/jmartin82/virtual-storage/deployments","created_at":"2016-07-20T11:20:04Z","updated_at":"2016-07-25T14:54:01Z","pushed_at":"2016-08-31T15:38:42Z","git_url":"git://github.com/jmartin82/virtual-storage.git","ssh_url":"git@github.com:jmartin82/virtual-storage.git","clone_url":"https://github.com/jmartin82/virtual-storage.git","svn_url":"https://github.com/jmartin82/virtual-storage","homepage":null,"size":89,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jmartin82/virtual-storage/pulls/8"},"html":{"href":"https://github.com/jmartin82/virtual-storage/pull/8"},"issue":{"href":"https://api.github.com/repos/jmartin82/virtual-storage/issues/8"},"comments":{"href":"https://api.github.com/repos/jmartin82/virtual-storage/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/jmartin82/virtual-storage/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/jmartin82/virtual-storage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jmartin82/virtual-storage/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/jmartin82/virtual-storage/statuses/390590d54ea769c253803b7ffd8f8cc2a53d56d3"}}}}
{"actor":{"display_login":"marcrubiocmp"}}