{"action":"created","comment":{"url":"https://api.github.com/repos/Nekland/Woketo/pulls/comments/129823811","pull_request_review_id":52635607,"id":129823811,"diff_hunk":"@@ -225,33 +225,23 @@ public static function bytesFromToString(string $frame, int $from, int $to, int\n      * @param int|null $size  In bytes. This value should always be precise. Be careful if you don't !\n      * @return string\n      */\n-    public static function intToString(int $frame, int $size = null) : string\n+    public static function intToBinaryString(int $frame, int $size = 0) : string\n     {\n-        $res = '';\n-        $startingBytes = true;\n-        for ($i = 8; $i >= 0; $i--) {\n-            $code = ($frame & (255 << ($i * 8))) >> ($i * 8);\n-\n-            // This condition avoid to take care of front zero bytes (that are always present but we should ignore)\n-            if ($code !== 0 || !$startingBytes) {\n-                $startingBytes = false;\n-                $res .= \\chr($code);\n-            }\n-        }\n-\n-        if ($size !== null) {\n-            $actualSize = BitManipulation::frameSize($res);\n-            if ($size < $actualSize) {\n-                $res = \\substr($res, $size - $actualSize);\n-            } else if ($size > $actualSize) {\n-                $missingChars = $size - $actualSize;\n-                for ($i = 0; $i < $missingChars; $i++) {\n-                    $res = \\chr(0) . $res;\n-                }\n-            }\n+        $format = '*';","path":"src/Utils/BitManipulation.php","position":29,"original_position":29,"commit_id":"64b5e4114db0d8f04071b90cad51f1e2dcc02cd3","original_commit_id":"64b5e4114db0d8f04071b90cad51f1e2dcc02cd3","user":{"login":"folliked","id":1079982,"avatar_url":"https://avatars3.githubusercontent.com/u/1079982?v=4","gravatar_id":"","url":"https://api.github.com/users/folliked","html_url":"https://github.com/folliked","followers_url":"https://api.github.com/users/folliked/followers","following_url":"https://api.github.com/users/folliked/following{/other_user}","gists_url":"https://api.github.com/users/folliked/gists{/gist_id}","starred_url":"https://api.github.com/users/folliked/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/folliked/subscriptions","organizations_url":"https://api.github.com/users/folliked/orgs","repos_url":"https://api.github.com/users/folliked/repos","events_url":"https://api.github.com/users/folliked/events{/privacy}","received_events_url":"https://api.github.com/users/folliked/received_events","type":"User","site_admin":false},"body":"why ? ","created_at":"2017-07-27T12:09:31Z","updated_at":"2017-07-27T12:09:31Z","html_url":"https://github.com/Nekland/Woketo/pull/118#discussion_r129823811","pull_request_url":"https://api.github.com/repos/Nekland/Woketo/pulls/118","_links":{"self":{"href":"https://api.github.com/repos/Nekland/Woketo/pulls/comments/129823811"},"html":{"href":"https://github.com/Nekland/Woketo/pull/118#discussion_r129823811"},"pull_request":{"href":"https://api.github.com/repos/Nekland/Woketo/pulls/118"}}},"pull_request":{"url":"https://api.github.com/repos/Nekland/Woketo/pulls/118","id":132697842,"html_url":"https://github.com/Nekland/Woketo/pull/118","diff_url":"https://github.com/Nekland/Woketo/pull/118.diff","patch_url":"https://github.com/Nekland/Woketo/pull/118.patch","issue_url":"https://api.github.com/repos/Nekland/Woketo/issues/118","number":118,"state":"open","locked":false,"title":"Refacto pack","user":{"login":"folliked","id":1079982,"avatar_url":"https://avatars3.githubusercontent.com/u/1079982?v=4","gravatar_id":"","url":"https://api.github.com/users/folliked","html_url":"https://github.com/folliked","followers_url":"https://api.github.com/users/folliked/followers","following_url":"https://api.github.com/users/folliked/following{/other_user}","gists_url":"https://api.github.com/users/folliked/gists{/gist_id}","starred_url":"https://api.github.com/users/folliked/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/folliked/subscriptions","organizations_url":"https://api.github.com/users/folliked/orgs","repos_url":"https://api.github.com/users/folliked/repos","events_url":"https://api.github.com/users/folliked/events{/privacy}","received_events_url":"https://api.github.com/users/folliked/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-07-27T08:56:24Z","updated_at":"2017-07-27T12:09:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41a98decff0964296530f7a02c110059350f0907","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Nekland/Woketo/pulls/118/commits","review_comments_url":"https://api.github.com/repos/Nekland/Woketo/pulls/118/comments","review_comment_url":"https://api.github.com/repos/Nekland/Woketo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Nekland/Woketo/issues/118/comments","statuses_url":"https://api.github.com/repos/Nekland/Woketo/statuses/64b5e4114db0d8f04071b90cad51f1e2dcc02cd3","head":{"label":"folliked:refacto-pack","ref":"refacto-pack","sha":"64b5e4114db0d8f04071b90cad51f1e2dcc02cd3","user":{"login":"folliked","id":1079982,"avatar_url":"https://avatars3.githubusercontent.com/u/1079982?v=4","gravatar_id":"","url":"https://api.github.com/users/folliked","html_url":"https://github.com/folliked","followers_url":"https://api.github.com/users/folliked/followers","following_url":"https://api.github.com/users/folliked/following{/other_user}","gists_url":"https://api.github.com/users/folliked/gists{/gist_id}","starred_url":"https://api.github.com/users/folliked/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/folliked/subscriptions","organizations_url":"https://api.github.com/users/folliked/orgs","repos_url":"https://api.github.com/users/folliked/repos","events_url":"https://api.github.com/users/folliked/events{/privacy}","received_events_url":"https://api.github.com/users/folliked/received_events","type":"User","site_admin":false},"repo":{"id":71178301,"name":"Woketo","full_name":"folliked/Woketo","owner":{"login":"folliked","id":1079982,"avatar_url":"https://avatars3.githubusercontent.com/u/1079982?v=4","gravatar_id":"","url":"https://api.github.com/users/folliked","html_url":"https://github.com/folliked","followers_url":"https://api.github.com/users/folliked/followers","following_url":"https://api.github.com/users/folliked/following{/other_user}","gists_url":"https://api.github.com/users/folliked/gists{/gist_id}","starred_url":"https://api.github.com/users/folliked/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/folliked/subscriptions","organizations_url":"https://api.github.com/users/folliked/orgs","repos_url":"https://api.github.com/users/folliked/repos","events_url":"https://api.github.com/users/folliked/events{/privacy}","received_events_url":"https://api.github.com/users/folliked/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/folliked/Woketo","description":"A websocket library for PHP","fork":true,"url":"https://api.github.com/repos/folliked/Woketo","forks_url":"https://api.github.com/repos/folliked/Woketo/forks","keys_url":"https://api.github.com/repos/folliked/Woketo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/folliked/Woketo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/folliked/Woketo/teams","hooks_url":"https://api.github.com/repos/folliked/Woketo/hooks","issue_events_url":"https://api.github.com/repos/folliked/Woketo/issues/events{/number}","events_url":"https://api.github.com/repos/folliked/Woketo/events","assignees_url":"https://api.github.com/repos/folliked/Woketo/assignees{/user}","branches_url":"https://api.github.com/repos/folliked/Woketo/branches{/branch}","tags_url":"https://api.github.com/repos/folliked/Woketo/tags","blobs_url":"https://api.github.com/repos/folliked/Woketo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/folliked/Woketo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/folliked/Woketo/git/refs{/sha}","trees_url":"https://api.github.com/repos/folliked/Woketo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/folliked/Woketo/statuses/{sha}","languages_url":"https://api.github.com/repos/folliked/Woketo/languages","stargazers_url":"https://api.github.com/repos/folliked/Woketo/stargazers","contributors_url":"https://api.github.com/repos/folliked/Woketo/contributors","subscribers_url":"https://api.github.com/repos/folliked/Woketo/subscribers","subscription_url":"https://api.github.com/repos/folliked/Woketo/subscription","commits_url":"https://api.github.com/repos/folliked/Woketo/commits{/sha}","git_commits_url":"https://api.github.com/repos/folliked/Woketo/git/commits{/sha}","comments_url":"https://api.github.com/repos/folliked/Woketo/comments{/number}","issue_comment_url":"https://api.github.com/repos/folliked/Woketo/issues/comments{/number}","contents_url":"https://api.github.com/repos/folliked/Woketo/contents/{+path}","compare_url":"https://api.github.com/repos/folliked/Woketo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/folliked/Woketo/merges","archive_url":"https://api.github.com/repos/folliked/Woketo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/folliked/Woketo/downloads","issues_url":"https://api.github.com/repos/folliked/Woketo/issues{/number}","pulls_url":"https://api.github.com/repos/folliked/Woketo/pulls{/number}","milestones_url":"https://api.github.com/repos/folliked/Woketo/milestones{/number}","notifications_url":"https://api.github.com/repos/folliked/Woketo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/folliked/Woketo/labels{/name}","releases_url":"https://api.github.com/repos/folliked/Woketo/releases{/id}","deployments_url":"https://api.github.com/repos/folliked/Woketo/deployments","created_at":"2016-10-17T20:27:52Z","updated_at":"2016-10-17T20:27:53Z","pushed_at":"2017-07-27T08:57:26Z","git_url":"git://github.com/folliked/Woketo.git","ssh_url":"git@github.com:folliked/Woketo.git","clone_url":"https://github.com/folliked/Woketo.git","svn_url":"https://github.com/folliked/Woketo","homepage":null,"size":270,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"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":"Nekland:master","ref":"master","sha":"1dd3f499c0cb25f180dcc2d1a56ff1b454c88707","user":{"login":"Nekland","id":1754554,"avatar_url":"https://avatars3.githubusercontent.com/u/1754554?v=4","gravatar_id":"","url":"https://api.github.com/users/Nekland","html_url":"https://github.com/Nekland","followers_url":"https://api.github.com/users/Nekland/followers","following_url":"https://api.github.com/users/Nekland/following{/other_user}","gists_url":"https://api.github.com/users/Nekland/gists{/gist_id}","starred_url":"https://api.github.com/users/Nekland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nekland/subscriptions","organizations_url":"https://api.github.com/users/Nekland/orgs","repos_url":"https://api.github.com/users/Nekland/repos","events_url":"https://api.github.com/users/Nekland/events{/privacy}","received_events_url":"https://api.github.com/users/Nekland/received_events","type":"Organization","site_admin":false},"repo":{"id":71177262,"name":"Woketo","full_name":"Nekland/Woketo","owner":{"login":"Nekland","id":1754554,"avatar_url":"https://avatars3.githubusercontent.com/u/1754554?v=4","gravatar_id":"","url":"https://api.github.com/users/Nekland","html_url":"https://github.com/Nekland","followers_url":"https://api.github.com/users/Nekland/followers","following_url":"https://api.github.com/users/Nekland/following{/other_user}","gists_url":"https://api.github.com/users/Nekland/gists{/gist_id}","starred_url":"https://api.github.com/users/Nekland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nekland/subscriptions","organizations_url":"https://api.github.com/users/Nekland/orgs","repos_url":"https://api.github.com/users/Nekland/repos","events_url":"https://api.github.com/users/Nekland/events{/privacy}","received_events_url":"https://api.github.com/users/Nekland/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Nekland/Woketo","description":"A WebSocket library for PHP.","fork":false,"url":"https://api.github.com/repos/Nekland/Woketo","forks_url":"https://api.github.com/repos/Nekland/Woketo/forks","keys_url":"https://api.github.com/repos/Nekland/Woketo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nekland/Woketo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nekland/Woketo/teams","hooks_url":"https://api.github.com/repos/Nekland/Woketo/hooks","issue_events_url":"https://api.github.com/repos/Nekland/Woketo/issues/events{/number}","events_url":"https://api.github.com/repos/Nekland/Woketo/events","assignees_url":"https://api.github.com/repos/Nekland/Woketo/assignees{/user}","branches_url":"https://api.github.com/repos/Nekland/Woketo/branches{/branch}","tags_url":"https://api.github.com/repos/Nekland/Woketo/tags","blobs_url":"https://api.github.com/repos/Nekland/Woketo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nekland/Woketo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nekland/Woketo/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nekland/Woketo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nekland/Woketo/statuses/{sha}","languages_url":"https://api.github.com/repos/Nekland/Woketo/languages","stargazers_url":"https://api.github.com/repos/Nekland/Woketo/stargazers","contributors_url":"https://api.github.com/repos/Nekland/Woketo/contributors","subscribers_url":"https://api.github.com/repos/Nekland/Woketo/subscribers","subscription_url":"https://api.github.com/repos/Nekland/Woketo/subscription","commits_url":"https://api.github.com/repos/Nekland/Woketo/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nekland/Woketo/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nekland/Woketo/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nekland/Woketo/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nekland/Woketo/contents/{+path}","compare_url":"https://api.github.com/repos/Nekland/Woketo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nekland/Woketo/merges","archive_url":"https://api.github.com/repos/Nekland/Woketo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nekland/Woketo/downloads","issues_url":"https://api.github.com/repos/Nekland/Woketo/issues{/number}","pulls_url":"https://api.github.com/repos/Nekland/Woketo/pulls{/number}","milestones_url":"https://api.github.com/repos/Nekland/Woketo/milestones{/number}","notifications_url":"https://api.github.com/repos/Nekland/Woketo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nekland/Woketo/labels{/name}","releases_url":"https://api.github.com/repos/Nekland/Woketo/releases{/id}","deployments_url":"https://api.github.com/repos/Nekland/Woketo/deployments","created_at":"2016-10-17T20:14:47Z","updated_at":"2017-05-25T23:57:19Z","pushed_at":"2017-07-27T08:57:27Z","git_url":"git://github.com/Nekland/Woketo.git","ssh_url":"git@github.com:Nekland/Woketo.git","clone_url":"https://github.com/Nekland/Woketo.git","svn_url":"https://github.com/Nekland/Woketo","homepage":"","size":261,"stargazers_count":13,"watchers_count":13,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":9,"forks":1,"open_issues":9,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Nekland/Woketo/pulls/118"},"html":{"href":"https://github.com/Nekland/Woketo/pull/118"},"issue":{"href":"https://api.github.com/repos/Nekland/Woketo/issues/118"},"comments":{"href":"https://api.github.com/repos/Nekland/Woketo/issues/118/comments"},"review_comments":{"href":"https://api.github.com/repos/Nekland/Woketo/pulls/118/comments"},"review_comment":{"href":"https://api.github.com/repos/Nekland/Woketo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Nekland/Woketo/pulls/118/commits"},"statuses":{"href":"https://api.github.com/repos/Nekland/Woketo/statuses/64b5e4114db0d8f04071b90cad51f1e2dcc02cd3"}}}}
{"actor":{"display_login":"folliked"}}