Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
50 | public function createByValidationErrors(array $errors, string $locale, string $scope, string $type): Error |
||
51 | { |
||
52 | $nestedErrorMessage = new NestedErrorMessages($errors, function (string $key, array $arguments) use ($locale) { |
||
53 | return $this->translator->translate($locale, $key, $arguments); |
||
54 | }); |
||
55 | |||
56 | return new Error( |
||
57 | $scope, |
||
58 | 'validation.errors', |
||
59 | 'there are validation errors while validating the model', |
||
60 | $type, |
||
61 | $nestedErrorMessage->getMessages() |
||
62 | ); |
||
63 | } |
||
64 | |||
82 |