From 3ed98c60ae920a6c694e57ba3d418de10f68c584 Mon Sep 17 00:00:00 2001 From: Jorick Pepin Date: Wed, 9 Oct 2024 10:45:50 +0200 Subject: [PATCH] docs: minor syntax fixes --- doc/fields.rst | 2 +- doc/tests.rst | 2 +- src/Field/FieldTrait.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/fields.rst b/doc/fields.rst index 409d5edcb5..dd1191f414 100644 --- a/doc/fields.rst +++ b/doc/fields.rst @@ -813,7 +813,7 @@ Misc. Options // a custom HTML attribute added when rendering the field // e.g. setAttribute('data-foo', 'bar') renders a 'data-foo="bar"' attribute in HTML - // it's a shortcut for the equivalent setFormTypeOption('attr.data-foo', 'bar) + // it's a shortcut for the equivalent setFormTypeOption('attr.data-foo', 'bar') ->setHtmlAttribute('attribute_name', 'attribute_value') // a key-value array of attributes to add to the HTML element diff --git a/doc/tests.rst b/doc/tests.rst index 3b594de963..f4d12f27cd 100644 --- a/doc/tests.rst +++ b/doc/tests.rst @@ -26,8 +26,8 @@ First, your test class need to extend the ``AbstractCrudTestCase``:: # tests/Admin/Controller/CategoryCrudControllerTest.php namespace App\Tests\Admin\Controller; + use App\Controller\Admin\AppDashboardController; use App\Controller\Admin\CategoryCrudController; - use App\Controller\Admin\AppDashboardController use EasyCorp\Bundle\EasyAdminBundle\Test\AbstractCrudTestCase; final class CategoryCrudControllerTest extends AbstractCrudTestCase diff --git a/src/Field/FieldTrait.php b/src/Field/FieldTrait.php index 2d7ea5e791..febba8105c 100644 --- a/src/Field/FieldTrait.php +++ b/src/Field/FieldTrait.php @@ -138,7 +138,7 @@ public function setFormTypeOptionIfNotSet(string $optionName, $optionValue): sel /** * Sets the value of a custom HTML attribute that will be added when rendering the field. * E.g. setAttribute('data-foo', 'bar') will render a 'data-foo="bar"' attribute in HTML. - * It's a shortcut for the equivalent setFormTypeOption('attr.data-foo', 'bar). + * It's a shortcut for the equivalent setFormTypeOption('attr.data-foo', 'bar'). */ public function setHtmlAttribute(string $attributeName, $attributeValue): self {