refactor(*): rename internal function `int` to `toInt`

Renamed the internal function `int` to `toInt` as `int` is a reserved word

Closes #7768