{"action":"created","comment":{"url":"https://api.github.com/repos/LaFrimousse/SwengProject/pulls/comments/235874469","pull_request_review_id":177842452,"id":235874469,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTg3NDQ2OQ==","diff_hunk":"@@ -85,24 +102,43 @@ public  void dowloadImage(StorageReference atPath, final Function<Bitmap, Void>\n         atPath.getBytes(FIVE_MEGABYTE).addOnCompleteListener(new OnCompleteListener<byte[]>() {\n             @Override\n             public void onComplete(@NonNull Task<byte[]> task) {\n-                if(callBack != null) {\n                     if (task.isSuccessful()) {\n                         byte[] bytes = task.getResult();\n                         callBack.apply(bytesToBitmap(bytes));\n                     } else {\n                         System.out.println(task.getException());\n                         callBack.apply(null);\n                     }\n-                }\n+\n             }\n         });\n     }\n \n-    public  void dowloadUserImage(String imageName, final Function<Bitmap, Void> callBack){\n+    public void downloadUserImage(String imageName, final Function<Bitmap, Void> callBack){\n         StorageReference atPath = usersImages.child(imageName.replaceAll(\"[.]\", \",\"));\n-        dowloadImage(atPath, callBack);\n+        downloadImage(atPath, callBack);\n     }\n \n+    public  void downloadNeedImage(String imageName, final Function<Bitmap, Void> callBack){\n+        StorageReference atPath = needsImages.child(imageName.replaceAll(\"[.]\", \",\"));\n+        downloadImage(atPath, callBack);\n+    }\n+\n+    public  void deleteNeedImage(String needImageID, final Function<Boolean, Void> callBack){\n+        StorageReference atPath = needsImages.child(needImageID.replaceAll(\"[.]\", \",\"));\n+        atPath.delete().addOnCompleteListener(new OnCompleteListener<Void>() {","path":"app/src/main/java/ch/epfl/sweng/swengproject/storage/firebase/FireBaseStorage.java","position":94,"original_position":94,"commit_id":"96fe7fbef731a28fd4c747b3bc0ab0f126c49257","original_commit_id":"96fe7fbef731a28fd4c747b3bc0ab0f126c49257","user":{"login":"codeclimate[bot]","id":36754821,"node_id":"MDM6Qm90MzY3NTQ4MjE=","avatar_url":"https://avatars0.githubusercontent.com/in/9403?v=4","gravatar_id":"","url":"https://api.github.com/users/codeclimate%5Bbot%5D","html_url":"https://github.com/apps/codeclimate","followers_url":"https://api.github.com/users/codeclimate%5Bbot%5D/followers","following_url":"https://api.github.com/users/codeclimate%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/codeclimate%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/codeclimate%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeclimate%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/codeclimate%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/codeclimate%5Bbot%5D/repos","events_url":"https://api.github.com/users/codeclimate%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/codeclimate%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"Similar blocks of code found in 2 locations. Consider refactoring.","created_at":"2018-11-23T08:57:55Z","updated_at":"2018-11-23T08:57:55Z","html_url":"https://github.com/LaFrimousse/SwengProject/pull/194#discussion_r235874469","pull_request_url":"https://api.github.com/repos/LaFrimousse/SwengProject/pulls/194","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/LaFrimousse/SwengProject/pulls/comments/235874469"},"html":{"href":"https://github.com/LaFrimousse/SwengProject/pull/194#discussion_r235874469"},"pull_request":{"href":"https://api.github.com/repos/LaFrimousse/SwengProject/pulls/194"}}},"pull_request":{"url":"https://api.github.com/repos/LaFrimousse/SwengProject/pulls/194","id":232748051,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyNzQ4MDUx","html_url":"https://github.com/LaFrimousse/SwengProject/pull/194","diff_url":"https://github.com/LaFrimousse/SwengProject/pull/194.diff","patch_url":"https://github.com/LaFrimousse/SwengProject/pull/194.patch","issue_url":"https://api.github.com/repos/LaFrimousse/SwengProject/issues/194","number":194,"state":"open","locked":false,"title":"F 190 layout picture need","user":{"login":"hedi-sassi","id":25903100,"node_id":"MDQ6VXNlcjI1OTAzMTAw","avatar_url":"https://avatars0.githubusercontent.com/u/25903100?v=4","gravatar_id":"","url":"https://api.github.com/users/hedi-sassi","html_url":"https://github.com/hedi-sassi","followers_url":"https://api.github.com/users/hedi-sassi/followers","following_url":"https://api.github.com/users/hedi-sassi/following{/other_user}","gists_url":"https://api.github.com/users/hedi-sassi/gists{/gist_id}","starred_url":"https://api.github.com/users/hedi-sassi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hedi-sassi/subscriptions","organizations_url":"https://api.github.com/users/hedi-sassi/orgs","repos_url":"https://api.github.com/users/hedi-sassi/repos","events_url":"https://api.github.com/users/hedi-sassi/events{/privacy}","received_events_url":"https://api.github.com/users/hedi-sassi/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-21T17:36:24Z","updated_at":"2018-11-23T08:57:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a5fd372b34f17de7387340fac0e2422fc4dcbf8a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/LaFrimousse/SwengProject/pulls/194/commits","review_comments_url":"https://api.github.com/repos/LaFrimousse/SwengProject/pulls/194/comments","review_comment_url":"https://api.github.com/repos/LaFrimousse/SwengProject/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LaFrimousse/SwengProject/issues/194/comments","statuses_url":"https://api.github.com/repos/LaFrimousse/SwengProject/statuses/96fe7fbef731a28fd4c747b3bc0ab0f126c49257","head":{"label":"LaFrimousse:f-190-layout_picture_need","ref":"f-190-layout_picture_need","sha":"96fe7fbef731a28fd4c747b3bc0ab0f126c49257","user":{"login":"LaFrimousse","id":24992221,"node_id":"MDQ6VXNlcjI0OTkyMjIx","avatar_url":"https://avatars3.githubusercontent.com/u/24992221?v=4","gravatar_id":"","url":"https://api.github.com/users/LaFrimousse","html_url":"https://github.com/LaFrimousse","followers_url":"https://api.github.com/users/LaFrimousse/followers","following_url":"https://api.github.com/users/LaFrimousse/following{/other_user}","gists_url":"https://api.github.com/users/LaFrimousse/gists{/gist_id}","starred_url":"https://api.github.com/users/LaFrimousse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaFrimousse/subscriptions","organizations_url":"https://api.github.com/users/LaFrimousse/orgs","repos_url":"https://api.github.com/users/LaFrimousse/repos","events_url":"https://api.github.com/users/LaFrimousse/events{/privacy}","received_events_url":"https://api.github.com/users/LaFrimousse/received_events","type":"User","site_admin":false},"repo":{"id":150401004,"node_id":"MDEwOlJlcG9zaXRvcnkxNTA0MDEwMDQ=","name":"SwengProject","full_name":"LaFrimousse/SwengProject","private":false,"owner":{"login":"LaFrimousse","id":24992221,"node_id":"MDQ6VXNlcjI0OTkyMjIx","avatar_url":"https://avatars3.githubusercontent.com/u/24992221?v=4","gravatar_id":"","url":"https://api.github.com/users/LaFrimousse","html_url":"https://github.com/LaFrimousse","followers_url":"https://api.github.com/users/LaFrimousse/followers","following_url":"https://api.github.com/users/LaFrimousse/following{/other_user}","gists_url":"https://api.github.com/users/LaFrimousse/gists{/gist_id}","starred_url":"https://api.github.com/users/LaFrimousse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaFrimousse/subscriptions","organizations_url":"https://api.github.com/users/LaFrimousse/orgs","repos_url":"https://api.github.com/users/LaFrimousse/repos","events_url":"https://api.github.com/users/LaFrimousse/events{/privacy}","received_events_url":"https://api.github.com/users/LaFrimousse/received_events","type":"User","site_admin":false},"html_url":"https://github.com/LaFrimousse/SwengProject","description":null,"fork":false,"url":"https://api.github.com/repos/LaFrimousse/SwengProject","forks_url":"https://api.github.com/repos/LaFrimousse/SwengProject/forks","keys_url":"https://api.github.com/repos/LaFrimousse/SwengProject/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LaFrimousse/SwengProject/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LaFrimousse/SwengProject/teams","hooks_url":"https://api.github.com/repos/LaFrimousse/SwengProject/hooks","issue_events_url":"https://api.github.com/repos/LaFrimousse/SwengProject/issues/events{/number}","events_url":"https://api.github.com/repos/LaFrimousse/SwengProject/events","assignees_url":"https://api.github.com/repos/LaFrimousse/SwengProject/assignees{/user}","branches_url":"https://api.github.com/repos/LaFrimousse/SwengProject/branches{/branch}","tags_url":"https://api.github.com/repos/LaFrimousse/SwengProject/tags","blobs_url":"https://api.github.com/repos/LaFrimousse/SwengProject/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LaFrimousse/SwengProject/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LaFrimousse/SwengProject/git/refs{/sha}","trees_url":"https://api.github.com/repos/LaFrimousse/SwengProject/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LaFrimousse/SwengProject/statuses/{sha}","languages_url":"https://api.github.com/repos/LaFrimousse/SwengProject/languages","stargazers_url":"https://api.github.com/repos/LaFrimousse/SwengProject/stargazers","contributors_url":"https://api.github.com/repos/LaFrimousse/SwengProject/contributors","subscribers_url":"https://api.github.com/repos/LaFrimousse/SwengProject/subscribers","subscription_url":"https://api.github.com/repos/LaFrimousse/SwengProject/subscription","commits_url":"https://api.github.com/repos/LaFrimousse/SwengProject/commits{/sha}","git_commits_url":"https://api.github.com/repos/LaFrimousse/SwengProject/git/commits{/sha}","comments_url":"https://api.github.com/repos/LaFrimousse/SwengProject/comments{/number}","issue_comment_url":"https://api.github.com/repos/LaFrimousse/SwengProject/issues/comments{/number}","contents_url":"https://api.github.com/repos/LaFrimousse/SwengProject/contents/{+path}","compare_url":"https://api.github.com/repos/LaFrimousse/SwengProject/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LaFrimousse/SwengProject/merges","archive_url":"https://api.github.com/repos/LaFrimousse/SwengProject/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LaFrimousse/SwengProject/downloads","issues_url":"https://api.github.com/repos/LaFrimousse/SwengProject/issues{/number}","pulls_url":"https://api.github.com/repos/LaFrimousse/SwengProject/pulls{/number}","milestones_url":"https://api.github.com/repos/LaFrimousse/SwengProject/milestones{/number}","notifications_url":"https://api.github.com/repos/LaFrimousse/SwengProject/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LaFrimousse/SwengProject/labels{/name}","releases_url":"https://api.github.com/repos/LaFrimousse/SwengProject/releases{/id}","deployments_url":"https://api.github.com/repos/LaFrimousse/SwengProject/deployments","created_at":"2018-09-26T09:20:05Z","updated_at":"2018-11-22T12:46:40Z","pushed_at":"2018-11-23T08:57:43Z","git_url":"git://github.com/LaFrimousse/SwengProject.git","ssh_url":"git@github.com:LaFrimousse/SwengProject.git","clone_url":"https://github.com/LaFrimousse/SwengProject.git","svn_url":"https://github.com/LaFrimousse/SwengProject","homepage":null,"size":19160,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":18,"license":null,"forks":1,"open_issues":18,"watchers":1,"default_branch":"master"}},"base":{"label":"LaFrimousse:master","ref":"master","sha":"779c4b02c753ea7fc5c63867a6eee837a5390d23","user":{"login":"LaFrimousse","id":24992221,"node_id":"MDQ6VXNlcjI0OTkyMjIx","avatar_url":"https://avatars3.githubusercontent.com/u/24992221?v=4","gravatar_id":"","url":"https://api.github.com/users/LaFrimousse","html_url":"https://github.com/LaFrimousse","followers_url":"https://api.github.com/users/LaFrimousse/followers","following_url":"https://api.github.com/users/LaFrimousse/following{/other_user}","gists_url":"https://api.github.com/users/LaFrimousse/gists{/gist_id}","starred_url":"https://api.github.com/users/LaFrimousse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaFrimousse/subscriptions","organizations_url":"https://api.github.com/users/LaFrimousse/orgs","repos_url":"https://api.github.com/users/LaFrimousse/repos","events_url":"https://api.github.com/users/LaFrimousse/events{/privacy}","received_events_url":"https://api.github.com/users/LaFrimousse/received_events","type":"User","site_admin":false},"repo":{"id":150401004,"node_id":"MDEwOlJlcG9zaXRvcnkxNTA0MDEwMDQ=","name":"SwengProject","full_name":"LaFrimousse/SwengProject","private":false,"owner":{"login":"LaFrimousse","id":24992221,"node_id":"MDQ6VXNlcjI0OTkyMjIx","avatar_url":"https://avatars3.githubusercontent.com/u/24992221?v=4","gravatar_id":"","url":"https://api.github.com/users/LaFrimousse","html_url":"https://github.com/LaFrimousse","followers_url":"https://api.github.com/users/LaFrimousse/followers","following_url":"https://api.github.com/users/LaFrimousse/following{/other_user}","gists_url":"https://api.github.com/users/LaFrimousse/gists{/gist_id}","starred_url":"https://api.github.com/users/LaFrimousse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaFrimousse/subscriptions","organizations_url":"https://api.github.com/users/LaFrimousse/orgs","repos_url":"https://api.github.com/users/LaFrimousse/repos","events_url":"https://api.github.com/users/LaFrimousse/events{/privacy}","received_events_url":"https://api.github.com/users/LaFrimousse/received_events","type":"User","site_admin":false},"html_url":"https://github.com/LaFrimousse/SwengProject","description":null,"fork":false,"url":"https://api.github.com/repos/LaFrimousse/SwengProject","forks_url":"https://api.github.com/repos/LaFrimousse/SwengProject/forks","keys_url":"https://api.github.com/repos/LaFrimousse/SwengProject/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LaFrimousse/SwengProject/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LaFrimousse/SwengProject/teams","hooks_url":"https://api.github.com/repos/LaFrimousse/SwengProject/hooks","issue_events_url":"https://api.github.com/repos/LaFrimousse/SwengProject/issues/events{/number}","events_url":"https://api.github.com/repos/LaFrimousse/SwengProject/events","assignees_url":"https://api.github.com/repos/LaFrimousse/SwengProject/assignees{/user}","branches_url":"https://api.github.com/repos/LaFrimousse/SwengProject/branches{/branch}","tags_url":"https://api.github.com/repos/LaFrimousse/SwengProject/tags","blobs_url":"https://api.github.com/repos/LaFrimousse/SwengProject/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LaFrimousse/SwengProject/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LaFrimousse/SwengProject/git/refs{/sha}","trees_url":"https://api.github.com/repos/LaFrimousse/SwengProject/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LaFrimousse/SwengProject/statuses/{sha}","languages_url":"https://api.github.com/repos/LaFrimousse/SwengProject/languages","stargazers_url":"https://api.github.com/repos/LaFrimousse/SwengProject/stargazers","contributors_url":"https://api.github.com/repos/LaFrimousse/SwengProject/contributors","subscribers_url":"https://api.github.com/repos/LaFrimousse/SwengProject/subscribers","subscription_url":"https://api.github.com/repos/LaFrimousse/SwengProject/subscription","commits_url":"https://api.github.com/repos/LaFrimousse/SwengProject/commits{/sha}","git_commits_url":"https://api.github.com/repos/LaFrimousse/SwengProject/git/commits{/sha}","comments_url":"https://api.github.com/repos/LaFrimousse/SwengProject/comments{/number}","issue_comment_url":"https://api.github.com/repos/LaFrimousse/SwengProject/issues/comments{/number}","contents_url":"https://api.github.com/repos/LaFrimousse/SwengProject/contents/{+path}","compare_url":"https://api.github.com/repos/LaFrimousse/SwengProject/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LaFrimousse/SwengProject/merges","archive_url":"https://api.github.com/repos/LaFrimousse/SwengProject/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LaFrimousse/SwengProject/downloads","issues_url":"https://api.github.com/repos/LaFrimousse/SwengProject/issues{/number}","pulls_url":"https://api.github.com/repos/LaFrimousse/SwengProject/pulls{/number}","milestones_url":"https://api.github.com/repos/LaFrimousse/SwengProject/milestones{/number}","notifications_url":"https://api.github.com/repos/LaFrimousse/SwengProject/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LaFrimousse/SwengProject/labels{/name}","releases_url":"https://api.github.com/repos/LaFrimousse/SwengProject/releases{/id}","deployments_url":"https://api.github.com/repos/LaFrimousse/SwengProject/deployments","created_at":"2018-09-26T09:20:05Z","updated_at":"2018-11-22T12:46:40Z","pushed_at":"2018-11-23T08:57:43Z","git_url":"git://github.com/LaFrimousse/SwengProject.git","ssh_url":"git@github.com:LaFrimousse/SwengProject.git","clone_url":"https://github.com/LaFrimousse/SwengProject.git","svn_url":"https://github.com/LaFrimousse/SwengProject","homepage":null,"size":19160,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":18,"license":null,"forks":1,"open_issues":18,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/LaFrimousse/SwengProject/pulls/194"},"html":{"href":"https://github.com/LaFrimousse/SwengProject/pull/194"},"issue":{"href":"https://api.github.com/repos/LaFrimousse/SwengProject/issues/194"},"comments":{"href":"https://api.github.com/repos/LaFrimousse/SwengProject/issues/194/comments"},"review_comments":{"href":"https://api.github.com/repos/LaFrimousse/SwengProject/pulls/194/comments"},"review_comment":{"href":"https://api.github.com/repos/LaFrimousse/SwengProject/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LaFrimousse/SwengProject/pulls/194/commits"},"statuses":{"href":"https://api.github.com/repos/LaFrimousse/SwengProject/statuses/96fe7fbef731a28fd4c747b3bc0ab0f126c49257"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"codeclimate"}}