djoos / Symfony-coding-standard

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

Fixed ReturnTypeSniff when `return_type_token` does not exist #168

Closed aurelijusrozenas closed 5 years ago

aurelijusrozenas commented 5 years ago

Fixed ReturnTypeSniff when return_type_token does not exist in $methodProperties.

I don't know how is this broken on my machine and this PR is the only way I could make it work. https://i.imgur.com/cNGHc9b.png

mmoll commented 5 years ago

@aurelijusrozenas could you add a test for this in Symfony/Tests/Functions/ReturnTypeUnitTest.*?

aurelijusrozenas commented 5 years ago

@mmoll well, turns out this was a problem because of the phpcs < 3.3.0 (mystery solved!) so I guess I'm closing this.