{"action":"created","issue":{"url":"https://api.github.com/repos/slevomat/coding-standard/issues/785","repository_url":"https://api.github.com/repos/slevomat/coding-standard","labels_url":"https://api.github.com/repos/slevomat/coding-standard/issues/785/labels{/name}","comments_url":"https://api.github.com/repos/slevomat/coding-standard/issues/785/comments","events_url":"https://api.github.com/repos/slevomat/coding-standard/issues/785/events","html_url":"https://github.com/slevomat/coding-standard/issues/785","id":532745870,"node_id":"MDU6SXNzdWU1MzI3NDU4NzA=","number":785,"title":"RequireExplicitAssertionSniff fails if variable has invalid ","user":{"login":"petrhejna","id":383295,"node_id":"MDQ6VXNlcjM4MzI5NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/383295?v=4","gravatar_id":"","url":"https://api.github.com/users/petrhejna","html_url":"https://github.com/petrhejna","followers_url":"https://api.github.com/users/petrhejna/followers","following_url":"https://api.github.com/users/petrhejna/following{/other_user}","gists_url":"https://api.github.com/users/petrhejna/gists{/gist_id}","starred_url":"https://api.github.com/users/petrhejna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petrhejna/subscriptions","organizations_url":"https://api.github.com/users/petrhejna/orgs","repos_url":"https://api.github.com/users/petrhejna/repos","events_url":"https://api.github.com/users/petrhejna/events{/privacy}","received_events_url":"https://api.github.com/users/petrhejna/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2019-12-04T15:08:19Z","updated_at":"2019-12-04T15:36:04Z","closed_at":"2019-12-04T15:36:03Z","author_association":"NONE","body":"Where: `master`\r\n\r\nThe problem is that in `RequireExplicitAssertionSniff:81` the code \r\n```php\r\n                        if ($variableAnnotation->getVariableName() === null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n```\r\n\r\nMay fail beause `getVariableName()` throws error if there is invalid `@var` annotation\r\n\r\n```\r\nPHP Fatal error:  Uncaught LogicException: Invalid @var annotation. in /xxx/vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/Annotation/VariableAnnotation.php:70\r\nStack trace:\r\n#0 /xxxx/vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/PHP/RequireExplicitAssertionSniff.php(81): SlevomatCodingStandard\\Helpers\\Annotation\\VariableAnnotation->getVariableName()\r\n#1 /xxxx/vendor/squizlabs/php_codesniffer/src/Files/File.php(496): SlevomatCodingStandard\\Sniffs\\PHP\\RequireExplicitAssertionSniff->process()\r\n#2 /xxxx/vendor/squizlabs/php_codesniffer/src/Files/LocalFile.php(91): PHP_CodeSniffer\\Files\\File->process()\r\n#3 /xxxx/vendor/squizlabs/php_codesniffer/src/Fixer.php(174): PHP_CodeSniffer\\Files\\LocalFile->process()\r\n#4 /xxxx/vendor/squizlabs/ in /xxxx/vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/Annotation/VariableAnnotation.php on line 70\r\n```"},"comment":{"url":"https://api.github.com/repos/slevomat/coding-standard/issues/comments/561699124","html_url":"https://github.com/slevomat/coding-standard/issues/785#issuecomment-561699124","issue_url":"https://api.github.com/repos/slevomat/coding-standard/issues/785","id":561699124,"node_id":"MDEyOklzc3VlQ29tbWVudDU2MTY5OTEyNA==","user":{"login":"kukulich","id":260445,"node_id":"MDQ6VXNlcjI2MDQ0NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/260445?v=4","gravatar_id":"","url":"https://api.github.com/users/kukulich","html_url":"https://github.com/kukulich","followers_url":"https://api.github.com/users/kukulich/followers","following_url":"https://api.github.com/users/kukulich/following{/other_user}","gists_url":"https://api.github.com/users/kukulich/gists{/gist_id}","starred_url":"https://api.github.com/users/kukulich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kukulich/subscriptions","organizations_url":"https://api.github.com/users/kukulich/orgs","repos_url":"https://api.github.com/users/kukulich/repos","events_url":"https://api.github.com/users/kukulich/events{/privacy}","received_events_url":"https://api.github.com/users/kukulich/received_events","type":"User","site_admin":false},"created_at":"2019-12-04T15:36:03Z","updated_at":"2019-12-04T15:36:03Z","author_association":"CONTRIBUTOR","body":"Thank you for your report.\r\n\r\nFixed in https://github.com/slevomat/coding-standard/commit/dc5a270645e7b48dd6e18005fad7c439161799bd"}}
{"actor":{"display_login":"kukulich"}}