TestExtension   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A buildSchema() 0 4 1
A getName() 0 4 1
1
<?php
2
3
namespace Psi\Bundle\Description\Example\src;
4
5
use Psi\Component\Description\Descriptor\StringDescriptor;
6
use Psi\Component\Description\Schema\Builder;
7
use Psi\Component\Description\Schema\ExtensionInterface;
8
9
class TestExtension implements ExtensionInterface
10
{
11
    /**
12
     * {@inheritdoc}
13
     */
14
    public function buildSchema(Builder $builder)
15
    {
16
        $builder->add('title', StringDescriptor::class, 'Example title');
17
    }
18
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function getName()
23
    {
24
        return 'example';
25
    }
26
}
27