Completed
Pull Request — master (#51)
by Konrad
03:32
created

ItemSpec   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 21
dl 0
loc 34
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A it_returns_an_array() 0 9 1
A it_returns_values() 0 8 1
A let() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace spec\BitBag\SyliusElasticsearchPlugin\Controller\Response\DTO;
6
7
use PhpSpec\ObjectBehavior;
8
9
final class ItemSpec extends ObjectBehavior
10
{
11
    function let(): 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...
12
    {
13
        $this->beConstructedWith(
14
            'Super cars',
15
            'McLaren F1',
16
            'Very quirky super-car',
17
            '/mc-laren/f1',
18
            '$22,000,000.00',
19
            ''
20
        );
21
    }
22
23
    function it_returns_an_array(): 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...
24
    {
25
        $this->toArray()->shouldReturn([
0 ignored issues
show
Bug introduced by
The method toArray() does not exist on spec\BitBag\SyliusElasti...r\Response\DTO\ItemSpec. 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

25
        $this->/** @scrutinizer ignore-call */ 
26
               toArray()->shouldReturn([
Loading history...
26
            'taxon_name' => 'Super cars',
27
            'name' => 'McLaren F1',
28
            'description' => 'Very quirky super-car',
29
            'slug' => '/mc-laren/f1',
30
            'price' => '$22,000,000.00',
31
            'image' => '',
32
        ]);
33
    }
34
35
    function it_returns_values(): 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...
36
    {
37
        $this->taxonName()->shouldReturn('Super cars');
0 ignored issues
show
Bug introduced by
The method taxonName() does not exist on spec\BitBag\SyliusElasti...r\Response\DTO\ItemSpec. 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

37
        $this->/** @scrutinizer ignore-call */ 
38
               taxonName()->shouldReturn('Super cars');
Loading history...
38
        $this->name()->shouldReturn('McLaren F1');
0 ignored issues
show
Bug introduced by
The method name() does not exist on spec\BitBag\SyliusElasti...r\Response\DTO\ItemSpec. 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

38
        $this->/** @scrutinizer ignore-call */ 
39
               name()->shouldReturn('McLaren F1');
Loading history...
39
        $this->description()->shouldReturn('Very quirky super-car');
0 ignored issues
show
Bug introduced by
The method description() does not exist on spec\BitBag\SyliusElasti...r\Response\DTO\ItemSpec. 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

39
        $this->/** @scrutinizer ignore-call */ 
40
               description()->shouldReturn('Very quirky super-car');
Loading history...
40
        $this->slug()->shouldReturn('/mc-laren/f1');
0 ignored issues
show
Bug introduced by
The method slug() does not exist on spec\BitBag\SyliusElasti...r\Response\DTO\ItemSpec. 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

40
        $this->/** @scrutinizer ignore-call */ 
41
               slug()->shouldReturn('/mc-laren/f1');
Loading history...
41
        $this->price()->shouldReturn('$22,000,000.00');
0 ignored issues
show
Bug introduced by
The method price() does not exist on spec\BitBag\SyliusElasti...r\Response\DTO\ItemSpec. 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

41
        $this->/** @scrutinizer ignore-call */ 
42
               price()->shouldReturn('$22,000,000.00');
Loading history...
42
        $this->image()->shouldReturn('');
0 ignored issues
show
Bug introduced by
The method image() does not exist on spec\BitBag\SyliusElasti...r\Response\DTO\ItemSpec. 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

42
        $this->/** @scrutinizer ignore-call */ 
43
               image()->shouldReturn('');
Loading history...
43
    }
44
}
45