Plugin-php: Comments on extends statement

Created on 7 Apr 2018  路  3Comments  路  Source: prettier/plugin-php

Hi,

A problem with comments over extends node :

<?php
    // 424 : Method failure
    class ResponseMethodFailure 
        // Fails to serve
        extends ResponseNotAcceptable
    {

    }

Becomes :

<?php
    // 424 : Method failure
    class ResponseMethodFailure extends ResponseNotAcceptable
    {
        // Fails to serve
    }
bug good first issue

All 3 comments

@ichiriac you can don't post ast :+1:

Here the same with implements statement :

    // 424 : Method failure
    class ResponseMethodFailure 
      // behaves as an error
      extends ResponseNotAcceptable
      implements 
        // Some comment
        FooBar,
        // Another comment
        BarBaz
    {

    }

Becomes :

     // 424 : Method failure
    class ResponseMethodFailure extends ResponseNotAcceptable
        implements FooBar, BarBaz
    {
        // behaves as an error
    // Some comment
    // Another comment
    }

/cc @mgrip this issue i can't solve, maybe you can try also?

Was this page helpful?
0 / 5 - 0 ratings