{"action":"closed","number":177,"pull_request":{"url":"https://api.github.com/repos/behance/php-sniffs/pulls/177","id":73116079,"html_url":"https://github.com/behance/php-sniffs/pull/177","diff_url":"https://github.com/behance/php-sniffs/pull/177.diff","patch_url":"https://github.com/behance/php-sniffs/pull/177.patch","issue_url":"https://api.github.com/repos/behance/php-sniffs/issues/177","number":177,"state":"closed","locked":false,"title":"Ternary: Fix index error when first ternary is malformed","user":{"login":"andyroo2000","id":13655,"avatar_url":"https://avatars.githubusercontent.com/u/13655?v=3","gravatar_id":"","url":"https://api.github.com/users/andyroo2000","html_url":"https://github.com/andyroo2000","followers_url":"https://api.github.com/users/andyroo2000/followers","following_url":"https://api.github.com/users/andyroo2000/following{/other_user}","gists_url":"https://api.github.com/users/andyroo2000/gists{/gist_id}","starred_url":"https://api.github.com/users/andyroo2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyroo2000/subscriptions","organizations_url":"https://api.github.com/users/andyroo2000/orgs","repos_url":"https://api.github.com/users/andyroo2000/repos","events_url":"https://api.github.com/users/andyroo2000/events{/privacy}","received_events_url":"https://api.github.com/users/andyroo2000/received_events","type":"User","site_admin":false},"body":"Fixes adobe-community/issues#9588\r\n@mikesherov @be-dmitry \r\n\r\nThis fixes an issue where it would encounter an error like the following if a malformed ternary was not preceded by a correctly formed ternary:\r\n\r\n```\r\nNotice: Undefined offset: -1 in /home/travis/build/behance/nbd.php-gatekeeper/vendor/behance/php-sniffs/Behance/Sniffs/ControlStructures/TernarySniff.php on line 165\r\n```\r\n\r\nJust adding a `isset` check before trying to use an array index now.\r\n\r\nThe rest of the changes are simply a re-ordering of the test, since the error can only be replicated if the incorrectly formatted ternary is at the beginning of the test file... Just making sure that the test would break if I took my fix out.","created_at":"2016-06-08T20:38:34Z","updated_at":"2016-06-13T20:23:51Z","closed_at":"2016-06-13T20:23:51Z","merged_at":"2016-06-13T20:23:51Z","merge_commit_sha":"8467add97959f468f5ea13278241e92504d63204","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/behance/php-sniffs/pulls/177/commits","review_comments_url":"https://api.github.com/repos/behance/php-sniffs/pulls/177/comments","review_comment_url":"https://api.github.com/repos/behance/php-sniffs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/behance/php-sniffs/issues/177/comments","statuses_url":"https://api.github.com/repos/behance/php-sniffs/statuses/711d9bf24d8492a8a7a1e1324cd5208a6a819c48","head":{"label":"andyroo2000:ternary-sniff-fix-index-error","ref":"ternary-sniff-fix-index-error","sha":"711d9bf24d8492a8a7a1e1324cd5208a6a819c48","user":{"login":"andyroo2000","id":13655,"avatar_url":"https://avatars.githubusercontent.com/u/13655?v=3","gravatar_id":"","url":"https://api.github.com/users/andyroo2000","html_url":"https://github.com/andyroo2000","followers_url":"https://api.github.com/users/andyroo2000/followers","following_url":"https://api.github.com/users/andyroo2000/following{/other_user}","gists_url":"https://api.github.com/users/andyroo2000/gists{/gist_id}","starred_url":"https://api.github.com/users/andyroo2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyroo2000/subscriptions","organizations_url":"https://api.github.com/users/andyroo2000/orgs","repos_url":"https://api.github.com/users/andyroo2000/repos","events_url":"https://api.github.com/users/andyroo2000/events{/privacy}","received_events_url":"https://api.github.com/users/andyroo2000/received_events","type":"User","site_admin":false},"repo":{"id":60712026,"name":"php-sniffs-1","full_name":"andyroo2000/php-sniffs-1","owner":{"login":"andyroo2000","id":13655,"avatar_url":"https://avatars.githubusercontent.com/u/13655?v=3","gravatar_id":"","url":"https://api.github.com/users/andyroo2000","html_url":"https://github.com/andyroo2000","followers_url":"https://api.github.com/users/andyroo2000/followers","following_url":"https://api.github.com/users/andyroo2000/following{/other_user}","gists_url":"https://api.github.com/users/andyroo2000/gists{/gist_id}","starred_url":"https://api.github.com/users/andyroo2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyroo2000/subscriptions","organizations_url":"https://api.github.com/users/andyroo2000/orgs","repos_url":"https://api.github.com/users/andyroo2000/repos","events_url":"https://api.github.com/users/andyroo2000/events{/privacy}","received_events_url":"https://api.github.com/users/andyroo2000/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andyroo2000/php-sniffs-1","description":"Behance PHPCS Sniffs","fork":true,"url":"https://api.github.com/repos/andyroo2000/php-sniffs-1","forks_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/forks","keys_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/teams","hooks_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/hooks","issue_events_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/issues/events{/number}","events_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/events","assignees_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/assignees{/user}","branches_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/branches{/branch}","tags_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/tags","blobs_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/statuses/{sha}","languages_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/languages","stargazers_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/stargazers","contributors_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/contributors","subscribers_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/subscribers","subscription_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/subscription","commits_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/contents/{+path}","compare_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/merges","archive_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/downloads","issues_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/issues{/number}","pulls_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/pulls{/number}","milestones_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/milestones{/number}","notifications_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/labels{/name}","releases_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/releases{/id}","deployments_url":"https://api.github.com/repos/andyroo2000/php-sniffs-1/deployments","created_at":"2016-06-08T16:16:35Z","updated_at":"2016-06-08T16:16:36Z","pushed_at":"2016-06-08T20:38:03Z","git_url":"git://github.com/andyroo2000/php-sniffs-1.git","ssh_url":"git@github.com:andyroo2000/php-sniffs-1.git","clone_url":"https://github.com/andyroo2000/php-sniffs-1.git","svn_url":"https://github.com/andyroo2000/php-sniffs-1","homepage":"","size":251,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"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":"behance:master","ref":"master","sha":"79dbbf0a1fb5af7912aead16ec72fc2799bb90d1","user":{"login":"behance","id":1197743,"avatar_url":"https://avatars.githubusercontent.com/u/1197743?v=3","gravatar_id":"","url":"https://api.github.com/users/behance","html_url":"https://github.com/behance","followers_url":"https://api.github.com/users/behance/followers","following_url":"https://api.github.com/users/behance/following{/other_user}","gists_url":"https://api.github.com/users/behance/gists{/gist_id}","starred_url":"https://api.github.com/users/behance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/behance/subscriptions","organizations_url":"https://api.github.com/users/behance/orgs","repos_url":"https://api.github.com/users/behance/repos","events_url":"https://api.github.com/users/behance/events{/privacy}","received_events_url":"https://api.github.com/users/behance/received_events","type":"Organization","site_admin":false},"repo":{"id":14874222,"name":"php-sniffs","full_name":"behance/php-sniffs","owner":{"login":"behance","id":1197743,"avatar_url":"https://avatars.githubusercontent.com/u/1197743?v=3","gravatar_id":"","url":"https://api.github.com/users/behance","html_url":"https://github.com/behance","followers_url":"https://api.github.com/users/behance/followers","following_url":"https://api.github.com/users/behance/following{/other_user}","gists_url":"https://api.github.com/users/behance/gists{/gist_id}","starred_url":"https://api.github.com/users/behance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/behance/subscriptions","organizations_url":"https://api.github.com/users/behance/orgs","repos_url":"https://api.github.com/users/behance/repos","events_url":"https://api.github.com/users/behance/events{/privacy}","received_events_url":"https://api.github.com/users/behance/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/behance/php-sniffs","description":"Behance PHPCS Sniffs","fork":false,"url":"https://api.github.com/repos/behance/php-sniffs","forks_url":"https://api.github.com/repos/behance/php-sniffs/forks","keys_url":"https://api.github.com/repos/behance/php-sniffs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/behance/php-sniffs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/behance/php-sniffs/teams","hooks_url":"https://api.github.com/repos/behance/php-sniffs/hooks","issue_events_url":"https://api.github.com/repos/behance/php-sniffs/issues/events{/number}","events_url":"https://api.github.com/repos/behance/php-sniffs/events","assignees_url":"https://api.github.com/repos/behance/php-sniffs/assignees{/user}","branches_url":"https://api.github.com/repos/behance/php-sniffs/branches{/branch}","tags_url":"https://api.github.com/repos/behance/php-sniffs/tags","blobs_url":"https://api.github.com/repos/behance/php-sniffs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/behance/php-sniffs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/behance/php-sniffs/git/refs{/sha}","trees_url":"https://api.github.com/repos/behance/php-sniffs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/behance/php-sniffs/statuses/{sha}","languages_url":"https://api.github.com/repos/behance/php-sniffs/languages","stargazers_url":"https://api.github.com/repos/behance/php-sniffs/stargazers","contributors_url":"https://api.github.com/repos/behance/php-sniffs/contributors","subscribers_url":"https://api.github.com/repos/behance/php-sniffs/subscribers","subscription_url":"https://api.github.com/repos/behance/php-sniffs/subscription","commits_url":"https://api.github.com/repos/behance/php-sniffs/commits{/sha}","git_commits_url":"https://api.github.com/repos/behance/php-sniffs/git/commits{/sha}","comments_url":"https://api.github.com/repos/behance/php-sniffs/comments{/number}","issue_comment_url":"https://api.github.com/repos/behance/php-sniffs/issues/comments{/number}","contents_url":"https://api.github.com/repos/behance/php-sniffs/contents/{+path}","compare_url":"https://api.github.com/repos/behance/php-sniffs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/behance/php-sniffs/merges","archive_url":"https://api.github.com/repos/behance/php-sniffs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/behance/php-sniffs/downloads","issues_url":"https://api.github.com/repos/behance/php-sniffs/issues{/number}","pulls_url":"https://api.github.com/repos/behance/php-sniffs/pulls{/number}","milestones_url":"https://api.github.com/repos/behance/php-sniffs/milestones{/number}","notifications_url":"https://api.github.com/repos/behance/php-sniffs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/behance/php-sniffs/labels{/name}","releases_url":"https://api.github.com/repos/behance/php-sniffs/releases{/id}","deployments_url":"https://api.github.com/repos/behance/php-sniffs/deployments","created_at":"2013-12-02T20:46:00Z","updated_at":"2016-06-13T17:53:10Z","pushed_at":"2016-06-13T20:23:51Z","git_url":"git://github.com/behance/php-sniffs.git","ssh_url":"git@github.com:behance/php-sniffs.git","clone_url":"https://github.com/behance/php-sniffs.git","svn_url":"https://github.com/behance/php-sniffs","homepage":"","size":257,"stargazers_count":5,"watchers_count":5,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":14,"forks":2,"open_issues":14,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/behance/php-sniffs/pulls/177"},"html":{"href":"https://github.com/behance/php-sniffs/pull/177"},"issue":{"href":"https://api.github.com/repos/behance/php-sniffs/issues/177"},"comments":{"href":"https://api.github.com/repos/behance/php-sniffs/issues/177/comments"},"review_comments":{"href":"https://api.github.com/repos/behance/php-sniffs/pulls/177/comments"},"review_comment":{"href":"https://api.github.com/repos/behance/php-sniffs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/behance/php-sniffs/pulls/177/commits"},"statuses":{"href":"https://api.github.com/repos/behance/php-sniffs/statuses/711d9bf24d8492a8a7a1e1324cd5208a6a819c48"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"andyroo2000","id":13655,"avatar_url":"https://avatars.githubusercontent.com/u/13655?v=3","gravatar_id":"","url":"https://api.github.com/users/andyroo2000","html_url":"https://github.com/andyroo2000","followers_url":"https://api.github.com/users/andyroo2000/followers","following_url":"https://api.github.com/users/andyroo2000/following{/other_user}","gists_url":"https://api.github.com/users/andyroo2000/gists{/gist_id}","starred_url":"https://api.github.com/users/andyroo2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyroo2000/subscriptions","organizations_url":"https://api.github.com/users/andyroo2000/orgs","repos_url":"https://api.github.com/users/andyroo2000/repos","events_url":"https://api.github.com/users/andyroo2000/events{/privacy}","received_events_url":"https://api.github.com/users/andyroo2000/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"commits":1,"additions":158,"deletions":152,"changed_files":4}}
{"actor":{"display_login":"andyroo2000"}}