Skip to content

Duplicate Method Names #19

Open
Open
@GenieTim

Description

@GenieTim

Thank you very much for this awesome tool. I encountered an (admittedly, rather odd) edge-case for which I would open a PR if you consider it worth it (and tell me what your desired resolution is).

The problem is the following:

Duplicate methods are generated for an API with two fields in two different "cases".

Example: an API that has a field timeZone and a field time_zone (of which one might be deprecated) (this applies e.g. to Pipefy: https://api-docs.pipefy.com/reference/objects/User/) will result in two times the function

public function selectTimeZone()

, one time selecting timeZone and one time time_zone.

PHP does not like that of course.
I can imagine various resultions: If there are multiple,

  1. just discard the deprecated one,
  2. use the case as used in the API (i.e. resulting in one selectTimeZone() and one selectTime_zone(),
  3. select both at once

Shall I open a PR with which of these possibilities? (Any hints on where to look for the deciding code?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions