{"action":"created","issue":{"url":"https://api.github.com/repos/doctrine/coding-standard/issues/58","repository_url":"https://api.github.com/repos/doctrine/coding-standard","labels_url":"https://api.github.com/repos/doctrine/coding-standard/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/doctrine/coding-standard/issues/58/comments","events_url":"https://api.github.com/repos/doctrine/coding-standard/issues/58/events","html_url":"https://github.com/doctrine/coding-standard/pull/58","id":321425952,"number":58,"title":"[WIP] Enable DisallowEmpty sniff","user":{"login":"Majkl578","id":144181,"avatar_url":"https://avatars2.githubusercontent.com/u/144181?v=4","gravatar_id":"","url":"https://api.github.com/users/Majkl578","html_url":"https://github.com/Majkl578","followers_url":"https://api.github.com/users/Majkl578/followers","following_url":"https://api.github.com/users/Majkl578/following{/other_user}","gists_url":"https://api.github.com/users/Majkl578/gists{/gist_id}","starred_url":"https://api.github.com/users/Majkl578/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Majkl578/subscriptions","organizations_url":"https://api.github.com/users/Majkl578/orgs","repos_url":"https://api.github.com/users/Majkl578/repos","events_url":"https://api.github.com/users/Majkl578/events{/privacy}","received_events_url":"https://api.github.com/users/Majkl578/received_events","type":"User","site_admin":false},"labels":[{"id":820561059,"url":"https://api.github.com/repos/doctrine/coding-standard/labels/New%20sniff","name":"New sniff","color":"63379e","default":false},{"id":798821108,"url":"https://api.github.com/repos/doctrine/coding-standard/labels/RFC","name":"RFC","color":"1241a8","default":false},{"id":684391013,"url":"https://api.github.com/repos/doctrine/coding-standard/labels/WIP","name":"WIP","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/doctrine/coding-standard/milestones/7","html_url":"https://github.com/doctrine/coding-standard/milestone/7","labels_url":"https://api.github.com/repos/doctrine/coding-standard/milestones/7/labels","id":3158752,"number":7,"title":"5.0.0","description":"","creator":{"login":"Ocramius","id":154256,"avatar_url":"https://avatars2.githubusercontent.com/u/154256?v=4","gravatar_id":"","url":"https://api.github.com/users/Ocramius","html_url":"https://github.com/Ocramius","followers_url":"https://api.github.com/users/Ocramius/followers","following_url":"https://api.github.com/users/Ocramius/following{/other_user}","gists_url":"https://api.github.com/users/Ocramius/gists{/gist_id}","starred_url":"https://api.github.com/users/Ocramius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ocramius/subscriptions","organizations_url":"https://api.github.com/users/Ocramius/orgs","repos_url":"https://api.github.com/users/Ocramius/repos","events_url":"https://api.github.com/users/Ocramius/events{/privacy}","received_events_url":"https://api.github.com/users/Ocramius/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":13,"state":"open","created_at":"2018-03-04T00:38:23Z","updated_at":"2018-05-09T04:49:05Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2018-05-09T04:23:42Z","updated_at":"2018-05-09T14:51:53Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/doctrine/coding-standard/pulls/58","html_url":"https://github.com/doctrine/coding-standard/pull/58","diff_url":"https://github.com/doctrine/coding-standard/pull/58.diff","patch_url":"https://github.com/doctrine/coding-standard/pull/58.patch"},"body":"Here's a proposal to ban `empty()` construct.\r\n\r\nIts weakly typed behavior is incompatible with strict code and _PHPStan strict rules_ (yet to come in 0.10).\r\n\r\nThe following is forbidden:\r\n```php\r\nempty($foo)\r\n```\r\nCorrect replacement is either using `isset()` (for possibly undefined value), null coalesce operator or strict comparison:\r\n```php\r\nisset($foo)\r\n$foo ?? 123\r\n$foo !== []1\r\n```\r\n\r\n_Waiting for Slevomat CS 4.6, should be released soon._\r\n\r\n![](https://user-images.githubusercontent.com/144181/39794708-03f9c8a6-534c-11e8-984d-4d66a40ab901.png)\r\n"},"comment":{"url":"https://api.github.com/repos/doctrine/coding-standard/issues/comments/387765813","html_url":"https://github.com/doctrine/coding-standard/pull/58#issuecomment-387765813","issue_url":"https://api.github.com/repos/doctrine/coding-standard/issues/58","id":387765813,"user":{"login":"carusogabriel","id":16328050,"avatar_url":"https://avatars3.githubusercontent.com/u/16328050?v=4","gravatar_id":"","url":"https://api.github.com/users/carusogabriel","html_url":"https://github.com/carusogabriel","followers_url":"https://api.github.com/users/carusogabriel/followers","following_url":"https://api.github.com/users/carusogabriel/following{/other_user}","gists_url":"https://api.github.com/users/carusogabriel/gists{/gist_id}","starred_url":"https://api.github.com/users/carusogabriel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carusogabriel/subscriptions","organizations_url":"https://api.github.com/users/carusogabriel/orgs","repos_url":"https://api.github.com/users/carusogabriel/repos","events_url":"https://api.github.com/users/carusogabriel/events{/privacy}","received_events_url":"https://api.github.com/users/carusogabriel/received_events","type":"User","site_admin":false},"created_at":"2018-05-09T14:51:53Z","updated_at":"2018-05-09T14:51:53Z","author_association":"MEMBER","body":"> I brought up the same points in #57 (comment). Maybe we should consolidate the discussion over phpstan vs. phpcs for these cases?\r\n\r\nFor sure. @Majkl578 what is your opinion?"}}
{"actor":{"display_login":"carusogabriel"}}