{"action":"created","issue":{"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/2226","repository_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer","labels_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/2226/labels{/name}","comments_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/2226/comments","events_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/2226/events","html_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/2226","id":183810748,"number":2226,"title":"Return type declaration gets \"invalid file syntax\"","user":{"login":"rhagni","id":1967332,"avatar_url":"https://avatars.githubusercontent.com/u/1967332?v=3","gravatar_id":"","url":"https://api.github.com/users/rhagni","html_url":"https://github.com/rhagni","followers_url":"https://api.github.com/users/rhagni/followers","following_url":"https://api.github.com/users/rhagni/following{/other_user}","gists_url":"https://api.github.com/users/rhagni/gists{/gist_id}","starred_url":"https://api.github.com/users/rhagni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhagni/subscriptions","organizations_url":"https://api.github.com/users/rhagni/orgs","repos_url":"https://api.github.com/users/rhagni/repos","events_url":"https://api.github.com/users/rhagni/events{/privacy}","received_events_url":"https://api.github.com/users/rhagni/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-18T21:41:39Z","updated_at":"2016-10-18T22:32:12Z","closed_at":null,"body":"Hello!\r\n\r\nI'm having a trouble because I'm using [return type declaration](http://php.net/manual/en/functions.returning-values.php#functions.returning-values.type-declaration) and this give me \"invalid file syntax\" when I check my files.\r\n\r\ne.g.:  \r\n\r\n```\r\nC:\\> php7 C:\\lib\\php-cs-fixer.phar fix --level=psr2 --verbose A.php\r\nI\r\nLegend: ?-unknown, I-invalid file syntax, file ignored, .-no changes, F-fixed, E-error\r\nFixed all files in 2.418 seconds, 6.000 MB memory used\r\n```\r\n\r\nA.php:\r\n```php\r\n<?php\r\n\r\nclass A\r\n{\r\n    protected $value;\r\n    \r\n    public function get(): integer\r\n    {\r\n        return $this->value;\r\n    }\r\n}\r\n```\r\n\r\nNative PHP 7 syntax checker don't gimme problem:\r\n```\r\nC:\\> php7 -l A.php\r\nNo syntax errors detected in A.php\r\n```\r\n\r\n(Sorry for my bad english)"},"comment":{"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/comments/254658755","html_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/2226#issuecomment-254658755","issue_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/2226","id":254658755,"user":{"login":"rhagni","id":1967332,"avatar_url":"https://avatars.githubusercontent.com/u/1967332?v=3","gravatar_id":"","url":"https://api.github.com/users/rhagni","html_url":"https://github.com/rhagni","followers_url":"https://api.github.com/users/rhagni/followers","following_url":"https://api.github.com/users/rhagni/following{/other_user}","gists_url":"https://api.github.com/users/rhagni/gists{/gist_id}","starred_url":"https://api.github.com/users/rhagni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhagni/subscriptions","organizations_url":"https://api.github.com/users/rhagni/orgs","repos_url":"https://api.github.com/users/rhagni/repos","events_url":"https://api.github.com/users/rhagni/events{/privacy}","received_events_url":"https://api.github.com/users/rhagni/received_events","type":"User","site_admin":false},"created_at":"2016-10-18T22:32:12Z","updated_at":"2016-10-18T22:32:12Z","body":"Additional info:\r\n\r\n```\r\nC:\\> php7 --version\r\nPHP 7.0.10 (cli) (built: Aug 18 2016 09:48:53) ( ZTS )\r\nCopyright (c) 1997-2016 The PHP Group\r\nZend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies\r\n```\r\n\r\n```\r\nC:\\> php7 C:\\lib\\php-cs-fixer.phar --version\r\nPHP CS Fixer version 1.12.2 by Fabien Potencier and Dariusz Ruminski (baa7112)\r\n```"}}
{"actor":{"display_login":"rhagni"}}