| Total Complexity | 7 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | final class Validation implements ValidationInterface |
||
| 11 | { |
||
| 12 | private ?TranslatorInterface $translator; |
||
| 13 | private ?string $translationDomain; |
||
| 14 | private ?string $translationLocale; |
||
| 15 | |||
| 16 | public function __construct( |
||
| 17 | TranslatorInterface $translator = null, |
||
| 18 | string $translationDomain = null, |
||
| 19 | string $translationLocale = null |
||
| 20 | ) { |
||
| 21 | $this->translator = $translator; |
||
| 22 | $this->translationDomain = $translationDomain; |
||
| 23 | $this->translationLocale = $translationLocale; |
||
| 24 | } |
||
| 25 | |||
| 26 | public function create(array $rules): ValidatorInterface |
||
| 27 | { |
||
| 28 | return new Validator($this->normalizeRules($rules)); |
||
| 29 | } |
||
| 30 | |||
| 31 | private function normalizeRules(array $rules) |
||
| 54 | ); |
||
| 55 | } |
||
| 56 | } |
||
| 57 |