Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | public function provide(Operation $operation, array $uriVariables = [], array $context = []): object|array|null |
||
32 | { |
||
33 | $id = $uriVariables['id']; |
||
34 | if ('password_reset' === $id) { |
||
35 | $dummyFormComponent = new Form(); |
||
36 | $dummyFormComponent->formType = PasswordUpdateType::class; |
||
37 | $refObject = new \ReflectionObject($dummyFormComponent); |
||
38 | $refProperty = $refObject->getProperty('id'); |
||
39 | $refProperty->setValue($dummyFormComponent, Uuid::uuid4()); |
||
40 | |||
41 | return $dummyFormComponent; |
||
42 | } |
||
43 | |||
44 | return $this->defaultProvider->provide($operation, $uriVariables, $context); |
||
45 | } |
||
47 |