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
@@ -176,7 +176,7 @@ public function __set($option, $value)
176
176
return;
177
177
}
178
178
179
-
thrownewInvalidOptionsException(sprintf('The option "%s" does not exist in constraint "%s".', $option, \get_class($this)), [$option]);
179
+
thrownewInvalidOptionsException(sprintf('The option "%s" does not exist in constraint "%s".', $option, static::class), [$option]);
180
180
}
181
181
182
182
/**
@@ -202,7 +202,7 @@ public function __get($option)
202
202
return$this->groups;
203
203
}
204
204
205
-
thrownewInvalidOptionsException(sprintf('The option "%s" does not exist in constraint "%s".', $option, \get_class($this)), [$option]);
205
+
thrownewInvalidOptionsException(sprintf('The option "%s" does not exist in constraint "%s".', $option, static::class), [$option]);
206
206
}
207
207
208
208
/**
@@ -266,7 +266,7 @@ public function getRequiredOptions()
Copy file name to clipboardExpand all lines: Constraints/AbstractComparison.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -39,11 +39,11 @@ 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)) {
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));
0 commit comments