Completed
Push — master ( be64af...0c34b7 )
by Oscar
02:42
created

MoreItems::getScheme()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 7
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 7
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
namespace Demo\Entities;
4
5
use Folk\Entities\YamlEntity;
6
use FormManager\Builder;
7
8 View Code Duplication
class MoreItems extends YamlEntity
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10
    protected function getBasePath()
11
    {
12
        return __DIR__.'/yaml';
13
    }
14
15
    public function getScheme(Builder $builder)
16
    {
17
        return $builder->group([
18
            'name' => $builder->text()->label('Name'),
19
            'text' => $builder->html()->label('Text'),
20
        ]);
21
    }
22
23
    public function getId(array $data)
24
    {
25
        return $data['name'];
26
    }
27
}
28