Skip to content

Commit

Permalink
🚨 lint templates
Browse files Browse the repository at this point in the history
  • Loading branch information
garak committed Jul 7, 2024
1 parent 59c8a8a commit afe57a8
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 6 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ jobs:
uses: actions/checkout@v4
- name: Fix CS
uses: docker://oskarstark/php-cs-fixer-ga
twig-cs-fixer:
runs-on: ubuntu-22.04
name: Twig-CS-Fixer
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Require the vendor
run: composer require --dev --no-update vincentlanglet/twig-cs-fixer ^2.11
- name: Update
run: composer update --no-interaction --no-progress
- name: Run
run: vendor/bin/twig-cs-fixer lint templates
validate-markdown:
runs-on: ubuntu-22.04
steps:
Expand Down
1 change: 1 addition & 0 deletions src/Metadata/CacheWarmer.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function warmUp(string $cacheDir, string $buildDir = null): array
$this->metadataReader->getUploadableFields($class);
$files[] = $class;
}

// TODO it could be nice if we return $files, to allow to exploit preloading...
return [];
}
Expand Down
2 changes: 1 addition & 1 deletion templates/Collector/mapping_collector.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</div>
{% endset %}

{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { 'link': true }) }}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', {link: true}) }}
{% endblock %}

{% block menu %}
Expand Down
1 change: 0 additions & 1 deletion templates/Form/fields.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,3 @@
{%- endif -%}
</div>
{%- endblock -%}

2 changes: 1 addition & 1 deletion tests/Fixtures/App/templates/default/edit.html.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends 'base.html.twig' %}

{% block body %}
{{ form(form, {'action': path('upload_edit', {'formType': formType, 'imageId': imageId}), 'method': 'POST'}) }}
{{ form(form, {action: path('upload_edit', {formType: formType, imageId: imageId}), method: 'POST'}) }}

{{ vich_uploader_asset(image) }}
{% endblock %}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends 'base.html.twig' %}

{% block body %}
{{ form(form, {'action': path('upload_edit_with_property_path', {'formType': formType, 'imageId': imageId}), 'method': 'POST'}) }}
{{ form(form, {action: path('upload_edit_with_property_path', {formType: formType, imageId: imageId}), method: 'POST'}) }}
{% endblock %}
2 changes: 1 addition & 1 deletion tests/Fixtures/App/templates/default/upload.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends 'base.html.twig' %}

{% block body %}
{{ form(form, {'action': path('upload_send', {'formType': formType}), 'method': 'POST'}) }}
{{ form(form, {action: path('upload_send', {formType: formType}), method: 'POST'}) }}
{% endblock %}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends 'base.html.twig' %}

{% block body %}
{{ form(form, {'action': path('upload_send_with_property_path', {'formType': formType}), 'method': 'POST'}) }}
{{ form(form, {action: path('upload_send_with_property_path', {formType: formType}), method: 'POST'}) }}
{% endblock %}

0 comments on commit afe57a8

Please sign in to comment.