Skip to content

toInteger return type string #108

@root-aza

Description

@root-aza

Hi! I would like to discuss this interface: https://github.com/php-identifier/identifier/blob/main/src/IntegerIdentifier.php#L20C21-L20C30

In my opinion, the toInteger method should always return a string.

The main problems with the union type are:

  • need for additional type checking
  • complicating static analysis
  • side effects when used

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions