Conditions | 3 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | protected function getStepOne(): FormBuilderInterface |
||
14 | { |
||
15 | /* |
||
16 | if ($this->getUser()) { |
||
17 | $this->message->setAuthorEmail($this->getUser()->getEmail()); |
||
18 | $this->message->setAuthorName($this->getUser()->getUsername()); |
||
19 | $user = true; |
||
20 | }/**/ |
||
21 | |||
22 | $form = $this->initForm(); |
||
23 | |||
24 | if (!isset($user) || !$this->getUser()) { |
||
25 | $form->add('authorEmail', EmailType::class, ['constraints' => $this->getAuthorEmailConstraints()]); |
||
26 | $form->add('authorName', null, ['constraints' => $this->getAuthorNameConstraints()]); |
||
27 | } |
||
28 | |||
29 | $form->add('content', TextareaType::class); |
||
30 | |||
31 | return $form; |
||
32 | } |
||
48 |