Skip to content

[PHP] RFC on emitted code quality  #3867

@dkarlovi

Description

@dkarlovi
Description

The code emitted by PHP generator is solid, but could be made better. If I open the project with PHPStorm and crank up all the inspections (including the excellent EA extended), I get quite a few violations, including those regarding code style, code smell, performance, type compatibility, etc.

As the code is generated, most of these (almost all of them) could be fixed with rather simple tweaks (some would require a more significant change which might break BC, not sure), we could tweak the templates, much like #3863.

This would make the emitted code read almost as hand-written.

Swagger-codegen version

Latest.

Related issues

#3863 is the first step in this direction. Probably also #1482.

Suggest a Fix

PR fixing this, making emitted code of higher quality and a first step toward maybe replacing the HTTP client.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions