You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewConstraintDefinitionException(sprintf('No default option is configured for constraint "%s".', \get_class($this)));
139
+
thrownewConstraintDefinitionException(sprintf('No default option is configured for constraint "%s".', static::class));
140
140
}
141
141
142
142
if (\array_key_exists($defaultOption, $knownOptions)) {
@@ -148,11 +148,11 @@ public function __construct($options = null)
148
148
}
149
149
150
150
if (\count($invalidOptions) > 0) {
151
-
thrownewInvalidOptionsException(sprintf('The options "%s" do not exist in constraint "%s".', implode('", "', $invalidOptions), \get_class($this)), $invalidOptions);
151
+
thrownewInvalidOptionsException(sprintf('The options "%s" do not exist in constraint "%s".', implode('", "', $invalidOptions), static::class), $invalidOptions);
152
152
}
153
153
154
154
if (\count($missingOptions) > 0) {
155
-
thrownewMissingOptionsException(sprintf('The options "%s" must be set for constraint "%s".', implode('", "', array_keys($missingOptions)), \get_class($this)), array_keys($missingOptions));
155
+
thrownewMissingOptionsException(sprintf('The options "%s" must be set for constraint "%s".', implode('", "', array_keys($missingOptions)), static::class), array_keys($missingOptions));
156
156
}
157
157
}
158
158
@@ -175,7 +175,7 @@ public function __set(string $option, $value)
175
175
return;
176
176
}
177
177
178
-
thrownewInvalidOptionsException(sprintf('The option "%s" does not exist in constraint "%s".', $option, \get_class($this)), [$option]);
178
+
thrownewInvalidOptionsException(sprintf('The option "%s" does not exist in constraint "%s".', $option, static::class), [$option]);
179
179
}
180
180
181
181
/**
@@ -201,7 +201,7 @@ public function __get(string $option)
201
201
return$this->groups;
202
202
}
203
203
204
-
thrownewInvalidOptionsException(sprintf('The option "%s" does not exist in constraint "%s".', $option, \get_class($this)), [$option]);
204
+
thrownewInvalidOptionsException(sprintf('The option "%s" does not exist in constraint "%s".', $option, static::class), [$option]);
205
205
}
206
206
207
207
/**
@@ -265,7 +265,7 @@ public function getRequiredOptions()
Copy file name to clipboardExpand all lines: Constraints/AbstractComparison.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -39,15 +39,15 @@ public function __construct($options = null)
39
39
40
40
if (\is_array($options)) {
41
41
if (!isset($options['value']) && !isset($options['propertyPath'])) {
42
-
thrownewConstraintDefinitionException(sprintf('The "%s" constraint requires either the "value" or "propertyPath" option to be set.', \get_class($this)));
42
+
thrownewConstraintDefinitionException(sprintf('The "%s" constraint requires either the "value" or "propertyPath" option to be set.', static::class));
43
43
}
44
44
45
45
if (isset($options['value']) && isset($options['propertyPath'])) {
46
-
thrownewConstraintDefinitionException(sprintf('The "%s" constraint requires only one of the "value" or "propertyPath" options to be set, not both.', \get_class($this)));
46
+
thrownewConstraintDefinitionException(sprintf('The "%s" constraint requires only one of the "value" or "propertyPath" options to be set, not both.', static::class));
47
47
}
48
48
49
49
if (isset($options['propertyPath']) && !class_exists(PropertyAccess::class)) {
50
-
thrownewLogicException(sprintf('The "%s" constraint requires the Symfony PropertyAccess component to use the "propertyPath" option.', \get_class($this)));
50
+
thrownewLogicException(sprintf('The "%s" constraint requires the Symfony PropertyAccess component to use the "propertyPath" option.', static::class));
Copy file name to clipboardExpand all lines: Constraints/Composite.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -71,11 +71,11 @@ public function __construct($options = null)
71
71
$constraint = \get_class($constraint);
72
72
}
73
73
74
-
thrownewConstraintDefinitionException(sprintf('The value %s is not an instance of Constraint in constraint %s', $constraint, \get_class($this)));
74
+
thrownewConstraintDefinitionException(sprintf('The value %s is not an instance of Constraint in constraint %s', $constraint, static::class));
75
75
}
76
76
77
77
if ($constraintinstanceof Valid) {
78
-
thrownewConstraintDefinitionException(sprintf('The constraint Valid cannot be nested inside constraint %s. You can only declare the Valid constraint directly on a field or method.', \get_class($this)));
78
+
thrownewConstraintDefinitionException(sprintf('The constraint Valid cannot be nested inside constraint %s. You can only declare the Valid constraint directly on a field or method.', static::class));
79
79
}
80
80
}
81
81
@@ -99,7 +99,7 @@ public function __construct($options = null)
thrownewConstraintDefinitionException(sprintf('The group(s) "%s" passed to the constraint %s should also be passed to its containing constraint %s', implode('", "', $excessGroups), \get_class($constraint), \get_class($this)));
102
+
thrownewConstraintDefinitionException(sprintf('The group(s) "%s" passed to the constraint %s should also be passed to its containing constraint %s', implode('", "', $excessGroups), \get_class($constraint), static::class));
Copy file name to clipboardExpand all lines: Constraints/Range.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -50,15 +50,15 @@ public function __construct($options = null)
50
50
{
51
51
if (\is_array($options)) {
52
52
if (isset($options['min']) && isset($options['minPropertyPath'])) {
53
-
thrownewConstraintDefinitionException(sprintf('The "%s" constraint requires only one of the "min" or "minPropertyPath" options to be set, not both.', \get_class($this)));
53
+
thrownewConstraintDefinitionException(sprintf('The "%s" constraint requires only one of the "min" or "minPropertyPath" options to be set, not both.', static::class));
54
54
}
55
55
56
56
if (isset($options['max']) && isset($options['maxPropertyPath'])) {
57
-
thrownewConstraintDefinitionException(sprintf('The "%s" constraint requires only one of the "max" or "maxPropertyPath" options to be set, not both.', \get_class($this)));
57
+
thrownewConstraintDefinitionException(sprintf('The "%s" constraint requires only one of the "max" or "maxPropertyPath" options to be set, not both.', static::class));
58
58
}
59
59
60
60
if ((isset($options['minPropertyPath']) || isset($options['maxPropertyPath'])) && !class_exists(PropertyAccess::class)) {
61
-
thrownewLogicException(sprintf('The "%s" constraint requires the Symfony PropertyAccess component to use the "minPropertyPath" or "maxPropertyPath" option.', \get_class($this)));
61
+
thrownewLogicException(sprintf('The "%s" constraint requires the Symfony PropertyAccess component to use the "minPropertyPath" or "maxPropertyPath" option.', static::class));
0 commit comments