<commit_before>{% set details = details|default(false) %}
{% if cls == 'App\\Entity\\User' %}
    {% set entity = em.find(cls, id) %}
    {% if entity %}
        <a href="{{ url('admin_user_get', {user: entity.guid}) }}" title="{{ entity.displayName }}">{{ icon('user fa-fw') }} {{ entity.username }}</a>
    {% else %}
        <span class="text-muted">{{ icon('user fa-fw') }}</span>
    {% endif %}
{% elseif cls == 'App\\Entity\\Group' %}
    {% set entity = em.find(cls, id) %}
    {% if entity %}
        <a href="{{ url('admin_group_get', {group: entity.name}) }}" title="{{ entity.displayName }}">{{ icon('group fa-fw') }} {{ entity.name }}</a>
    {% else %}
        <span class="text-muted">{{ icon('group fa-fw') }}</span>
    {% endif %}
{% elseif cls == 'App\\Entity\\EmailAddress' %}
    {% set entity = em.find(cls, id) %}
    {% if entity %}
        {{ icon('envelope fa-fw') }}
        {% if details %}
            {{ entity.email }}<br>
        {% endif %}
        <a href="{{ url('admin_user_get', {user: entity.user.guid}) }}" title="{{ entity.user.displayName }}">{{ icon('user fa-fw') }} {{ entity.user.username }}</a>
    {% else %}
        <span class="text-muted">{{ icon('envelope fa-fw') }}</span>
    {% endif %}
{% elseif cls == 'App\\Entity\\OAuth\\Client' %}
    {% if details %}
        {% set entity = em.find(cls, id) %}
        {% if entity %}
            <a href="{{ url('admin_oauth_client_get', {client: entity.id}) }}">{{ icon('cube fa-fw') }} {{ entity.name }}</a>
        {% else %}
            <span class="text-muted">{{ icon('cube fa-fw') }}</span>
        {% endif %}
    {% else %}
        <a href="{{ url('admin_oauth_client_get', {client: id}) }}">{{ icon('cube fa-fw') }}</a>
    {% endif %}
{% elseif cls == 'Admin\\Entity\\ApiKey' %}
    {% if details %}
        {% set entity = em.find(cls, id) %}
        {% if entity %}
            <a href="{{ url('admin_apikey_get', {apikey: entity.id}) }}">{{ icon('key fa-fw') }} {{ entity.name }}</a>
        {% else %}
            <span class="text-muted">{{ icon('key fa-fw') }}</span>
        {% endif %}
    {% else %}
        <a href="{{ url('admin_apikey_get', {apikey: id}) }}">{{ icon('key fa-fw') }}</a>
    {% endif %}
{% endif %}<commit_msg>Prevent breaking audit log when an ID is missing<commit_after>{% set details = details|default(false) %}
{% if cls == 'App\\Entity\\User' and id %}
    {% set entity = em.find(cls, id) %}
    {% if entity %}
        <a href="{{ url('admin_user_get', {user: entity.guid}) }}" title="{{ entity.displayName }}">{{ icon('user fa-fw') }} {{ entity.username }}</a>
    {% else %}
        <span class="text-muted">{{ icon('user fa-fw') }}</span>
    {% endif %}
{% elseif cls == 'App\\Entity\\Group' and id %}
    {% set entity = em.find(cls, id) %}
    {% if entity %}
        <a href="{{ url('admin_group_get', {group: entity.name}) }}" title="{{ entity.displayName }}">{{ icon('group fa-fw') }} {{ entity.name }}</a>
    {% else %}
        <span class="text-muted">{{ icon('group fa-fw') }}</span>
    {% endif %}
{% elseif cls == 'App\\Entity\\EmailAddress' and id %}
    {% set entity = em.find(cls, id) %}
    {% if entity %}
        {{ icon('envelope fa-fw') }}
        {% if details %}
            {{ entity.email }}<br>
        {% endif %}
        <a href="{{ url('admin_user_get', {user: entity.user.guid}) }}" title="{{ entity.user.displayName }}">{{ icon('user fa-fw') }} {{ entity.user.username }}</a>
    {% else %}
        <span class="text-muted">{{ icon('envelope fa-fw') }}</span>
    {% endif %}
{% elseif cls == 'App\\Entity\\OAuth\\Client' and id %}
    {% if details %}
        {% set entity = em.find(cls, id) %}
        {% if entity %}
            <a href="{{ url('admin_oauth_client_get', {client: entity.id}) }}">{{ icon('cube fa-fw') }} {{ entity.name }}</a>
        {% else %}
            <span class="text-muted">{{ icon('cube fa-fw') }}</span>
        {% endif %}
    {% else %}
        <a href="{{ url('admin_oauth_client_get', {client: id}) }}">{{ icon('cube fa-fw') }}</a>
    {% endif %}
{% elseif cls == 'Admin\\Entity\\ApiKey' and id %}
    {% if details %}
        {% set entity = em.find(cls, id) %}
        {% if entity %}
            <a href="{{ url('admin_apikey_get', {apikey: entity.id}) }}">{{ icon('key fa-fw') }} {{ entity.name }}</a>
        {% else %}
            <span class="text-muted">{{ icon('key fa-fw') }}</span>
        {% endif %}
    {% else %}
        <a href="{{ url('admin_apikey_get', {apikey: id}) }}">{{ icon('key fa-fw') }}</a>
    {% endif %}
{% endif %}
{'fraction_non_alphanumeric': 0.2546093064091308, 'fraction_numerical': 0.0, 'mean_word_length': 2.579732914375491, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2271772', 'n_tokens_mistral': 1652, 'n_tokens_neox': 1513, 'n_words': 352}