$binaryFormat = $constraint->binaryFormat;
} else {
$limitInBytes = $iniLimitSize;
- $binaryFormat = true;
+ $binaryFormat = null === $constraint->binaryFormat ? true : $constraint->binaryFormat;
}
list($sizeAsString, $limitAsString, $suffix) = $this->factorizeSizes(0, $limitInBytes, $binaryFormat);
}
}
- if (!is_scalar($value) && !$value instanceof FileObject && !(is_object($value) && method_exists($value, '__toString'))) {
+ if (!is_scalar($value) && !$value instanceof FileObject && !(\is_object($value) && method_exists($value, '__toString'))) {
throw new UnexpectedTypeException($value, 'string');
}
private static function moreDecimalsThan($double, $numberOfDecimals)
{
- return strlen((string) $double) > strlen(round($double, $numberOfDecimals));
+ return \strlen((string) $double) > \strlen(round($double, $numberOfDecimals));
}
/**