Completed
Push — 3.x ( c2ec31...538660 )
by Christian
04:44
created

AvoidInfiniteLoopAdmin   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
dl 0
loc 26
rs 10
c 0
b 0
f 0
lcom 1
cbo 1

4 Methods

Rating   Name   Duplication   Size   Complexity  
A configureDatagridFilters() 0 5 1
A configureListFields() 0 5 1
A configureFormFields() 0 5 1
A configureShowFields() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Sonata\AdminBundle\Tests\Fixtures\Admin;
6
7
use Sonata\AdminBundle\Admin\AbstractAdmin;
8
use Sonata\AdminBundle\Datagrid\DatagridMapper;
9
use Sonata\AdminBundle\Datagrid\ListMapper;
10
use Sonata\AdminBundle\Form\FormMapper;
11
use Sonata\AdminBundle\Show\ShowMapper;
12
13
final class AvoidInfiniteLoopAdmin extends AbstractAdmin
14
{
15
    protected function configureDatagridFilters(DatagridMapper $datagridMapper): void
16
    {
17
        $this->getFilterFieldDescriptions();
18
        $this->hasFilterFieldDescription('help');
19
    }
20
21
    protected function configureListFields(ListMapper $listMapper): void
22
    {
23
        $this->getListFieldDescriptions();
24
        $this->hasFilterFieldDescription('help');
25
    }
26
27
    protected function configureFormFields(FormMapper $formMapper): void
28
    {
29
        $this->getFormFieldDescriptions();
30
        $this->hasFilterFieldDescription('help');
31
    }
32
33
    protected function configureShowFields(ShowMapper $showMapper): void
34
    {
35
        $this->getShowFieldDescriptions();
36
        $this->hasFilterFieldDescription('help');
37
    }
38
}
39