TransformerAttributeProcessor::methodName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace Bdf\Form\Attribute\Processor\Element;
4
5
use Bdf\Form\Child\ChildBuilderInterface;
6
use Bdf\Form\ElementBuilderInterface;
7
use Bdf\Form\Transformer\TransformerInterface;
8
9
/**
10
 * Add the transformer by calling transformer()
11
 *
12
 * @see ElementBuilderInterface::transformer()
13
 * @see TransformerInterface
14
 *
15
 * @implements ElementAttributeProcessorInterface<TransformerInterface>
16
 */
17
final class TransformerAttributeProcessor implements ElementAttributeProcessorInterface
18
{
19
    use SimpleMethodCallGeneratorTrait;
20
21
    /**
22
     * {@inheritdoc}
23
     */
24 50
    public function type(): string
25
    {
26 50
        return TransformerInterface::class;
27
    }
28
29
    /**
30
     * {@inheritdoc}
31
     */
32 2
    public function process(ChildBuilderInterface $builder, object $attribute): void
33
    {
34 2
        $builder->transformer($attribute);
35
    }
36
37
    /**
38
     * {@inheritdoc}
39
     */
40 3
    private function methodName(): string
0 ignored issues
show
Unused Code introduced by
The method methodName() is not used, and could be removed.

This check looks for private methods that have been defined, but are not used inside the class.

Loading history...
41
    {
42 3
        return 'transformer';
43
    }
44
}
45