Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitce641ab

Browse files
Review
1 parent862fdf1 commitce641ab

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,7 @@ public function setConstraint(Constraint $constraint)
142142
publicfunctionaddViolation(string$message,array$parameters = [],string|false|null$translationDomain =null)
143143
{
144144
$this->violations->add(newConstraintViolation(
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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ interface ExecutionContextInterface
6868
* @param array $params The parameters substituted in the error message
6969
* @param string|false|null $translationDomain The translation domain of the error message
7070
*/
71-
publicfunctionaddViolation(string$message,array$params = []/* , string|false|null $translationDomain */);
71+
publicfunctionaddViolation(string$message,array$params = []/* , string|false|null $translationDomain= null*/);
7272

7373
/**
7474
* Returns a builder for adding a violation with extended information.
@@ -86,7 +86,7 @@ public function addViolation(string $message, array $params = []/* , string|fals
8686
* @param array $parameters The parameters substituted in the error message
8787
* @param string|false|null $translationDomain The translation domain of the error message
8888
*/
89-
publicfunctionbuildViolation(string$message,array$parameters = []/* , string|false|null $translationDomain */):ConstraintViolationBuilderInterface;
89+
publicfunctionbuildViolation(string$message,array$parameters = []/* , string|false|null $translationDomain= null*/):ConstraintViolationBuilderInterface;
9090

9191
/**
9292
* Returns the validator.

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

Lines 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-
publicfunctionsetTranslationDomain(string|false$translationDomain):static
76+
publicfunctionsetTranslationDomain(string|false|null$translationDomain):static
7777
{
7878
$this->translationDomain =$translationDomain;
7979

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

Lines 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
publicfunctionsetParameters(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-
publicfunctionsetTranslationDomain(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)

[8]ページ先頭

©2009-2025 Movatter.jp