identifier icon indicating copy to clipboard operation
identifier copied to clipboard

toInteger return type string

Open root-aza opened this issue 6 months ago • 0 comments

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

root-aza avatar Jul 16 '25 14:07 root-aza