diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 1f5e652e5..2cb383ec0 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -12,7 +12,7 @@ permissions: jobs: coding-standards: - name: "CS Fixer & PHPStan" + name: "CS Fixer, PHPStan & TwigCS" runs-on: "ubuntu-20.04" steps: @@ -46,3 +46,6 @@ jobs: - name: "Run PHPStan" run: "php bin/phpstan analyse --no-progress --error-format=checkstyle | cs2pr" + + - name: "Run TwigCS" + run: "php bin/twigcs --severity=error --display=blocking --reporter checkstyle app/ src/ | cs2pr" diff --git a/app/Resources/CraueConfigBundle/views/Settings/modify.html.twig b/app/Resources/CraueConfigBundle/views/Settings/modify.html.twig index db153270b..8265db2e2 100644 --- a/app/Resources/CraueConfigBundle/views/Settings/modify.html.twig +++ b/app/Resources/CraueConfigBundle/views/Settings/modify.html.twig @@ -12,17 +12,17 @@
- {% for section in sections | craue_sortSections %} + {% for section in sections|craue_sortSections %}
{% for setting in form.settings if setting.vars.value.section == section %} {{ form_row(setting.value, { - 'label': setting.vars.value.name | trans({}, 'CraueConfigBundle'), + 'label': setting.vars.value.name|trans({}, 'CraueConfigBundle'), }) }} {% endfor %}
@@ -30,7 +30,7 @@
{{ form_widget(form._token) }} diff --git a/app/Resources/FOSUserBundle/views/ChangePassword/changePassword_content.html.twig b/app/Resources/FOSUserBundle/views/ChangePassword/changePassword_content.html.twig index abb684213..f8527b382 100644 --- a/app/Resources/FOSUserBundle/views/ChangePassword/changePassword_content.html.twig +++ b/app/Resources/FOSUserBundle/views/ChangePassword/changePassword_content.html.twig @@ -1,6 +1,6 @@ {% trans_default_domain 'FOSUserBundle' %} -{{ form_start(form, { 'action': path('fos_user_change_password'), 'attr': { 'class': 'fos_user_change_password' } }) }} +{{ form_start(form, {'action': path('fos_user_change_password'), 'attr': {'class': 'fos_user_change_password'}}) }}
{{ form_widget(form) }} diff --git a/app/Resources/FOSUserBundle/views/Registration/confirmed.html.twig b/app/Resources/FOSUserBundle/views/Registration/confirmed.html.twig index cb8d40a44..8e5753eef 100644 --- a/app/Resources/FOSUserBundle/views/Registration/confirmed.html.twig +++ b/app/Resources/FOSUserBundle/views/Registration/confirmed.html.twig @@ -11,7 +11,7 @@ {% endif %}
- {{ 'security.register.go_to_account'|trans({},'messages') }} + {{ 'security.register.go_to_account'|trans({}, 'messages') }}
{% endblock fos_user_content %} diff --git a/app/Resources/FOSUserBundle/views/Registration/register_content.html.twig b/app/Resources/FOSUserBundle/views/Registration/register_content.html.twig index 85cd4f0d3..5637511d4 100644 --- a/app/Resources/FOSUserBundle/views/Registration/register_content.html.twig +++ b/app/Resources/FOSUserBundle/views/Registration/register_content.html.twig @@ -5,8 +5,8 @@
{{ form_widget(form._token) }} - {% for flashMessage in app.session.flashbag.get('notice') %} -

{{ flashMessage }}

+ {% for flash_message in app.session.flashbag.get('notice') %} +

{{ flash_message }}

{% endfor %}
diff --git a/app/Resources/FOSUserBundle/views/Resetting/request_content.html.twig b/app/Resources/FOSUserBundle/views/Resetting/request_content.html.twig index 010ee0d03..f33c25cdc 100644 --- a/app/Resources/FOSUserBundle/views/Resetting/request_content.html.twig +++ b/app/Resources/FOSUserBundle/views/Resetting/request_content.html.twig @@ -5,8 +5,8 @@

