Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 92143fa

Browse filesBrowse files
Review
1 parent 2a238cd commit 92143fa
Copy full SHA for 92143fa

File tree

4 files changed

+17
-17
lines changed
Filter options

4 files changed

+17
-17
lines changed

‎src/Symfony/Component/Validator/Context/ExecutionContext.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Context/ExecutionContext.php
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,7 @@ public function setConstraint(Constraint $constraint): void
142142
public function addViolation(string $message, array $parameters = [], string|false|null $translationDomain = null): void
143143
{
144144
$this->violations->add(new ConstraintViolation(
145-
false === $translationDomain
146-
? $message
147-
: $this->translator->trans($message, $parameters, $translationDomain ?? $this->translationDomain),
145+
false === $translationDomain ? $message : $this->translator->trans($message, $parameters, $translationDomain ?? $this->translationDomain),
148146
$message,
149147
$parameters,
150148
$this->root,

‎src/Symfony/Component/Validator/Context/ExecutionContextInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Context/ExecutionContextInterface.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ interface ExecutionContextInterface
7070
*
7171
* @return void
7272
*/
73-
public function addViolation(string $message, array $params = []/* , string|false|null $translationDomain */);
73+
public function addViolation(string $message, array $params = []/* , string|false|null $translationDomain = null */);
7474

7575
/**
7676
* Returns a builder for adding a violation with extended information.
@@ -88,7 +88,7 @@ public function addViolation(string $message, array $params = []/* , string|fals
8888
* @param array $parameters The parameters substituted in the error message
8989
* @param string|false|null $translationDomain The translation domain of the error message
9090
*/
91-
public function buildViolation(string $message, array $parameters = []/* , string|false|null $translationDomain */): ConstraintViolationBuilderInterface;
91+
public function buildViolation(string $message, array $parameters = []/* , string|false|null $translationDomain = null */): ConstraintViolationBuilderInterface;
9292

9393
/**
9494
* Returns the validator.

‎src/Symfony/Component/Validator/Violation/ConstraintViolationBuilder.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Violation/ConstraintViolationBuilder.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function setParameters(array $parameters): static
7373
return $this;
7474
}
7575

76-
public function setTranslationDomain(string|false $translationDomain): static
76+
public function setTranslationDomain(string|false|null $translationDomain): static
7777
{
7878
$this->translationDomain = $translationDomain;
7979

‎src/Symfony/Component/Validator/Violation/ConstraintViolationBuilderInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Violation/ConstraintViolationBuilderInterface.php
+13-11Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
* execution context.
2121
*
2222
* @author Bernhard Schussek <bschussek@gmail.com>
23+
*
24+
* @method static setTranslationDomain(string|false|null $translationDomain);
2325
*/
2426
interface ConstraintViolationBuilderInterface
2527
{
@@ -56,17 +58,17 @@ public function setParameter(string $key, string $value): static;
5658
*/
5759
public function setParameters(array $parameters): static;
5860

59-
/**
60-
* Sets the translation domain which should be used for translating the
61-
* violation message.
62-
*
63-
* @param string|false $translationDomain The translation domain
64-
*
65-
* @return $this
66-
*
67-
* @see \Symfony\Contracts\Translation\TranslatorInterface
68-
*/
69-
public function setTranslationDomain(string|false $translationDomain): static;
61+
// /**
62+
// * Sets the translation domain which should be used for translating the
63+
// * violation message.
64+
// *
65+
// * @param string|false|null $translationDomain The translation domain
66+
// *
67+
// * @return $this
68+
// *
69+
// * @see \Symfony\Contracts\Translation\TranslatorInterface
70+
// */
71+
// public function setTranslationDomain(string|false|null $translationDomain): static;
7072

7173
/**
7274
* Sets the invalid value that caused this violation.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.