| Total Complexity | 5 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class MaxLength extends Constraint |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var int |
||
| 13 | */ |
||
| 14 | private $max; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param array $options |
||
| 18 | */ |
||
| 19 | 4 | public function __construct(array $options = []) |
|
| 20 | { |
||
| 21 | 4 | parent::__construct($options); |
|
| 22 | |||
| 23 | 2 | $this->max = $options['max']; |
|
| 24 | 2 | } |
|
| 25 | |||
| 26 | /** |
||
| 27 | * @inheritdoc |
||
| 28 | */ |
||
| 29 | 1 | public function normalize(NormalizerInterface $normalizer, $format = null, array $context = []): array |
|
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @inheritdoc |
||
| 36 | */ |
||
| 37 | 1 | protected function getAttribute(): string |
|
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @inheritdoc |
||
| 44 | */ |
||
| 45 | 1 | protected function getValue(): string |
|
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @inheritdoc |
||
| 52 | */ |
||
| 53 | 4 | protected function configureOptions(OptionsResolver $resolver): void |
|
| 61 |