File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed
Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -13,15 +13,12 @@ final class CakeValidatorFactory
1313 * Create validation result from array with errors.
1414 *
1515 * @param array<mixed> $errors The validation errors
16- * @param ValidationResult|null $result The result
1716 *
1817 * @return ValidationResult The result
1918 */
20- public static function createValidationResult (array $ errors, ValidationResult $ result = null ): ValidationResult
19+ public static function createValidationResult (array $ errors ): ValidationResult
2120 {
22- if ($ result === null ) {
23- $ result = new ValidationResult ();
24- }
21+ $ result = new ValidationResult ();
2522
2623 static ::addErrors ($ result , $ errors );
2724
Original file line number Diff line number Diff line change @@ -15,17 +15,13 @@ final class SymfonyValidatorFactory
1515 * Create validation result from array with errors.
1616 *
1717 * @param ConstraintViolationList $violations The validation errors
18- * @param ValidationResult|null $result The result
1918 *
2019 * @return ValidationResult The result
2120 */
2221 public static function createValidationResult (
23- ConstraintViolationList $ violations ,
24- ValidationResult $ result = null
22+ ConstraintViolationList $ violations
2523 ): ValidationResult {
26- if ($ result === null ) {
27- $ result = new ValidationResult ();
28- }
24+ $ result = new ValidationResult ();
2925
3026 /** @var ConstraintViolation $violation */
3127 foreach ($ violations as $ violation ) {
You can’t perform that action at this time.
0 commit comments