{% if admin.isGranted('EDIT', object) and admin.hasRoute('edit') %}
    {% set current_position = currentObjectPosition(object) %}
    {% set last_position    = lastPosition(object) %}

    <span class="btn btn-sm btn-default js-sortable-move" data-url="{{ admin.generateObjectUrl('move', object, {'position': 'NEW_POSITION'}) }}">
        <i class="fa fa-arrows"></i>
    </span>
{% endif %}

{% if admin.isGranted('EDIT', object) and admin.hasRoute('edit') %}
    <span class="btn btn-sm btn-default js-sortable-move" data-url="{{ admin.generateObjectUrl('move', object, {'position': 'NEW_POSITION'}) }}">
        <i class="fa fa-arrows"></i>
    </span>
{% endif %}

Remove variables because the aren’t needed.
Chore: Remove variables because the aren’t needed.
