Skip to content

Commit 00faf8f

Browse files
committed
Renaming the function
1 parent ab5aeb4 commit 00faf8f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Validator/Yaml/YamlValidator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function __construct(?Parser $parser = null)
2121

2222
public function validate(Block $block): array
2323
{
24-
$cleanedContent = $this->cleanContent($block->getContent());
24+
$cleanedContent = $this->normalizeIndentation($block->getContent());
2525
try {
2626
$this->parser->parse($cleanedContent);
2727
} catch (ParseException $exception) {
@@ -33,7 +33,7 @@ public function validate(Block $block): array
3333
return [];
3434
}
3535

36-
private function cleanContent(string $content): string
36+
private function normalizeIndentation(string $content): string
3737
{
3838
$lineContent = explode("\n", $content);
3939
$offset = 0;

tests/sylius_example.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Remember to register ``App\Form\SupplierType`` for resource:
112112
driver: doctrine/orm
113113
classes:
114114
model: App\Entity\Supplier
115-
+ form: App\Form\Type\SupplierType
115+
+ form: App\Form\Type\SupplierType
116116
117117
1. Restrict access to the entity for the respective channel administrator:
118118
--------------------------------------------------------------------------
@@ -263,7 +263,7 @@ After that, access to the resource should work properly with all restrictions.
263263
264264
* Add method to the Suppliers grid:
265265

266-
.. code-block:: yaml
266+
.. code-block:: diff
267267
268268
sylius_grid:
269269
grids:

0 commit comments

Comments
 (0)