Passed
Push — master ( cc4e78...1262d4 )
by Damian
04:08
created

ProductShortDescriptionBuilderSpec   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A it_is_initializable() 0 4 1
A it_consumes_event() 0 3 1
A let() 0 3 1
A it_implements_property_builder_interface() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace spec\BitBag\SyliusElasticsearchPlugin\PropertyBuilder;
6
7
use BitBag\SyliusElasticsearchPlugin\PropertyBuilder\AbstractBuilder;
8
use BitBag\SyliusElasticsearchPlugin\PropertyBuilder\ProductShortDescriptionBuilder;
9
use BitBag\SyliusElasticsearchPlugin\PropertyBuilder\PropertyBuilderInterface;
10
use BitBag\SyliusElasticsearchPlugin\PropertyNameResolver\ConcatedNameResolverInterface;
11
use FOS\ElasticaBundle\Event\TransformEvent;
12
use PhpSpec\ObjectBehavior;
13
14
final class ProductShortDescriptionBuilderSpec extends ObjectBehavior
15
{
16
    function let(ConcatedNameResolverInterface $productNameNameResolver): void
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
17
    {
18
        $this->beConstructedWith($productNameNameResolver);
19
    }
20
21
    function it_is_initializable(): void
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
22
    {
23
        $this->shouldHaveType(ProductShortDescriptionBuilder::class);
24
        $this->shouldHaveType(AbstractBuilder::class);
25
    }
26
27
    function it_implements_property_builder_interface(): void
28
    {
29
        $this->shouldHaveType(PropertyBuilderInterface::class);
30
    }
31
32
    function it_consumes_event(TransformEvent $event): void
33
    {
34
        $this->consumeEvent($event);
0 ignored issues
show
Bug introduced by
The method consumeEvent() does not exist on spec\BitBag\SyliusElasti...tDescriptionBuilderSpec. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

34
        $this->/** @scrutinizer ignore-call */ 
35
               consumeEvent($event);
Loading history...
35
    }
36
}
37