[ 
https://issues.apache.org/jira/browse/THRIFT-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16329857#comment-16329857
 ] 

ASF GitHub Bot commented on THRIFT-4463:
----------------------------------------

GitHub user RobberPhex opened a pull request:

    https://github.com/apache/thrift/pull/1473

    generate PHP code match psr2

    ref: https://issues.apache.org/jira/browse/THRIFT-4463

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/RobberPhex/thrift gen-psr2

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/1473.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1473
    
----
commit 6db7f11ee0c55f3aeb770926dbc988bc926f9cf6
Author: Robert Lu <robberphex@...>
Date:   2018-01-17T12:35:35Z

    PHP ident with 4 space

commit f3fda49e45790f5cfb2173aafb9bec9abbdb7275
Author: Robert Lu <robberphex@...>
Date:   2018-01-17T12:51:56Z

    fix Processor to psr4

commit 3784a5ee0279bd5b21c4bd9b7f58597dcd06905b
Author: Robert Lu <robberphex@...>
Date:   2018-01-17T13:15:21Z

    fix client to psr4

commit a32fe66406bcfcfe81dba2eba69e4f737554a16a
Author: Robert Lu <robberphex@...>
Date:   2018-01-17T14:27:32Z

    match psr2

commit 3b518eb85126a9ff75ad1e42735be0cf5d7ad0d8
Author: Robert Lu <robberphex@...>
Date:   2018-01-18T01:25:50Z

    fix classmap mode

----


> PHP generated code match PSR-2
> ------------------------------
>
>                 Key: THRIFT-4463
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4463
>             Project: Thrift
>          Issue Type: Improvement
>          Components: PHP - Compiler
>    Affects Versions: 0.11.0
>            Reporter: Robert Lu
>            Assignee: Robert Lu
>            Priority: Minor
>
> When use thrift compiler to generate PHP code, there are many issues doesn't 
> match [PSR-2|http://www.php-fig.org/psr/psr-2/]
>  * indent by 2 spaces, PSR-2 require 4 spaces.
>  * Opening brace should be on a new line (for function)
>  * The static declaration must come after the visibility declaration
>  * etc.
>  
> So, we can make generated code more readable, match PSR-2(almost).
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to