public function truncateToMaxBorder($value)
    {
        if ($this->allowsTruncate($value)) {
            if ($value instanceof Secret) {
                return $value->substring(0, $this->maxLength);
            }

            return substr($value, 0, $this->maxLength);
        }

        throw new \LogicException('Truncate value to max length not allowed');
    }