Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
15 | public function execute(Request $request) : ArtifactCollection |
||
16 | { |
||
17 | $builder = $this->getBaseFormBuilder($request->getMethod()); |
||
18 | /** @var \ReflectionClass $reflection */ |
||
19 | $reflection = $this->getArtifact('reflection'); |
||
20 | |||
21 | foreach ($reflection->getProperties() as $property) { |
||
22 | if ($this->accessManager->canUpdateProperty($property)) { |
||
23 | $this->addField($property, $builder); |
||
24 | } |
||
25 | } |
||
26 | |||
27 | return new ArtifactCollection([ |
||
28 | new Artifact('form', $builder->getForm()) |
||
29 | ]); |
||
37 | } |