| Total Complexity | 6 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class MessageForm |
||
| 10 | { |
||
| 11 | use FormTrait; |
||
|
|
|||
| 12 | |||
| 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 | } |
||
| 33 | |||
| 34 | protected function getUser() |
||
| 46 | } |
||
| 47 | } |
||
| 48 |