smartemailing / types

Missing data types for PHP. Highly extendable.
Other
89 stars 11 forks source link

Int from float #126

Closed asgraf closed 1 year ago

asgraf commented 1 year ago

I think that float values that can be converted to int without any rounding should not throw exceptions

IntType::from(1.0000000000);//currently throws exception, expected return value of (int) 1
IntType::from('5.00');//currently throws exception, expected return value of (int) 5
mstrouhal commented 1 year ago

Good idea. Feel free to send PR :)Or, in case it can wait, I will implement this in several days.

mstrouhal commented 1 year ago

https://github.com/smartemailing/types/pull/127