{"action":"created","comment":{"url":"https://api.github.com/repos/SonarSource/sonar-php/pulls/comments/229009130","pull_request_review_id":169406421,"id":229009130,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTAwOTEzMA==","diff_hunk":"@@ -0,0 +1,108 @@\n+\n+\n+# Sonar-PHP Control Flow Graph\n+\n+## Definition\n+\n+A CFG is a graph of [basic blocks](https://en.wikipedia.org/wiki/Basic_block) (from now on, we will use the term 'block'), where block is sequence of statements executed linearly without branching.\n+\n+### Blocks\n+\n+#### Block attributes\n+\n+* successors - set of blocks that are executed after specific block\n+* predecessors - set of blocks that are executed before specific block\n+* syntactic successor\n+  - an imaginary successor which exists only for blocks ending with unconditional jumps (`break`, `continue`, `return`, `goto`, `throw`)\n+  - it is the \"normal\" successor in case the jump would be omitted\n+  - for non-jump blocks, it is `null`\n+* elements\n+  - list of statements (represented as AST node) inside the block which are executed sequentially\n+  - `return` or jump like `break`, `continue` will be the last statement in the elements list\n+\n+#### Block types","path":"doc/CFG.md","position":23,"original_position":23,"commit_id":"598798076bb34084e24422ecd77b52f41169a7c4","original_commit_id":"598798076bb34084e24422ecd77b52f41169a7c4","user":{"login":"marcelo-sousa-sonarsource","id":36008846,"node_id":"MDQ6VXNlcjM2MDA4ODQ2","avatar_url":"https://avatars3.githubusercontent.com/u/36008846?v=4","gravatar_id":"","url":"https://api.github.com/users/marcelo-sousa-sonarsource","html_url":"https://github.com/marcelo-sousa-sonarsource","followers_url":"https://api.github.com/users/marcelo-sousa-sonarsource/followers","following_url":"https://api.github.com/users/marcelo-sousa-sonarsource/following{/other_user}","gists_url":"https://api.github.com/users/marcelo-sousa-sonarsource/gists{/gist_id}","starred_url":"https://api.github.com/users/marcelo-sousa-sonarsource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcelo-sousa-sonarsource/subscriptions","organizations_url":"https://api.github.com/users/marcelo-sousa-sonarsource/orgs","repos_url":"https://api.github.com/users/marcelo-sousa-sonarsource/repos","events_url":"https://api.github.com/users/marcelo-sousa-sonarsource/events{/privacy}","received_events_url":"https://api.github.com/users/marcelo-sousa-sonarsource/received_events","type":"User","site_admin":false},"body":"I don't understand why a block type is not an attribute of the block.","created_at":"2018-10-29T16:48:50Z","updated_at":"2018-10-29T16:48:50Z","html_url":"https://github.com/SonarSource/sonar-php/pull/386#discussion_r229009130","pull_request_url":"https://api.github.com/repos/SonarSource/sonar-php/pulls/386","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonar-php/pulls/comments/229009130"},"html":{"href":"https://github.com/SonarSource/sonar-php/pull/386#discussion_r229009130"},"pull_request":{"href":"https://api.github.com/repos/SonarSource/sonar-php/pulls/386"}}},"pull_request":{"url":"https://api.github.com/repos/SonarSource/sonar-php/pulls/386","id":225879847,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1ODc5ODQ3","html_url":"https://github.com/SonarSource/sonar-php/pull/386","diff_url":"https://github.com/SonarSource/sonar-php/pull/386.diff","patch_url":"https://github.com/SonarSource/sonar-php/pull/386.patch","issue_url":"https://api.github.com/repos/SonarSource/sonar-php/issues/386","number":386,"state":"open","locked":false,"title":"Update CFG documentation","user":{"login":"saberduck","id":680437,"node_id":"MDQ6VXNlcjY4MDQzNw==","avatar_url":"https://avatars1.githubusercontent.com/u/680437?v=4","gravatar_id":"","url":"https://api.github.com/users/saberduck","html_url":"https://github.com/saberduck","followers_url":"https://api.github.com/users/saberduck/followers","following_url":"https://api.github.com/users/saberduck/following{/other_user}","gists_url":"https://api.github.com/users/saberduck/gists{/gist_id}","starred_url":"https://api.github.com/users/saberduck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saberduck/subscriptions","organizations_url":"https://api.github.com/users/saberduck/orgs","repos_url":"https://api.github.com/users/saberduck/repos","events_url":"https://api.github.com/users/saberduck/events{/privacy}","received_events_url":"https://api.github.com/users/saberduck/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-25T19:41:06Z","updated_at":"2018-10-29T16:48:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c63ac76dd3c18c1de0b1be4113fb030e6c386cd","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SonarSource/sonar-php/pulls/386/commits","review_comments_url":"https://api.github.com/repos/SonarSource/sonar-php/pulls/386/comments","review_comment_url":"https://api.github.com/repos/SonarSource/sonar-php/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SonarSource/sonar-php/issues/386/comments","statuses_url":"https://api.github.com/repos/SonarSource/sonar-php/statuses/598798076bb34084e24422ecd77b52f41169a7c4","head":{"label":"SonarSource:update_cfg_docs","ref":"update_cfg_docs","sha":"598798076bb34084e24422ecd77b52f41169a7c4","user":{"login":"SonarSource","id":545988,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NTk4OA==","avatar_url":"https://avatars0.githubusercontent.com/u/545988?v=4","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"repo":{"id":4544982,"node_id":"MDEwOlJlcG9zaXRvcnk0NTQ0OTgy","name":"sonar-php","full_name":"SonarSource/sonar-php","private":false,"owner":{"login":"SonarSource","id":545988,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NTk4OA==","avatar_url":"https://avatars0.githubusercontent.com/u/545988?v=4","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/SonarSource/sonar-php","description":" :elephant: SonarPHP: PHP static analyzer for SonarQube & SonarLint","fork":false,"url":"https://api.github.com/repos/SonarSource/sonar-php","forks_url":"https://api.github.com/repos/SonarSource/sonar-php/forks","keys_url":"https://api.github.com/repos/SonarSource/sonar-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarSource/sonar-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarSource/sonar-php/teams","hooks_url":"https://api.github.com/repos/SonarSource/sonar-php/hooks","issue_events_url":"https://api.github.com/repos/SonarSource/sonar-php/issues/events{/number}","events_url":"https://api.github.com/repos/SonarSource/sonar-php/events","assignees_url":"https://api.github.com/repos/SonarSource/sonar-php/assignees{/user}","branches_url":"https://api.github.com/repos/SonarSource/sonar-php/branches{/branch}","tags_url":"https://api.github.com/repos/SonarSource/sonar-php/tags","blobs_url":"https://api.github.com/repos/SonarSource/sonar-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarSource/sonar-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarSource/sonar-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarSource/sonar-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarSource/sonar-php/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarSource/sonar-php/languages","stargazers_url":"https://api.github.com/repos/SonarSource/sonar-php/stargazers","contributors_url":"https://api.github.com/repos/SonarSource/sonar-php/contributors","subscribers_url":"https://api.github.com/repos/SonarSource/sonar-php/subscribers","subscription_url":"https://api.github.com/repos/SonarSource/sonar-php/subscription","commits_url":"https://api.github.com/repos/SonarSource/sonar-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarSource/sonar-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarSource/sonar-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarSource/sonar-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarSource/sonar-php/contents/{+path}","compare_url":"https://api.github.com/repos/SonarSource/sonar-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarSource/sonar-php/merges","archive_url":"https://api.github.com/repos/SonarSource/sonar-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarSource/sonar-php/downloads","issues_url":"https://api.github.com/repos/SonarSource/sonar-php/issues{/number}","pulls_url":"https://api.github.com/repos/SonarSource/sonar-php/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarSource/sonar-php/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarSource/sonar-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarSource/sonar-php/labels{/name}","releases_url":"https://api.github.com/repos/SonarSource/sonar-php/releases{/id}","deployments_url":"https://api.github.com/repos/SonarSource/sonar-php/deployments","created_at":"2012-06-04T08:36:12Z","updated_at":"2018-10-29T09:37:29Z","pushed_at":"2018-10-29T16:04:55Z","git_url":"git://github.com/SonarSource/sonar-php.git","ssh_url":"git@github.com:SonarSource/sonar-php.git","clone_url":"https://github.com/SonarSource/sonar-php.git","svn_url":"https://github.com/SonarSource/sonar-php","homepage":"","size":13497,"stargazers_count":153,"watchers_count":153,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":63,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":63,"open_issues":1,"watchers":153,"default_branch":"master"}},"base":{"label":"SonarSource:master","ref":"master","sha":"ce3b7cf7b30505bce7c22c5dcf6f50026d235407","user":{"login":"SonarSource","id":545988,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NTk4OA==","avatar_url":"https://avatars0.githubusercontent.com/u/545988?v=4","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"repo":{"id":4544982,"node_id":"MDEwOlJlcG9zaXRvcnk0NTQ0OTgy","name":"sonar-php","full_name":"SonarSource/sonar-php","private":false,"owner":{"login":"SonarSource","id":545988,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NTk4OA==","avatar_url":"https://avatars0.githubusercontent.com/u/545988?v=4","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/SonarSource/sonar-php","description":" :elephant: SonarPHP: PHP static analyzer for SonarQube & SonarLint","fork":false,"url":"https://api.github.com/repos/SonarSource/sonar-php","forks_url":"https://api.github.com/repos/SonarSource/sonar-php/forks","keys_url":"https://api.github.com/repos/SonarSource/sonar-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarSource/sonar-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarSource/sonar-php/teams","hooks_url":"https://api.github.com/repos/SonarSource/sonar-php/hooks","issue_events_url":"https://api.github.com/repos/SonarSource/sonar-php/issues/events{/number}","events_url":"https://api.github.com/repos/SonarSource/sonar-php/events","assignees_url":"https://api.github.com/repos/SonarSource/sonar-php/assignees{/user}","branches_url":"https://api.github.com/repos/SonarSource/sonar-php/branches{/branch}","tags_url":"https://api.github.com/repos/SonarSource/sonar-php/tags","blobs_url":"https://api.github.com/repos/SonarSource/sonar-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarSource/sonar-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarSource/sonar-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarSource/sonar-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarSource/sonar-php/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarSource/sonar-php/languages","stargazers_url":"https://api.github.com/repos/SonarSource/sonar-php/stargazers","contributors_url":"https://api.github.com/repos/SonarSource/sonar-php/contributors","subscribers_url":"https://api.github.com/repos/SonarSource/sonar-php/subscribers","subscription_url":"https://api.github.com/repos/SonarSource/sonar-php/subscription","commits_url":"https://api.github.com/repos/SonarSource/sonar-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarSource/sonar-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarSource/sonar-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarSource/sonar-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarSource/sonar-php/contents/{+path}","compare_url":"https://api.github.com/repos/SonarSource/sonar-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarSource/sonar-php/merges","archive_url":"https://api.github.com/repos/SonarSource/sonar-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarSource/sonar-php/downloads","issues_url":"https://api.github.com/repos/SonarSource/sonar-php/issues{/number}","pulls_url":"https://api.github.com/repos/SonarSource/sonar-php/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarSource/sonar-php/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarSource/sonar-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarSource/sonar-php/labels{/name}","releases_url":"https://api.github.com/repos/SonarSource/sonar-php/releases{/id}","deployments_url":"https://api.github.com/repos/SonarSource/sonar-php/deployments","created_at":"2012-06-04T08:36:12Z","updated_at":"2018-10-29T09:37:29Z","pushed_at":"2018-10-29T16:04:55Z","git_url":"git://github.com/SonarSource/sonar-php.git","ssh_url":"git@github.com:SonarSource/sonar-php.git","clone_url":"https://github.com/SonarSource/sonar-php.git","svn_url":"https://github.com/SonarSource/sonar-php","homepage":"","size":13497,"stargazers_count":153,"watchers_count":153,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":63,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":63,"open_issues":1,"watchers":153,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonar-php/pulls/386"},"html":{"href":"https://github.com/SonarSource/sonar-php/pull/386"},"issue":{"href":"https://api.github.com/repos/SonarSource/sonar-php/issues/386"},"comments":{"href":"https://api.github.com/repos/SonarSource/sonar-php/issues/386/comments"},"review_comments":{"href":"https://api.github.com/repos/SonarSource/sonar-php/pulls/386/comments"},"review_comment":{"href":"https://api.github.com/repos/SonarSource/sonar-php/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SonarSource/sonar-php/pulls/386/commits"},"statuses":{"href":"https://api.github.com/repos/SonarSource/sonar-php/statuses/598798076bb34084e24422ecd77b52f41169a7c4"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"marcelo-sousa-sonarsource"}}