// Work with strings only, because long numbers are represented as floats
// internally and don't work with strlen()
- if (!is_string($value) && !(is_object($value) && method_exists($value, '__toString'))) {
+ if (!\is_string($value) && !(\is_object($value) && method_exists($value, '__toString'))) {
throw new UnexpectedTypeException($value, 'string');
}
}
$checkSum = 0;
- $length = strlen($value);
+ $length = \strlen($value);
// Starting with the last digit and walking left, add every second
// digit to the check sum