Skip to content

Commit 6409edc

Browse files
authored
Merge pull request #1460 from garak/twig-cs-fix
🚨 lint templates
2 parents 59c8a8a + afe57a8 commit 6409edc

File tree

8 files changed

+18
-6
lines changed

8 files changed

+18
-6
lines changed

.github/workflows/build.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@ jobs:
2929
uses: actions/checkout@v4
3030
- name: Fix CS
3131
uses: docker://oskarstark/php-cs-fixer-ga
32+
twig-cs-fixer:
33+
runs-on: ubuntu-22.04
34+
name: Twig-CS-Fixer
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
- name: Require the vendor
39+
run: composer require --dev --no-update vincentlanglet/twig-cs-fixer ^2.11
40+
- name: Update
41+
run: composer update --no-interaction --no-progress
42+
- name: Run
43+
run: vendor/bin/twig-cs-fixer lint templates
3244
validate-markdown:
3345
runs-on: ubuntu-22.04
3446
steps:

src/Metadata/CacheWarmer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public function warmUp(string $cacheDir, string $buildDir = null): array
2929
$this->metadataReader->getUploadableFields($class);
3030
$files[] = $class;
3131
}
32+
3233
// TODO it could be nice if we return $files, to allow to exploit preloading...
3334
return [];
3435
}

templates/Collector/mapping_collector.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</div>
1414
{% endset %}
1515

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

1919
{% block menu %}

templates/Form/fields.html.twig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,3 @@
4848
{%- endif -%}
4949
</div>
5050
{%- endblock -%}
51-
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% extends 'base.html.twig' %}
22

33
{% block body %}
4-
{{ form(form, {'action': path('upload_edit', {'formType': formType, 'imageId': imageId}), 'method': 'POST'}) }}
4+
{{ form(form, {action: path('upload_edit', {formType: formType, imageId: imageId}), method: 'POST'}) }}
55

66
{{ vich_uploader_asset(image) }}
77
{% endblock %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% extends 'base.html.twig' %}
22

33
{% block body %}
4-
{{ form(form, {'action': path('upload_edit_with_property_path', {'formType': formType, 'imageId': imageId}), 'method': 'POST'}) }}
4+
{{ form(form, {action: path('upload_edit_with_property_path', {formType: formType, imageId: imageId}), method: 'POST'}) }}
55
{% endblock %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% extends 'base.html.twig' %}
22

33
{% block body %}
4-
{{ form(form, {'action': path('upload_send', {'formType': formType}), 'method': 'POST'}) }}
4+
{{ form(form, {action: path('upload_send', {formType: formType}), method: 'POST'}) }}
55
{% endblock %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% extends 'base.html.twig' %}
22

33
{% block body %}
4-
{{ form(form, {'action': path('upload_send_with_property_path', {'formType': formType}), 'method': 'POST'}) }}
4+
{{ form(form, {action: path('upload_send_with_property_path', {formType: formType}), method: 'POST'}) }}
55
{% endblock %}

0 commit comments

Comments
 (0)