Conditions | 3 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
38 | public function validate($data, array $context = []): void |
||
39 | { |
||
40 | if ( |
||
41 | \is_object($data) && |
||
42 | $this->annotationReader->isConfigured($data) |
||
43 | ) { |
||
44 | $context['groups'] = $context['groups'] ?? ['Default']; |
||
45 | $context['groups'][] = (new \ReflectionClass(\get_class($data)))->getShortName() . ':timestamped'; |
||
46 | } |
||
47 | |||
48 | $this->decorated->validate($data, $context); |
||
49 | } |
||
51 |