If you pass $size as null then it's take default value.
Check following code sample
case self::TYPE_NUMERIC:
$match = [];
$scale = 0;
$precision = 10;
// parse size value
if (is_array($size)) {
if (count($size) == 2) {
$size = array_values($size);
$precision = $size[0];
$scale = $size[1];
}
} elseif (preg_match('#^(\d+),(\d+)$#', $size, $match)) {
$precision = $match[1];
$scale = $match[2];
}
// check options
if (isset($options['precision'])) {
$precision = $options['precision'];
}
if (isset($options['scale'])) {
$scale = $options['scale'];
}
if (!empty($options['unsigned'])) {
$unsigned = true;
}
break;
case self::TYPE_DATE:
case self::TYPE_DATETIME:
case self::TYPE_TIMESTAMP:
break;
case self::TYPE_TEXT:
case self::TYPE_BLOB:
case self::TYPE_VARBINARY:
$length = $size;
Here default value of $precision is 10.
Check following code
case self::TYPE_VARBINARY:
$length = $size;
If $size is null, $length is also null but check following code what happened
Click here
[Updated]
Check following code
case Table::TYPE_TEXT:
case Table::TYPE_BLOB:
case Table::TYPE_VARBINARY:
That means type text, blob and varbinary takes default value if you pass size as a null. Default value is 1024