djoos / Symfony-coding-standard

Development repository for the Symfony coding standard
MIT License
402 stars 102 forks source link

Support anonymous classes (#153), closes GH-153 #167

Closed Khartir closed 5 years ago

Khartir commented 5 years ago

Adds support for anonymous classes. There is currently a proplem with PHP < 7: Since anonymous classes where added in PHP 7, running these Sniffs now generates a Notice due to the missing constant T_ANON_CLASS.

I'm unsure how to handle this: Ignore it, check for PHP-Versions < 7 or require PHP > 7.

mmoll commented 5 years ago

Regarding the PHP < 7 topic, I think it's safe to ignore as it's not PHPCS' job to test for such things. @djoos What do you think?

djoos commented 5 years ago

Thank you for your contribution @Khartir and for the review @mmoll!