{{ 'security.resetting.description'|trans({}, "messages") }}

- {% for flashMessage in app.session.flashbag.get('notice') %} -

{{ flashMessage }}

+ {% for flash_message in app.session.flashbag.get('notice') %} +

{{ flash_message }}

{% endfor %} {% if invalid_username is defined %} diff --git a/app/Resources/FOSUserBundle/views/Resetting/reset_content.html.twig b/app/Resources/FOSUserBundle/views/Resetting/reset_content.html.twig index a19dc7d20..7926110f1 100644 --- a/app/Resources/FOSUserBundle/views/Resetting/reset_content.html.twig +++ b/app/Resources/FOSUserBundle/views/Resetting/reset_content.html.twig @@ -1,6 +1,6 @@ {% trans_default_domain 'FOSUserBundle' %} -{{ form_start(form, { 'action': path('fos_user_resetting_reset', {'token': token}), 'attr': { 'class': 'fos_user_resetting_reset' } }) }} +{{ form_start(form, {'action': path('fos_user_resetting_reset', {'token': token}), 'attr': {'class': 'fos_user_resetting_reset'}}) }}
{{ form_widget(form) }} diff --git a/app/Resources/FOSUserBundle/views/Security/login.html.twig b/app/Resources/FOSUserBundle/views/Security/login.html.twig index 3dd98fb64..d54dbdbd9 100644 --- a/app/Resources/FOSUserBundle/views/Security/login.html.twig +++ b/app/Resources/FOSUserBundle/views/Security/login.html.twig @@ -8,8 +8,8 @@ {% endif %} - {% for flashMessage in app.session.flashbag.get('notice') %} - + {% for flash_message in app.session.flashbag.get('notice') %} + {% endfor %}
diff --git a/composer.json b/composer.json index b49b21efa..445627b86 100644 --- a/composer.json +++ b/composer.json @@ -123,6 +123,7 @@ "dama/doctrine-test-bundle": "^6.0", "doctrine/doctrine-fixtures-bundle": "~3.0", "friendsofphp/php-cs-fixer": "~2.13", + "friendsoftwig/twigcs": "^4.1", "m6web/redis-mock": "^5.0", "php-http/mock-client": "^1.0", "phpstan/extension-installer": "^1.0", diff --git a/composer.lock b/composer.lock index ad7d7e74c..7cea3c13b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "048e7bf2bc2fd50d898371035c5055a2", + "content-hash": "90217dc4c89a9ab455cfa9faf9d597c9", "packages": [ { "name": "babdev/pagerfanta-bundle", @@ -12179,6 +12179,55 @@ ], "time": "2021-11-15T17:17:55+00:00" }, + { + "name": "friendsoftwig/twigcs", + "version": "v4.1.0", + "source": { + "type": "git", + "url": "https://github.com/friendsoftwig/twigcs.git", + "reference": "ad7e235fe3cc7842b5919f109afaacc56bb3ff49" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/friendsoftwig/twigcs/zipball/ad7e235fe3cc7842b5919f109afaacc56bb3ff49", + "reference": "ad7e235fe3cc7842b5919f109afaacc56bb3ff49", + "shasum": "" + }, + "require": { + "php": "^7.0", + "symfony/console": "^3.4 || ^4.3 || ^5.0", + "symfony/filesystem": "^3.4 || ^4.3 || ^5.0", + "symfony/finder": "^3.4 || ^4.3 || ^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.5 || ^7.2" + }, + "bin": [ + "bin/twigcs" + ], + "type": "library", + "autoload": { + "psr-4": { + "FriendsOfTwig\\Twigcs\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tristan Maindron", + "email": "tmaindron@gmail.com" + } + ], + "description": "Checkstyle automation for Twig", + "support": { + "issues": "https://github.com/friendsoftwig/twigcs/issues", + "source": "https://github.com/friendsoftwig/twigcs/tree/v4.1.0" + }, + "time": "2021-02-04T13:07:32+00:00" + }, { "name": "m6web/redis-mock", "version": "v5.3.0", diff --git a/src/Wallabag/CoreBundle/Resources/views/base.html.twig b/src/Wallabag/CoreBundle/Resources/views/base.html.twig index 9d3352d98..00e66482f 100644 --- a/src/Wallabag/CoreBundle/Resources/views/base.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/base.html.twig @@ -49,7 +49,7 @@ {% endif %} {% block scripts %} - + {% endblock %} {% block title %}{% endblock %} – wallabag diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig index 3ce48dfa3..9faf84002 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig @@ -82,9 +82,9 @@

{{ 'config.form_settings.android_configuration'|trans }}

- {{ 'config.form_settings.android_instruction' | trans }} + {{ 'config.form_settings.android_instruction'|trans }}
- {{ 'config.otp.app.qrcode_label' | trans }} + {{ 'config.otp.app.qrcode_label'|trans }} @@ -479,22 +479,22 @@

{{ 'config.reset.description'|trans }}

  • - + {{ 'config.reset.annotations'|trans }}
  • - + {{ 'config.reset.tags'|trans }}
  • - + {{ 'config.reset.archived'|trans }}
  • - + {{ 'config.reset.entries'|trans }}
  • diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/otp_app.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/otp_app.html.twig index b16e6a050..0752eab35 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/otp_app.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/otp_app.html.twig @@ -25,9 +25,9 @@
  • {{ 'config.otp.app.two_factor_code_description_4'|trans }}

    - {% for flashMessage in app.session.flashbag.get("two_factor") %} + {% for flash_message in app.session.flashbag.get("two_factor") %}
    - {{ flashMessage|trans }} + {{ flash_message|trans }}
    {% endfor %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig index 8dc6fd507..256021b74 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig @@ -19,20 +19,20 @@ {% endblock %} {% block content %} - {% set currentRoute = app.request.attributes.get('_route') %} - {% if currentRoute == 'homepage' %} - {% set currentRoute = 'unread' %} + {% set current_route = app.request.attributes.get('_route') %} + {% if current_route == 'homepage' %} + {% set current_route = 'unread' %} {% endif %} - {% set listMode = app.user.config.listMode %} + {% set list_mode = app.user.config.listMode %}
    {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
    {% for entry in entries %} -
    -

    {{ entry.title | striptags | truncate(80, true, '…') | default('entry.default_title'|trans) | raw }}

    +
    +

    {{ entry.title|striptags|truncate(80, true, '…')|default('entry.default_title'|trans)|raw }}

    - {% set readingTime = entry.readingTime / app.user.config.readingSpeed * 200 %} + {% set reading_time = entry.readingTime / app.user.config.readingSpeed * 200 %}
    - {% if readingTime > 0 %} - {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }} + {% if reading_time > 0 %} + {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': reading_time|round}) }} {% else %} {{ 'entry.list.reading_time_less_one_minute'|trans|raw }} {% endif %} @@ -64,20 +64,20 @@ - {% if (entry.previewPicture is null or listMode == 1) %} + {% if (entry.previewPicture is null or list_mode == 1) %} -

    {{ entry.content|striptags|slice(0, 300) }}…

    +

    {{ entry.content|striptags|slice(0, 300) }}…

    {% else %} @@ -92,25 +92,25 @@ @@ -122,9 +122,9 @@ ×
    - {% if currentRoute != 'untagged' and nbEntriesUntagged != 0 %} + {% if current_route != 'untagged' and nbEntriesUntagged != 0 %} {% endif %} @@ -188,7 +188,7 @@
    {{ form_label(form.domainName) }}
    - {{ form_widget(form.domainName, {'type': 'text', 'attr' : {'placeholder': 'website.com'} }) }} + {{ form_widget(form.domainName, {'type': 'text', 'attr': {'placeholder': 'website.com'}}) }}
    @@ -198,11 +198,11 @@
    - {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value} }) }} + {{ form_widget(form.createdAt.left_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.left_date.vars.value}}) }}
    - {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value} }) }} + {{ form_widget(form.createdAt.right_date, {'type': 'date', 'attr': {'class': 'datepicker', 'data-value': form.createdAt.right_date.vars.value}}) }}
    diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig index 42f33f54e..182588b8c 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig @@ -5,39 +5,39 @@ {% block content %}
    -

    {{ entry.title|e|default('entry.default_title'|trans)|raw }}

    +

    {{ entry.title|e|default('entry.default_title'|trans)|raw }}

    @@ -62,15 +62,15 @@ {% endif %} - {% set readingTime = entry.readingTime / app.user.config.readingSpeed * 200 %} - {% if readingTime > 0 %} - {{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }} + {% set reading_time = entry.readingTime / app.user.config.readingSpeed * 200 %} + {% if reading_time > 0 %} + {{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': reading_time|round}) }} {% else %} {{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }} {% endif %} - comment {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }} + comment {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations|length) }} {% if entry.originUrl is not empty %} launch @@ -85,19 +85,19 @@ label_outline {{ tag.label }} - + {% endfor %}
    - {{ entry.content | raw }} + {{ entry.content|raw }}
    @@ -105,10 +105,10 @@ { "prefix": "", "urls": { - "create": "{{ path('annotations_post_annotation', { 'entry': entry.id }) }}", - "update": "{{ path('annotations_put_annotation', { 'annotation': 'idAnnotation' }) }}", - "destroy": "{{ path('annotations_delete_annotation', { 'annotation': 'idAnnotation' }) }}", - "search": "{{ path('annotations_get_annotations', { 'entry': entry.id }) }}" + "create": "{{ path('annotations_post_annotation', {'entry': entry.id}) }}", + "update": "{{ path('annotations_put_annotation', {'annotation': 'idAnnotation'}) }}", + "destroy": "{{ path('annotations_delete_annotation', {'annotation': 'idAnnotation'}) }}", + "search": "{{ path('annotations_get_annotations', {'entry': entry.id}) }}" }, "entryId": "{{ entry.id }}" } diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/new.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/new.html.twig index 03768a3d8..df397e4d3 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/new.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/new.html.twig @@ -3,5 +3,5 @@ {% block title %}{{ 'entry.new.page_title'|trans }}{% endblock %} {% block content %} - {{ render(controller( "WallabagCoreBundle:Entry:addEntryForm" )) }} + {{ render(controller("WallabagCoreBundle:Entry:addEntryForm")) }} {% endblock %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/new_form.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/new_form.html.twig index 8c1290681..cea7c43f9 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/new_form.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/new_form.html.twig @@ -1,4 +1,4 @@ -
    + {% if form_errors(form) %} {{ form_errors(form) }} {% endif %} @@ -8,7 +8,7 @@ {% endif %} {{ form_label(form.url) }} - {{ form_widget(form.url, { 'attr': {'autocomplete': 'off', 'placeholder': 'entry.new.placeholder'} }) }} + {{ form_widget(form.url, {'attr': {'autocomplete': 'off', 'placeholder': 'entry.new.placeholder'}}) }} {{ form_rest(form) }}
    diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/search_form.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/search_form.html.twig index 20821b6d3..a276de019 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/search_form.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/search_form.html.twig @@ -1,4 +1,4 @@ -
    +

    {{ 'menu.left.search'|trans }}

    × {% if form_errors(form) %} @@ -11,7 +11,7 @@ - {{ form_widget(form.term, { 'attr': {'autocomplete': 'off', 'placeholder': 'entry.search.placeholder'} }) }} + {{ form_widget(form.term, {'attr': {'autocomplete': 'off', 'placeholder': 'entry.search.placeholder'}}) }} {{ form_rest(form) }}
    diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/IgnoreOriginInstanceRule/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/IgnoreOriginInstanceRule/index.html.twig index 2de7cf0a4..bf1293c76 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/IgnoreOriginInstanceRule/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/IgnoreOriginInstanceRule/index.html.twig @@ -23,7 +23,7 @@ {{ rule.rule }} - {{ 'ignore_origin_instance_rule.list.edit_action'|trans }} + {{ 'ignore_origin_instance_rule.list.edit_action'|trans }} {% endfor %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Mail/forgotPassword.txt.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Mail/forgotPassword.txt.twig index 631bcb887..00fd292d8 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Mail/forgotPassword.txt.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Mail/forgotPassword.txt.twig @@ -1,6 +1,6 @@ -Hello {{username}}! +Hello {{ username }}! -To reset your password - please visit {{confirmationUrl}} +To reset your password - please visit {{ confirmationUrl }} Regards, Wallabag bot diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/index.html.twig index 324854add..15f215fc2 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/index.html.twig @@ -23,7 +23,7 @@ {{ credential.host }} - {{ 'site_credential.list.edit_action'|trans }} + {{ 'site_credential.list.edit_action'|trans }} {% endfor %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/new_form.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/new_form.html.twig index 6e552560e..b8c1b4015 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/new_form.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/new_form.html.twig @@ -1,4 +1,4 @@ -
    + {% if form_errors(form) %} {{ form_errors(form) }} {% endif %} @@ -7,7 +7,7 @@ {{ form_errors(form.label) }} {% endif %} - {{ form_widget(form.label, { 'attr': {'autocomplete': 'off'} }) }} + {{ form_widget(form.label, {'attr': {'autocomplete': 'off'}}) }} {{ form_rest(form) }}
    diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig index aa17b8428..93598115e 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig @@ -13,7 +13,7 @@ {{ tag.label }} ({{ tag.nbEntries }}) {% if renameForms is defined and renameForms[tag.id] is defined %} - @@ -34,7 +34,7 @@ {% if nbEntriesUntagged == 0 %} {{ 'tag.list.no_untagged_entries'|trans }} {% else %} - {{ 'tag.list.see_untagged_entries'|trans }} ({{nbEntriesUntagged}}) + {{ 'tag.list.see_untagged_entries'|trans }} ({{ nbEntriesUntagged }}) {% endif %}
    {% endblock %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig index d0be1e5cc..8c2d8d1a8 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig @@ -62,10 +62,10 @@

    It will be removed in the next version. You can use the Material theme by updating the theme config.

- {% for flashMessage in app.session.flashbag.get('notice') %} + {% for flash_message in app.session.flashbag.get('notice') %}
× -

{{ flashMessage|trans }}

+

{{ flash_message|trans }}

{% endfor %} {% endblock %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Developer/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Developer/index.html.twig index b83bf96fa..1494f0f5c 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Developer/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Developer/index.html.twig @@ -55,10 +55,10 @@ -

{{ 'developer.remove.warn_message_1'|trans({'%name%': client.name }) }}

-

{{ 'developer.remove.warn_message_2'|trans({'%name%': client.name }) }}

+

{{ 'developer.remove.warn_message_1'|trans({'%name%': client.name}) }}

+

{{ 'developer.remove.warn_message_2'|trans({'%name%': client.name}) }}

- {{ 'developer.remove.action'|trans({'%name%': client.name }) }} + {{ 'developer.remove.action'|trans({'%name%': client.name}) }}

diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_feed_link.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_feed_link.html.twig index 6df4c160d..7e84da66d 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_feed_link.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_feed_link.html.twig @@ -1,11 +1,11 @@ {% if tag is defined %} rss_feed -{% elseif currentRoute in ['homepage', 'unread', 'starred', 'archive', 'all'] %} - {% set feedRoute = currentRoute %} - {% if currentRoute == 'homepage' %} - {% set feedRoute = 'unread' %} +{% elseif current_route in ['homepage', 'unread', 'starred', 'archive', 'all'] %} + {% set feed_route = current_route %} + {% if current_route == 'homepage' %} + {% set feed_route = 'unread' %} {% endif %} - {% set feedRoute = feedRoute ~ '_feed' %} + {% set feed_route = feed_route ~ '_feed' %} - rss_feed + rss_feed {% endif %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_title.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_title.html.twig index 3c5fad1e9..81f682ef1 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_title.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_title.html.twig @@ -1,20 +1,20 @@ -{% set currentRoute = app.request.attributes.get('_route') %} +{% set current_route = app.request.attributes.get('_route') %} -{% if currentRoute == 'starred' %} +{% if current_route == 'starred' %} {{ 'entry.page_titles.starred'|trans }} -{% elseif currentRoute == 'archive' %} +{% elseif current_route == 'archive' %} {{ 'entry.page_titles.archived'|trans }} -{% elseif currentRoute == 'all' %} +{% elseif current_route == 'all' %} {{ isFiltered ? 'entry.page_titles.filtered'|trans : 'entry.page_titles.all'|trans }} -{% elseif currentRoute == 'search' %} +{% elseif current_route == 'search' %} {{ 'entry.page_titles.filtered_search'|trans }} {{ filter }} -{% elseif currentRoute == 'tag_entries' %} +{% elseif current_route == 'tag_entries' %} {{ 'entry.page_titles.filtered_tags'|trans }} {{ filter }} -{% elseif currentRoute == 'untagged' %} +{% elseif current_route == 'untagged' %} {{ 'entry.page_titles.untagged'|trans }} -{% elseif currentRoute == 'same_domain' %} +{% elseif current_route == 'same_domain' %} {{ 'entry.page_titles.same_domain'|trans }} -{% elseif currentRoute == 'annotated' %} +{% elseif current_route == 'annotated' %} {{ 'entry.page_titles.with_annotations'|trans }} {% else %} {{ 'entry.page_titles.unread'|trans }} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig index 4e87942fd..5e8f2dd1d 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig @@ -1,18 +1,18 @@ {% if type != 'tag' %} - wallabag — {{type}} feed + wallabag — {{ type }} feed Atom feed for {{ type }} entries - wallabag:{{ domainName | removeScheme | removeWww }}:{{ user }}:{{ type }} + wallabag:{{ domainName|removeScheme|removeWww }}:{{ user }}:{{ type }} {% else %} - wallabag:{{ domainName | removeScheme | removeWww }}:{{ user }}:{{ type }}:{{ tag }} + wallabag:{{ domainName|removeScheme|removeWww }}:{{ user }}:{{ type }}:{{ tag }} - wallabag — {{type}} {{ tag }} feed + wallabag — {{ type }} {{ tag }} feed Atom feed for entries tagged with {{ tag }} {% endif %} {% if updated %} - {{ updated | date('c') }} {# Indicates the last time the feed was modified in a significant way. #} + {{ updated|date('c') }} {# Indicates the last time the feed was modified in a significant way. #} {% endif %} {% if entries.hasPreviousPage %} @@ -36,7 +36,7 @@ href="{{ url('view', {'id': entry.id}) }}"/> - wallabag:{{ domainName | removeScheme | removeWww }}:{{ user }}:entry:{{ entry.id }} + wallabag:{{ domainName|removeScheme|removeWww }}:{{ user }}:entry:{{ entry.id }} {{ entry.updatedAt|date('c') }} {{ entry.createdAt|date('c') }} {% for tag in entry.tags %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig index 12af5e268..69b32ccac 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig @@ -7,13 +7,13 @@ - {% set picturePath = app.request.schemeAndHttpHost ~ asset('img/logo-wallabag.svg') %} + {% set picture_path = app.request.schemeAndHttpHost ~ asset('img/logo-wallabag.svg') %} {% if entry.previewPicture is not null %} - {% set picturePath = entry.previewPicture %} + {% set picture_path = entry.previewPicture %} {% endif %} - + - + @@ -31,7 +31,7 @@

{{ "entry.public.shared_by_wallabag"|trans({'%wallabag_instance%': url('homepage'), '%username%': entry.user.username})|raw }}.

- {{ entry.content | raw }} + {{ entry.content|raw }}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Mail/forgotPassword.txt.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Mail/forgotPassword.txt.twig index 631bcb887..00fd292d8 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Mail/forgotPassword.txt.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Mail/forgotPassword.txt.twig @@ -1,6 +1,6 @@ -Hello {{username}}! +Hello {{ username }}! -To reset your password - please visit {{confirmationUrl}} +To reset your password - please visit {{ confirmationUrl }} Regards, Wallabag bot diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig index 28ff364cb..61b80fb11 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig @@ -109,8 +109,8 @@
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/new.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/new.html.twig index 03768a3d8..df397e4d3 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/new.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/new.html.twig @@ -3,5 +3,5 @@ {% block title %}{{ 'entry.new.page_title'|trans }}{% endblock %} {% block content %} - {{ render(controller( "WallabagCoreBundle:Entry:addEntryForm" )) }} + {{ render(controller("WallabagCoreBundle:Entry:addEntryForm")) }} {% endblock %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/new_form.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/new_form.html.twig index 4cf811674..e572d9f50 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/new_form.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/new_form.html.twig @@ -1,4 +1,4 @@ - - {{ render(controller("WallabagCoreBundle:Entry:searchForm", {'currentRoute': currentRoute})) }} + {{ render(controller("WallabagCoreBundle:Entry:searchForm", {'currentRoute': current_route})) }} {{ render(controller("WallabagCoreBundle:Entry:addEntryForm")) }}
@@ -166,7 +166,7 @@
-
diff --git a/src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig index 93b08540f..355a375fb 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig +++ b/src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig @@ -33,7 +33,7 @@
- {{ form_widget(form.save, { 'attr': {'class': 'btn waves-effect waves-light'} }) }} + {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} {{ form_rest(form) }} diff --git a/src/Wallabag/ImportBundle/Resources/views/Delicious/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Delicious/index.html.twig index df3ca8eb4..ae24313b0 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Delicious/index.html.twig +++ b/src/Wallabag/ImportBundle/Resources/views/Delicious/index.html.twig @@ -33,7 +33,7 @@
- {{ form_widget(form.save, { 'attr': {'class': 'btn waves-effect waves-light'} }) }} + {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} {{ form_rest(form) }} diff --git a/src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig index ced3f0088..e115395c1 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig +++ b/src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig @@ -33,7 +33,7 @@
- {{ form_widget(form.save, { 'attr': {'class': 'btn waves-effect waves-light'} }) }} + {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} {{ form_rest(form) }} diff --git a/src/Wallabag/ImportBundle/Resources/views/Import/_information.html.twig b/src/Wallabag/ImportBundle/Resources/views/Import/_information.html.twig index 48bbcfe7d..9d8f760ef 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Import/_information.html.twig +++ b/src/Wallabag/ImportBundle/Resources/views/Import/_information.html.twig @@ -1,6 +1,6 @@ {% set redis = craue_setting('import_with_redis') %} {% set rabbit = craue_setting('import_with_rabbitmq') %} -{% set downloadImages = craue_setting('download_images_enabled') %} +{% set download_images = craue_setting('download_images_enabled') %} {% if redis or rabbit %}
@@ -8,7 +8,7 @@
{% endif %} -{% if not redis and not rabbit and downloadImages %} +{% if not redis and not rabbit and download_images %}
{{ 'import.worker.download_images_warning'|trans|raw }}
diff --git a/src/Wallabag/ImportBundle/Resources/views/Instapaper/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Instapaper/index.html.twig index 28165d190..5cf06e8dc 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Instapaper/index.html.twig +++ b/src/Wallabag/ImportBundle/Resources/views/Instapaper/index.html.twig @@ -33,7 +33,7 @@
- {{ form_widget(form.save, { 'attr': {'class': 'btn waves-effect waves-light'} }) }} + {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} {{ form_rest(form) }} diff --git a/src/Wallabag/ImportBundle/Resources/views/Pinboard/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Pinboard/index.html.twig index 43f196ad1..ed4a0cbbd 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Pinboard/index.html.twig +++ b/src/Wallabag/ImportBundle/Resources/views/Pinboard/index.html.twig @@ -33,7 +33,7 @@ - {{ form_widget(form.save, { 'attr': {'class': 'btn waves-effect waves-light'} }) }} + {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} {{ form_rest(form) }} diff --git a/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig index e58358b9c..c9bb61293 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig +++ b/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig @@ -12,7 +12,7 @@
{{ 'import.pocket.config_missing.description'|trans }} - {{ 'import.pocket.config_missing.admin_message'|trans({'%keyurls%': '', '%keyurle%':''})|raw }} + {{ 'import.pocket.config_missing.admin_message'|trans({'%keyurls%': '', '%keyurle%': ''})|raw }}
{% endif %} diff --git a/src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig index 737b0adf4..df30305eb 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig +++ b/src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig @@ -33,7 +33,7 @@ - {{ form_widget(form.save, { 'attr': {'class': 'btn waves-effect waves-light'} }) }} + {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} {{ form_rest(form) }} diff --git a/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig index 974b2c73e..30639d65b 100644 --- a/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig +++ b/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig @@ -33,7 +33,7 @@ - {{ form_widget(form.save, { 'attr': {'class': 'btn waves-effect waves-light'} }) }} + {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} {{ form_rest(form) }} diff --git a/src/Wallabag/UserBundle/Resources/views/Authentication/form.html.twig b/src/Wallabag/UserBundle/Resources/views/Authentication/form.html.twig index 22945b51b..5f6db076a 100644 --- a/src/Wallabag/UserBundle/Resources/views/Authentication/form.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/Authentication/form.html.twig @@ -6,8 +6,8 @@
- {% for flashMessage in app.session.flashbag.get("two_factor") %} -

{{ flashMessage|trans }}

+ {% for flash_message in app.session.flashbag.get("two_factor") %} +

{{ flash_message|trans }}

{% endfor %} {# Authentication errors #} diff --git a/src/Wallabag/UserBundle/Resources/views/Manage/index.html.twig b/src/Wallabag/UserBundle/Resources/views/Manage/index.html.twig index 15002632c..aadbb0d31 100644 --- a/src/Wallabag/UserBundle/Resources/views/Manage/index.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/Manage/index.html.twig @@ -16,7 +16,7 @@
-
+ {% if form_errors(searchForm) %} {{ form_errors(searchForm) }} {% endif %} @@ -25,7 +25,7 @@ {{ form_errors(searchForm.term) }} {% endif %} - {{ form_widget(searchForm.term, { 'attr': {'autocomplete': 'off', 'placeholder': 'user.search.placeholder'} }) }} + {{ form_widget(searchForm.term, {'attr': {'autocomplete': 'off', 'placeholder': 'user.search.placeholder'}}) }} {{ form_rest(searchForm) }}
@@ -48,7 +48,7 @@ {{ user.email }} {% if user.lastLogin %}{{ user.lastLogin|date('Y-m-d H:i:s') }}{% endif %} - {{ 'user.list.edit_action'|trans }} + {{ 'user.list.edit_action'|trans }} {% endfor %} diff --git a/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig b/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig index eca5999e3..e98e239de 100644 --- a/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/TwoFactor/email_auth_code.html.twig @@ -40,7 +40,7 @@ color: purple !important; } table td {border-collapse: collapse;} - table { border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt; } + table {border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt; } a {color: #373737;} #card {