{"action":"created","issue":{"url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/962","repository_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer","labels_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/962/labels{/name}","comments_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/962/comments","events_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/962/events","html_url":"https://github.com/squizlabs/PHP_CodeSniffer/issues/962","id":149793669,"number":962,"title":"Null coalescing operator (??) not detected as a token","user":{"login":"joelposti","id":2562206,"avatar_url":"https://avatars.githubusercontent.com/u/2562206?v=3","gravatar_id":"","url":"https://api.github.com/users/joelposti","html_url":"https://github.com/joelposti","followers_url":"https://api.github.com/users/joelposti/followers","following_url":"https://api.github.com/users/joelposti/following{/other_user}","gists_url":"https://api.github.com/users/joelposti/gists{/gist_id}","starred_url":"https://api.github.com/users/joelposti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelposti/subscriptions","organizations_url":"https://api.github.com/users/joelposti/orgs","repos_url":"https://api.github.com/users/joelposti/repos","events_url":"https://api.github.com/users/joelposti/events{/privacy}","received_events_url":"https://api.github.com/users/joelposti/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-20T14:58:07Z","updated_at":"2016-04-20T15:41:01Z","closed_at":null,"body":"I’m extending Squiz.WhiteSpace.OperatorSpacing to check for whitespace around elvis operator (?:) and null coalescing operator (??). I already managed to get the sniff to work correctly with elvis operator. The sniff is registered to listen to tokens `T_INLINE_THEN` and `T_INLINE_ELSE` which match the elvis operator correctly. I would have guessed that null coalescing operator would be equal to two `T_INLINE_THEN` tokens, but instead the operator is not detected at all. I could not find a token for the operator in `CodeSniffer/Tokens.php`."},"comment":{"url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/comments/212482355","html_url":"https://github.com/squizlabs/PHP_CodeSniffer/issues/962#issuecomment-212482355","issue_url":"https://api.github.com/repos/squizlabs/PHP_CodeSniffer/issues/962","id":212482355,"user":{"login":"aik099","id":1277526,"avatar_url":"https://avatars.githubusercontent.com/u/1277526?v=3","gravatar_id":"","url":"https://api.github.com/users/aik099","html_url":"https://github.com/aik099","followers_url":"https://api.github.com/users/aik099/followers","following_url":"https://api.github.com/users/aik099/following{/other_user}","gists_url":"https://api.github.com/users/aik099/gists{/gist_id}","starred_url":"https://api.github.com/users/aik099/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aik099/subscriptions","organizations_url":"https://api.github.com/users/aik099/orgs","repos_url":"https://api.github.com/users/aik099/repos","events_url":"https://api.github.com/users/aik099/events{/privacy}","received_events_url":"https://api.github.com/users/aik099/received_events","type":"User","site_admin":false},"created_at":"2016-04-20T15:41:01Z","updated_at":"2016-04-20T15:41:01Z","body":"I think token isn't supported currently and isn't considered as operator token. I've sent #844 PR before to add support for spaceship operator. You can send new PR for `??` operator using my PR as base."}}