ChoiceField   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getViewType() 0 4 1
A getFormType() 0 4 1
A getStorageType() 0 4 1
A configureOptions() 0 3 1
1
<?php
2
3
namespace Psi\Component\ContentType\Standard\Field;
4
5
use Psi\Component\ContentType\FieldInterface;
6
use Psi\Component\ContentType\OptionsResolver\FieldOptionsResolver;
7
use Psi\Component\ContentType\Standard\Storage\StringType;
8
use Psi\Component\ContentType\Standard\View\ScalarType;
9
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
10
11
class ChoiceField implements FieldInterface
12
{
13
    public function getViewType(): string
14
    {
15
        return ScalarType::class;
16
    }
17
18
    public function getFormType(): string
19
    {
20
        return ChoiceType::class;
21
    }
22
23
    public function getStorageType(): string
24
    {
25
        return StringType::class;
26
    }
27
28
    public function configureOptions(FieldOptionsResolver $options)
29
    {
30
    }
31
}
32