identifier
identifier copied to clipboard
toInteger return type string
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