{"action":"closed","issue":{"url":"https://api.github.com/repos/cakephp/cakephp-codesniffer/issues/118","labels_url":"https://api.github.com/repos/cakephp/cakephp-codesniffer/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp-codesniffer/issues/118/comments","events_url":"https://api.github.com/repos/cakephp/cakephp-codesniffer/issues/118/events","html_url":"https://github.com/cakephp/cakephp-codesniffer/issues/118","id":54782730,"number":118,"title":"Sniffer rules add PHP 5.6 requirement","user":{"login":"sdustinh","id":2855100,"avatar_url":"https://avatars.githubusercontent.com/u/2855100?v=3","gravatar_id":"","url":"https://api.github.com/users/sdustinh","html_url":"https://github.com/sdustinh","followers_url":"https://api.github.com/users/sdustinh/followers","following_url":"https://api.github.com/users/sdustinh/following{/other_user}","gists_url":"https://api.github.com/users/sdustinh/gists{/gist_id}","starred_url":"https://api.github.com/users/sdustinh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdustinh/subscriptions","organizations_url":"https://api.github.com/users/sdustinh/orgs","repos_url":"https://api.github.com/users/sdustinh/repos","events_url":"https://api.github.com/users/sdustinh/events{/privacy}","received_events_url":"https://api.github.com/users/sdustinh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cakephp/cakephp-codesniffer/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-19T16:16:13Z","updated_at":"2015-01-20T16:02:52Z","closed_at":"2015-01-20T16:02:52Z","body":"So this is kind of a weird one. I extended the FlashHelper to work with Bootstrap. When I did I went ahead and added some templates to help with generation. This is what I ended up with...\r\n\r\n```php\r\nprotected $_defaultConfig = [\r\n    'linkClass' => 'alert-link',\r\n    'templates' => [\r\n        'dismiss' => '<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"{{label}}\"{{attrs}}>{{content}}</button>',\r\n        'dismissIcon' => '<span aria-hidden=\"true\">&times;</span>'\r\n    ]\r\n];\r\n```\r\n\r\nThis causes a phpcs error as the `dismiss` key has 134 characters on a single line. So I converted it to this...\r\n\r\n```php\r\nprotected $_defaultConfig = [\r\n    'linkClass' => 'alert-link',\r\n    'templates' => [\r\n        'dismiss' => \r\n            '<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"{{label}}\"{{attrs}}>' .\r\n                '{{content}}' .\r\n            '</button>',\r\n        'dismissIcon' => '<span aria-hidden=\"true\">&times;</span>'\r\n    ]\r\n];\r\n```\r\n\r\nThis passes the sniffer rules so I pushed to the repo all well and good. I went to make some changes on my computer at home and I ended up with a fatal PHP error saying it expected a `]` character. When I collapse everything back onto a single line the error goes away.\r\n\r\nI'm not sure this is anything you guys would be responsible for in terms of updating your sniffer rules but it seems like such an obscure error that I just wanted to report it so you were aware.\r\n\r\nI also seem to get conflicts when running an underscored method name such as...\r\n\r\n```php\r\nprotected function _getSomething()\r\n{\r\n}\r\n```\r\n\r\nWith the underscore I get a PSR2 error. Without the underscore I get a CakePHP error. Weird. Here is the version I'm running at home. I'm not in the office so I don't have the exact output for that one but it's a fresh install of php 5.6.4.\r\n\r\n```\r\ndustin@Dustin:~/GitHub/internal$ php --version\r\nPHP 5.5.20-1+deb.sury.org~precise+1 (cli) (built: Dec 21 2014 19:54:33) \r\nCopyright (c) 1997-2014 The PHP Group\r\nZend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies\r\n    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies\r\n    with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans\r\n```"}}