MultiStepMessageForm   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 19
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getStepTwo() 0 8 1
A getStepOne() 0 7 1
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