Passed
Pull Request — master (#16)
by Maxime
07:26
created

Gmap   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 6
c 1
b 0
f 0
dl 0
loc 20
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getFormClass() 0 3 1
A getFields() 0 4 1
A getImage() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MonsieurBiz\SyliusRichEditorPlugin\UiElement;
6
7
use MonsieurBiz\SyliusRichEditorPlugin\Form\Type\UiElement\GmapType;
8
9
class Gmap extends AbstractUiElement
10
{
11
    protected $type = 'gmap';
12
13
    // We have an image for our element, if you don't specify it, we will use a default one
14
    public function getImage(): string
15
    {
16
        return '/bundles/monsieurbizsyliusricheditorplugin/images/ui_elements/gmap.png';
17
    }
18
19
    public function getFields(): array
20
    {
21
        return [
22
            'gmap_link',
23
        ];
24
    }
25
26
    public function getFormClass(): string
27
    {
28
        return GmapType::class;
29
    }
30
}
31