MultiStepMessageForm::getStepTwo()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 8
rs 10
1
<?php
2
3
namespace PiedWeb\ConversationBundle\Form;
4
5
use Symfony\Component\Form\Extension\Core\Type\EmailType;
6
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
7
use Symfony\Component\Form\FormBuilderInterface;
8
9
class MultiStepMessageForm extends MessageForm
10
{
11
    protected function getStepOne(): FormBuilderInterface
12
    {
13
        $form = $this->initForm();
14
15
        $form->add('content', TextareaType::class);
16
17
        return $form;
18
    }
19
20
    protected function getStepTwo(): FormBuilderInterface
21
    {
22
        $form = $this->initForm();
23
24
        $form->add('authorEmail', EmailType::class, ['constraints' => $this->getAuthorEmailConstraints()]);
25
        $form->add('authorName', null, ['constraints' => $this->getAuthorNameConstraints()]);
26
27
        return $form;
28
    }
29
}
30