{"action":"created","comment":{"url":"https://api.github.com/repos/fusioneng/speed-bumps/pulls/comments/31949621","id":31949621,"diff_hunk":"@@ -0,0 +1,23 @@\n+<?php\n+namespace Speed_Bumps\\Constraint\\Element;\n+\n+class Speed_Bumps_Element_Constraints {\n+\n+\tpublic static function adj_paragraph_contains_element( $canInsert, $context, $args, $alreadyInsertAd ) {\n+\n+\t\t$element_constraints = $args[ 'element_constraints' ];\n+\n+\t\tforeach( $element_constraints as $constraint ) {\n+\t\t\t$element_to_check = Speed_Bumps_Element_Factory::build( ucfirst( $constraint ) );\n+\t\t\t$prev_paragraph_not_insertable = $element_to_check->contains( $context['prev_paragraph'] );\n+\t\t\t$next_paragraph_not_insertable = $element_to_check->contains( $context['next_paragraph'] );","path":"inc/class-speed-bumps-element-constraints.php","position":13,"original_position":13,"commit_id":"337586ceabe80ecd31ca1734efa74b5f8c63988f","original_commit_id":"337586ceabe80ecd31ca1734efa74b5f8c63988f","user":{"login":"goldenapples","id":665992,"avatar_url":"https://avatars.githubusercontent.com/u/665992?v=3","gravatar_id":"","url":"https://api.github.com/users/goldenapples","html_url":"https://github.com/goldenapples","followers_url":"https://api.github.com/users/goldenapples/followers","following_url":"https://api.github.com/users/goldenapples/following{/other_user}","gists_url":"https://api.github.com/users/goldenapples/gists{/gist_id}","starred_url":"https://api.github.com/users/goldenapples/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldenapples/subscriptions","organizations_url":"https://api.github.com/users/goldenapples/orgs","repos_url":"https://api.github.com/users/goldenapples/repos","events_url":"https://api.github.com/users/goldenapples/events{/privacy}","received_events_url":"https://api.github.com/users/goldenapples/received_events","type":"User","site_admin":false},"body":"What about, in the factory class, if no constraint class for that element is defined, returning a dummy class with a `contains()` method that just returns false?","created_at":"2015-06-08T19:24:06Z","updated_at":"2015-06-08T19:24:06Z","html_url":"https://github.com/fusioneng/speed-bumps/pull/1#discussion_r31949621","pull_request_url":"https://api.github.com/repos/fusioneng/speed-bumps/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/fusioneng/speed-bumps/pulls/comments/31949621"},"html":{"href":"https://github.com/fusioneng/speed-bumps/pull/1#discussion_r31949621"},"pull_request":{"href":"https://api.github.com/repos/fusioneng/speed-bumps/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/fusioneng/speed-bumps/pulls/1","id":35248799,"html_url":"https://github.com/fusioneng/speed-bumps/pull/1","diff_url":"https://github.com/fusioneng/speed-bumps/pull/1.diff","patch_url":"https://github.com/fusioneng/speed-bumps/pull/1.patch","issue_url":"https://api.github.com/repos/fusioneng/speed-bumps/issues/1","number":1,"state":"open","locked":false,"title":"Intelligent Speed bumps","user":{"login":"noppanit","id":638379,"avatar_url":"https://avatars.githubusercontent.com/u/638379?v=3","gravatar_id":"","url":"https://api.github.com/users/noppanit","html_url":"https://github.com/noppanit","followers_url":"https://api.github.com/users/noppanit/followers","following_url":"https://api.github.com/users/noppanit/following{/other_user}","gists_url":"https://api.github.com/users/noppanit/gists{/gist_id}","starred_url":"https://api.github.com/users/noppanit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noppanit/subscriptions","organizations_url":"https://api.github.com/users/noppanit/orgs","repos_url":"https://api.github.com/users/noppanit/repos","events_url":"https://api.github.com/users/noppanit/events{/privacy}","received_events_url":"https://api.github.com/users/noppanit/received_events","type":"User","site_admin":false},"body":"https://github.com/fusioneng/fusion-theme/issues/2701","created_at":"2015-05-12T17:10:47Z","updated_at":"2015-06-08T19:24:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a049a78201423d07741742f559cf6be7b22aa4c9","assignee":{"login":"noppanit","id":638379,"avatar_url":"https://avatars.githubusercontent.com/u/638379?v=3","gravatar_id":"","url":"https://api.github.com/users/noppanit","html_url":"https://github.com/noppanit","followers_url":"https://api.github.com/users/noppanit/followers","following_url":"https://api.github.com/users/noppanit/following{/other_user}","gists_url":"https://api.github.com/users/noppanit/gists{/gist_id}","starred_url":"https://api.github.com/users/noppanit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noppanit/subscriptions","organizations_url":"https://api.github.com/users/noppanit/orgs","repos_url":"https://api.github.com/users/noppanit/repos","events_url":"https://api.github.com/users/noppanit/events{/privacy}","received_events_url":"https://api.github.com/users/noppanit/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/fusioneng/speed-bumps/pulls/1/commits","review_comments_url":"https://api.github.com/repos/fusioneng/speed-bumps/pulls/1/comments","review_comment_url":"https://api.github.com/repos/fusioneng/speed-bumps/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fusioneng/speed-bumps/issues/1/comments","statuses_url":"https://api.github.com/repos/fusioneng/speed-bumps/statuses/337586ceabe80ecd31ca1734efa74b5f8c63988f","head":{"label":"fusioneng:2701-speed-bumps","ref":"2701-speed-bumps","sha":"337586ceabe80ecd31ca1734efa74b5f8c63988f","user":{"login":"fusioneng","id":8161069,"avatar_url":"https://avatars.githubusercontent.com/u/8161069?v=3","gravatar_id":"","url":"https://api.github.com/users/fusioneng","html_url":"https://github.com/fusioneng","followers_url":"https://api.github.com/users/fusioneng/followers","following_url":"https://api.github.com/users/fusioneng/following{/other_user}","gists_url":"https://api.github.com/users/fusioneng/gists{/gist_id}","starred_url":"https://api.github.com/users/fusioneng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusioneng/subscriptions","organizations_url":"https://api.github.com/users/fusioneng/orgs","repos_url":"https://api.github.com/users/fusioneng/repos","events_url":"https://api.github.com/users/fusioneng/events{/privacy}","received_events_url":"https://api.github.com/users/fusioneng/received_events","type":"Organization","site_admin":false},"repo":{"id":35431371,"name":"speed-bumps","full_name":"fusioneng/speed-bumps","owner":{"login":"fusioneng","id":8161069,"avatar_url":"https://avatars.githubusercontent.com/u/8161069?v=3","gravatar_id":"","url":"https://api.github.com/users/fusioneng","html_url":"https://github.com/fusioneng","followers_url":"https://api.github.com/users/fusioneng/followers","following_url":"https://api.github.com/users/fusioneng/following{/other_user}","gists_url":"https://api.github.com/users/fusioneng/gists{/gist_id}","starred_url":"https://api.github.com/users/fusioneng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusioneng/subscriptions","organizations_url":"https://api.github.com/users/fusioneng/orgs","repos_url":"https://api.github.com/users/fusioneng/repos","events_url":"https://api.github.com/users/fusioneng/events{/privacy}","received_events_url":"https://api.github.com/users/fusioneng/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fusioneng/speed-bumps","description":"","fork":false,"url":"https://api.github.com/repos/fusioneng/speed-bumps","forks_url":"https://api.github.com/repos/fusioneng/speed-bumps/forks","keys_url":"https://api.github.com/repos/fusioneng/speed-bumps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fusioneng/speed-bumps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fusioneng/speed-bumps/teams","hooks_url":"https://api.github.com/repos/fusioneng/speed-bumps/hooks","issue_events_url":"https://api.github.com/repos/fusioneng/speed-bumps/issues/events{/number}","events_url":"https://api.github.com/repos/fusioneng/speed-bumps/events","assignees_url":"https://api.github.com/repos/fusioneng/speed-bumps/assignees{/user}","branches_url":"https://api.github.com/repos/fusioneng/speed-bumps/branches{/branch}","tags_url":"https://api.github.com/repos/fusioneng/speed-bumps/tags","blobs_url":"https://api.github.com/repos/fusioneng/speed-bumps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fusioneng/speed-bumps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fusioneng/speed-bumps/git/refs{/sha}","trees_url":"https://api.github.com/repos/fusioneng/speed-bumps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fusioneng/speed-bumps/statuses/{sha}","languages_url":"https://api.github.com/repos/fusioneng/speed-bumps/languages","stargazers_url":"https://api.github.com/repos/fusioneng/speed-bumps/stargazers","contributors_url":"https://api.github.com/repos/fusioneng/speed-bumps/contributors","subscribers_url":"https://api.github.com/repos/fusioneng/speed-bumps/subscribers","subscription_url":"https://api.github.com/repos/fusioneng/speed-bumps/subscription","commits_url":"https://api.github.com/repos/fusioneng/speed-bumps/commits{/sha}","git_commits_url":"https://api.github.com/repos/fusioneng/speed-bumps/git/commits{/sha}","comments_url":"https://api.github.com/repos/fusioneng/speed-bumps/comments{/number}","issue_comment_url":"https://api.github.com/repos/fusioneng/speed-bumps/issues/comments{/number}","contents_url":"https://api.github.com/repos/fusioneng/speed-bumps/contents/{+path}","compare_url":"https://api.github.com/repos/fusioneng/speed-bumps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fusioneng/speed-bumps/merges","archive_url":"https://api.github.com/repos/fusioneng/speed-bumps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fusioneng/speed-bumps/downloads","issues_url":"https://api.github.com/repos/fusioneng/speed-bumps/issues{/number}","pulls_url":"https://api.github.com/repos/fusioneng/speed-bumps/pulls{/number}","milestones_url":"https://api.github.com/repos/fusioneng/speed-bumps/milestones{/number}","notifications_url":"https://api.github.com/repos/fusioneng/speed-bumps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fusioneng/speed-bumps/labels{/name}","releases_url":"https://api.github.com/repos/fusioneng/speed-bumps/releases{/id}","created_at":"2015-05-11T15:08:48Z","updated_at":"2015-05-11T15:20:08Z","pushed_at":"2015-06-08T19:02:28Z","git_url":"git://github.com/fusioneng/speed-bumps.git","ssh_url":"git@github.com:fusioneng/speed-bumps.git","clone_url":"https://github.com/fusioneng/speed-bumps.git","svn_url":"https://github.com/fusioneng/speed-bumps","homepage":null,"size":224,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"fusioneng:master","ref":"master","sha":"64f2b286b884ff382b9480d826b25a0d4d9411b1","user":{"login":"fusioneng","id":8161069,"avatar_url":"https://avatars.githubusercontent.com/u/8161069?v=3","gravatar_id":"","url":"https://api.github.com/users/fusioneng","html_url":"https://github.com/fusioneng","followers_url":"https://api.github.com/users/fusioneng/followers","following_url":"https://api.github.com/users/fusioneng/following{/other_user}","gists_url":"https://api.github.com/users/fusioneng/gists{/gist_id}","starred_url":"https://api.github.com/users/fusioneng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusioneng/subscriptions","organizations_url":"https://api.github.com/users/fusioneng/orgs","repos_url":"https://api.github.com/users/fusioneng/repos","events_url":"https://api.github.com/users/fusioneng/events{/privacy}","received_events_url":"https://api.github.com/users/fusioneng/received_events","type":"Organization","site_admin":false},"repo":{"id":35431371,"name":"speed-bumps","full_name":"fusioneng/speed-bumps","owner":{"login":"fusioneng","id":8161069,"avatar_url":"https://avatars.githubusercontent.com/u/8161069?v=3","gravatar_id":"","url":"https://api.github.com/users/fusioneng","html_url":"https://github.com/fusioneng","followers_url":"https://api.github.com/users/fusioneng/followers","following_url":"https://api.github.com/users/fusioneng/following{/other_user}","gists_url":"https://api.github.com/users/fusioneng/gists{/gist_id}","starred_url":"https://api.github.com/users/fusioneng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusioneng/subscriptions","organizations_url":"https://api.github.com/users/fusioneng/orgs","repos_url":"https://api.github.com/users/fusioneng/repos","events_url":"https://api.github.com/users/fusioneng/events{/privacy}","received_events_url":"https://api.github.com/users/fusioneng/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fusioneng/speed-bumps","description":"","fork":false,"url":"https://api.github.com/repos/fusioneng/speed-bumps","forks_url":"https://api.github.com/repos/fusioneng/speed-bumps/forks","keys_url":"https://api.github.com/repos/fusioneng/speed-bumps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fusioneng/speed-bumps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fusioneng/speed-bumps/teams","hooks_url":"https://api.github.com/repos/fusioneng/speed-bumps/hooks","issue_events_url":"https://api.github.com/repos/fusioneng/speed-bumps/issues/events{/number}","events_url":"https://api.github.com/repos/fusioneng/speed-bumps/events","assignees_url":"https://api.github.com/repos/fusioneng/speed-bumps/assignees{/user}","branches_url":"https://api.github.com/repos/fusioneng/speed-bumps/branches{/branch}","tags_url":"https://api.github.com/repos/fusioneng/speed-bumps/tags","blobs_url":"https://api.github.com/repos/fusioneng/speed-bumps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fusioneng/speed-bumps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fusioneng/speed-bumps/git/refs{/sha}","trees_url":"https://api.github.com/repos/fusioneng/speed-bumps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fusioneng/speed-bumps/statuses/{sha}","languages_url":"https://api.github.com/repos/fusioneng/speed-bumps/languages","stargazers_url":"https://api.github.com/repos/fusioneng/speed-bumps/stargazers","contributors_url":"https://api.github.com/repos/fusioneng/speed-bumps/contributors","subscribers_url":"https://api.github.com/repos/fusioneng/speed-bumps/subscribers","subscription_url":"https://api.github.com/repos/fusioneng/speed-bumps/subscription","commits_url":"https://api.github.com/repos/fusioneng/speed-bumps/commits{/sha}","git_commits_url":"https://api.github.com/repos/fusioneng/speed-bumps/git/commits{/sha}","comments_url":"https://api.github.com/repos/fusioneng/speed-bumps/comments{/number}","issue_comment_url":"https://api.github.com/repos/fusioneng/speed-bumps/issues/comments{/number}","contents_url":"https://api.github.com/repos/fusioneng/speed-bumps/contents/{+path}","compare_url":"https://api.github.com/repos/fusioneng/speed-bumps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fusioneng/speed-bumps/merges","archive_url":"https://api.github.com/repos/fusioneng/speed-bumps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fusioneng/speed-bumps/downloads","issues_url":"https://api.github.com/repos/fusioneng/speed-bumps/issues{/number}","pulls_url":"https://api.github.com/repos/fusioneng/speed-bumps/pulls{/number}","milestones_url":"https://api.github.com/repos/fusioneng/speed-bumps/milestones{/number}","notifications_url":"https://api.github.com/repos/fusioneng/speed-bumps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fusioneng/speed-bumps/labels{/name}","releases_url":"https://api.github.com/repos/fusioneng/speed-bumps/releases{/id}","created_at":"2015-05-11T15:08:48Z","updated_at":"2015-05-11T15:20:08Z","pushed_at":"2015-06-08T19:02:28Z","git_url":"git://github.com/fusioneng/speed-bumps.git","ssh_url":"git@github.com:fusioneng/speed-bumps.git","clone_url":"https://github.com/fusioneng/speed-bumps.git","svn_url":"https://github.com/fusioneng/speed-bumps","homepage":null,"size":224,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fusioneng/speed-bumps/pulls/1"},"html":{"href":"https://github.com/fusioneng/speed-bumps/pull/1"},"issue":{"href":"https://api.github.com/repos/fusioneng/speed-bumps/issues/1"},"comments":{"href":"https://api.github.com/repos/fusioneng/speed-bumps/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/fusioneng/speed-bumps/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/fusioneng/speed-bumps/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fusioneng/speed-bumps/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/fusioneng/speed-bumps/statuses/337586ceabe80ecd31ca1734efa74b5f8c63988f"}}}}