{"action":"created","comment":{"url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/pulls/comments/237201337","pull_request_review_id":179442870,"id":237201337,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzIwMTMzNw==","diff_hunk":"@@ -0,0 +1,29 @@\n+<?php\n+\n+\n+namespace CoinParams\\BitWasp;\n+\n+\n+use CoinParams\\Exceptions\\ArrayKeyNotFound;\n+\n+class Internal\n+{\n+    /**\n+     * @param $array array\n+     * @param $key string\n+     * @param bool|string $execption: type or message to throw an exeption with your message or false to return null.\n+     * @return null|mixed\n+     * @throws ArrayKeyNotFound\n+     */\n+    public static function aget($array , $key , $execption = false)\n+    {\n+        if (is_array($array) AND array_key_exists($key, $array) AND true == $array[$key]){","path":"src/Internal.php","position":null,"original_position":20,"commit_id":"b5007e9559b0e42b32206599c36de0397e4cd91e","original_commit_id":"354ff16fc9346025093e63ded7e649c4d918dda6","user":{"login":"AdamSEY","id":28712999,"node_id":"MDQ6VXNlcjI4NzEyOTk5","avatar_url":"https://avatars3.githubusercontent.com/u/28712999?v=4","gravatar_id":"","url":"https://api.github.com/users/AdamSEY","html_url":"https://github.com/AdamSEY","followers_url":"https://api.github.com/users/AdamSEY/followers","following_url":"https://api.github.com/users/AdamSEY/following{/other_user}","gists_url":"https://api.github.com/users/AdamSEY/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamSEY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamSEY/subscriptions","organizations_url":"https://api.github.com/users/AdamSEY/orgs","repos_url":"https://api.github.com/users/AdamSEY/repos","events_url":"https://api.github.com/users/AdamSEY/events{/privacy}","received_events_url":"https://api.github.com/users/AdamSEY/received_events","type":"User","site_admin":false},"body":"Actually, its worth nothing to check if the value equals to true, let's just check if the array key exists and return its value whatever it is, what do you think?","created_at":"2018-11-28T18:13:17Z","updated_at":"2018-11-28T18:16:13Z","html_url":"https://github.com/dan-da/coinparams-bitwasp-addon/pull/2#discussion_r237201337","pull_request_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/pulls/2","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/pulls/comments/237201337"},"html":{"href":"https://github.com/dan-da/coinparams-bitwasp-addon/pull/2#discussion_r237201337"},"pull_request":{"href":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/pulls/2"}},"in_reply_to_id":237193459},"pull_request":{"url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/pulls/2","id":234278015,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0Mjc4MDE1","html_url":"https://github.com/dan-da/coinparams-bitwasp-addon/pull/2","diff_url":"https://github.com/dan-da/coinparams-bitwasp-addon/pull/2.diff","patch_url":"https://github.com/dan-da/coinparams-bitwasp-addon/pull/2.patch","issue_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/issues/2","number":2,"state":"open","locked":false,"title":"Remove error control operator ","user":{"login":"AdamSEY","id":28712999,"node_id":"MDQ6VXNlcjI4NzEyOTk5","avatar_url":"https://avatars3.githubusercontent.com/u/28712999?v=4","gravatar_id":"","url":"https://api.github.com/users/AdamSEY","html_url":"https://github.com/AdamSEY","followers_url":"https://api.github.com/users/AdamSEY/followers","following_url":"https://api.github.com/users/AdamSEY/following{/other_user}","gists_url":"https://api.github.com/users/AdamSEY/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamSEY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamSEY/subscriptions","organizations_url":"https://api.github.com/users/AdamSEY/orgs","repos_url":"https://api.github.com/users/AdamSEY/repos","events_url":"https://api.github.com/users/AdamSEY/events{/privacy}","received_events_url":"https://api.github.com/users/AdamSEY/received_events","type":"User","site_admin":false},"body":"Hi again, I have closed the previous PR and opened this one, please check if everything works.\r\nYou were depending on `@` a lot even in places that you don't have to. \r\nI couldn't do the tests well so I've left that for you since you're using your own library for tests.\r\nI've made the following tests:\r\n```\r\n$array = ['working'=>'yes it is'];\r\nvar_dump(aget($_GET, 'test'));\r\nvar_dump(aget($_GET, ''));\r\nvar_dump(aget($_POST, 'test'));\r\nvar_dump(aget($array, 'working'));\r\nvar_dump(aget($_GET, 'test' , false));\r\nvar_dump(aget($_GET, 'test' , true));\r\nvar_dump(aget($array, 'notExist' , 'Sorry, we couldnt find your key'));\r\nResponse: \r\nNULL\r\nNULL\r\nNULL\r\nstring(9) \"yes it is\"\r\nNULL\r\nPHP Fatal error:  Uncaught Exception: Array value not found for key test in /test.php:38\r\n\r\n```\r\n\r\nSummery:\r\n- a new function added `aget` to Internal class.\r\n- `aget` checks if an array key exists and value isn't false and returns null or\r\nthrows an exception with a custom message if exists or the default message.\r\n- Replaced @ with a new function `aget`.\r\n- Made a new directory for exceptions.","created_at":"2018-11-28T13:34:05Z","updated_at":"2018-11-28T18:16:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d10c8fe098eeba99c25e70c844b2f1cdbcf642d9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/pulls/2/commits","review_comments_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/pulls/2/comments","review_comment_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/issues/2/comments","statuses_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/statuses/b5007e9559b0e42b32206599c36de0397e4cd91e","head":{"label":"AdamSEY:error_control","ref":"error_control","sha":"b5007e9559b0e42b32206599c36de0397e4cd91e","user":{"login":"AdamSEY","id":28712999,"node_id":"MDQ6VXNlcjI4NzEyOTk5","avatar_url":"https://avatars3.githubusercontent.com/u/28712999?v=4","gravatar_id":"","url":"https://api.github.com/users/AdamSEY","html_url":"https://github.com/AdamSEY","followers_url":"https://api.github.com/users/AdamSEY/followers","following_url":"https://api.github.com/users/AdamSEY/following{/other_user}","gists_url":"https://api.github.com/users/AdamSEY/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamSEY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamSEY/subscriptions","organizations_url":"https://api.github.com/users/AdamSEY/orgs","repos_url":"https://api.github.com/users/AdamSEY/repos","events_url":"https://api.github.com/users/AdamSEY/events{/privacy}","received_events_url":"https://api.github.com/users/AdamSEY/received_events","type":"User","site_admin":false},"repo":{"id":157775953,"node_id":"MDEwOlJlcG9zaXRvcnkxNTc3NzU5NTM=","name":"coinparams-bitwasp-addon","full_name":"AdamSEY/coinparams-bitwasp-addon","private":false,"owner":{"login":"AdamSEY","id":28712999,"node_id":"MDQ6VXNlcjI4NzEyOTk5","avatar_url":"https://avatars3.githubusercontent.com/u/28712999?v=4","gravatar_id":"","url":"https://api.github.com/users/AdamSEY","html_url":"https://github.com/AdamSEY","followers_url":"https://api.github.com/users/AdamSEY/followers","following_url":"https://api.github.com/users/AdamSEY/following{/other_user}","gists_url":"https://api.github.com/users/AdamSEY/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamSEY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamSEY/subscriptions","organizations_url":"https://api.github.com/users/AdamSEY/orgs","repos_url":"https://api.github.com/users/AdamSEY/repos","events_url":"https://api.github.com/users/AdamSEY/events{/privacy}","received_events_url":"https://api.github.com/users/AdamSEY/received_events","type":"User","site_admin":false},"html_url":"https://github.com/AdamSEY/coinparams-bitwasp-addon","description":"classes to integrate bitwasp bitcoin-php with coinparams for multicoin functionality.","fork":true,"url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon","forks_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/forks","keys_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/teams","hooks_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/hooks","issue_events_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/issues/events{/number}","events_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/events","assignees_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/assignees{/user}","branches_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/branches{/branch}","tags_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/tags","blobs_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/git/refs{/sha}","trees_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/statuses/{sha}","languages_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/languages","stargazers_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/stargazers","contributors_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/contributors","subscribers_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/subscribers","subscription_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/subscription","commits_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/commits{/sha}","git_commits_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/git/commits{/sha}","comments_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/comments{/number}","issue_comment_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/issues/comments{/number}","contents_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/contents/{+path}","compare_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/merges","archive_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/downloads","issues_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/issues{/number}","pulls_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/pulls{/number}","milestones_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/milestones{/number}","notifications_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/labels{/name}","releases_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/releases{/id}","deployments_url":"https://api.github.com/repos/AdamSEY/coinparams-bitwasp-addon/deployments","created_at":"2018-11-15T21:37:18Z","updated_at":"2018-11-15T21:37:20Z","pushed_at":"2018-11-28T18:15:23Z","git_url":"git://github.com/AdamSEY/coinparams-bitwasp-addon.git","ssh_url":"git@github.com:AdamSEY/coinparams-bitwasp-addon.git","clone_url":"https://github.com/AdamSEY/coinparams-bitwasp-addon.git","svn_url":"https://github.com/AdamSEY/coinparams-bitwasp-addon","homepage":null,"size":21,"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,"archived":false,"open_issues_count":0,"license":{"key":"unlicense","name":"The Unlicense","spdx_id":"Unlicense","url":"https://api.github.com/licenses/unlicense","node_id":"MDc6TGljZW5zZTE1"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dan-da:master","ref":"master","sha":"a588c6b8729274dcca53e2bea3e1a5596c587243","user":{"login":"dan-da","id":5110592,"node_id":"MDQ6VXNlcjUxMTA1OTI=","avatar_url":"https://avatars3.githubusercontent.com/u/5110592?v=4","gravatar_id":"","url":"https://api.github.com/users/dan-da","html_url":"https://github.com/dan-da","followers_url":"https://api.github.com/users/dan-da/followers","following_url":"https://api.github.com/users/dan-da/following{/other_user}","gists_url":"https://api.github.com/users/dan-da/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-da/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-da/subscriptions","organizations_url":"https://api.github.com/users/dan-da/orgs","repos_url":"https://api.github.com/users/dan-da/repos","events_url":"https://api.github.com/users/dan-da/events{/privacy}","received_events_url":"https://api.github.com/users/dan-da/received_events","type":"User","site_admin":false},"repo":{"id":141823685,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE4MjM2ODU=","name":"coinparams-bitwasp-addon","full_name":"dan-da/coinparams-bitwasp-addon","private":false,"owner":{"login":"dan-da","id":5110592,"node_id":"MDQ6VXNlcjUxMTA1OTI=","avatar_url":"https://avatars3.githubusercontent.com/u/5110592?v=4","gravatar_id":"","url":"https://api.github.com/users/dan-da","html_url":"https://github.com/dan-da","followers_url":"https://api.github.com/users/dan-da/followers","following_url":"https://api.github.com/users/dan-da/following{/other_user}","gists_url":"https://api.github.com/users/dan-da/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-da/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-da/subscriptions","organizations_url":"https://api.github.com/users/dan-da/orgs","repos_url":"https://api.github.com/users/dan-da/repos","events_url":"https://api.github.com/users/dan-da/events{/privacy}","received_events_url":"https://api.github.com/users/dan-da/received_events","type":"User","site_admin":false},"html_url":"https://github.com/dan-da/coinparams-bitwasp-addon","description":"classes to integrate bitwasp bitcoin-php with coinparams for multicoin functionality.","fork":false,"url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon","forks_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/forks","keys_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/teams","hooks_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/hooks","issue_events_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/issues/events{/number}","events_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/events","assignees_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/assignees{/user}","branches_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/branches{/branch}","tags_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/tags","blobs_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/git/refs{/sha}","trees_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/statuses/{sha}","languages_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/languages","stargazers_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/stargazers","contributors_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/contributors","subscribers_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/subscribers","subscription_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/subscription","commits_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/commits{/sha}","git_commits_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/git/commits{/sha}","comments_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/comments{/number}","issue_comment_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/issues/comments{/number}","contents_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/contents/{+path}","compare_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/merges","archive_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/downloads","issues_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/issues{/number}","pulls_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/pulls{/number}","milestones_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/milestones{/number}","notifications_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/labels{/name}","releases_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/releases{/id}","deployments_url":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/deployments","created_at":"2018-07-21T15:15:30Z","updated_at":"2018-11-15T21:11:05Z","pushed_at":"2018-11-28T18:15:23Z","git_url":"git://github.com/dan-da/coinparams-bitwasp-addon.git","ssh_url":"git@github.com:dan-da/coinparams-bitwasp-addon.git","clone_url":"https://github.com/dan-da/coinparams-bitwasp-addon.git","svn_url":"https://github.com/dan-da/coinparams-bitwasp-addon","homepage":null,"size":19,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"unlicense","name":"The Unlicense","spdx_id":"Unlicense","url":"https://api.github.com/licenses/unlicense","node_id":"MDc6TGljZW5zZTE1"},"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/pulls/2"},"html":{"href":"https://github.com/dan-da/coinparams-bitwasp-addon/pull/2"},"issue":{"href":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/issues/2"},"comments":{"href":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/dan-da/coinparams-bitwasp-addon/statuses/b5007e9559b0e42b32206599c36de0397e4cd91e"}},"author_association":"NONE"}}
{"actor":{"display_login":"AdamSEY"}}