Completed
Push — 3.x ( eebc20...445039 )
by Grégoire
04:15
created

FooAdmin   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 4
dl 0
loc 17
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A configureListFields() 0 4 1
A configureFormFields() 0 4 1
A configureShowFields() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Sonata Project package.
7
 *
8
 * (c) Thomas Rabaix <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Sonata\AdminBundle\Tests\App\Admin;
15
16
use Sonata\AdminBundle\Admin\AbstractAdmin;
17
use Sonata\AdminBundle\Datagrid\ListMapper;
18
use Sonata\AdminBundle\Form\FormMapper;
19
use Sonata\AdminBundle\Show\ShowMapper;
20
use Symfony\Component\Form\Extension\Core\Type\TextType;
21
22
final class FooAdmin extends AbstractAdmin
23
{
24
    protected function configureListFields(ListMapper $list)
25
    {
26
        $list->add('name', 'string');
27
    }
28
29
    protected function configureFormFields(FormMapper $form)
30
    {
31
        $form->add('name', TextType::class);
32
    }
33
34
    protected function configureShowFields(ShowMapper $show)
35
    {
36
        $show->add('name', 'string');
37
    }
38
}
39