CreatePostForm   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 9
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Explicit Architecture POC,
7
 * which is created on top of the Symfony Demo application.
8
 *
9
 * (c) Herberto Graça <[email protected]>
10
 *
11
 * For the full copyright and license information, please view the LICENSE
12
 * file that was distributed with this source code.
13
 */
14
15
namespace Acme\App\Presentation\Web\Infrastructure\Form\Symfony\Form;
16
17
use Acme\App\Presentation\Web\Core\Port\Form\FormInterface;
18
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
19
use Symfony\Component\Form\FormBuilderInterface;
20
21
/**
22
 * Defines the form used to create blog posts.
23
 */
24
class CreatePostForm extends EditPostForm
25
{
26
    public function buildForm(FormBuilderInterface $builder, array $options): void
27
    {
28
        parent::buildForm($builder, $options);
29
30
        $builder->add(FormInterface::BUTTON_NAME_SAVE_AND_CREATE_NEW, SubmitType::class);
31
    }
32
}
33