Passed
Pull Request — master (#51)
by Konrad
06:30 queued 02:46
created

ItemSpec::let()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 0
dl 0
loc 9
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file has been created by developers from BitBag.
5
 * Feel free to contact us once you face any issues or want to start
6
 * another great project.
7
 * You can find more information about us on https://bitbag.shop and write us
8
 * an email on [email protected].
9
 */
10
11
declare(strict_types=1);
12
13
namespace spec\BitBag\SyliusElasticsearchPlugin\Controller\Response\DTO;
14
15
use PhpSpec\ObjectBehavior;
16
17
final class ItemSpec extends ObjectBehavior
18
{
19
    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...
20
    {
21
        $this->beConstructedWith(
22
            'Super cars',
23
            'McLaren F1',
24
            'Very quirky super-car',
25
            '/mc-laren/f1',
26
            '$22,000,000.00',
27
            ''
28
        );
29
    }
30
31
    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...
32
    {
33
        $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

33
        $this->/** @scrutinizer ignore-call */ 
34
               toArray()->shouldReturn([
Loading history...
34
            'taxon_name' => 'Super cars',
35
            'name' => 'McLaren F1',
36
            'description' => 'Very quirky super-car',
37
            'slug' => '/mc-laren/f1',
38
            'price' => '$22,000,000.00',
39
            'image' => '',
40
        ]);
41
    }
42
43
    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...
44
    {
45
        $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

45
        $this->/** @scrutinizer ignore-call */ 
46
               taxonName()->shouldReturn('Super cars');
Loading history...
46
        $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

46
        $this->/** @scrutinizer ignore-call */ 
47
               name()->shouldReturn('McLaren F1');
Loading history...
47
        $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

47
        $this->/** @scrutinizer ignore-call */ 
48
               description()->shouldReturn('Very quirky super-car');
Loading history...
48
        $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

48
        $this->/** @scrutinizer ignore-call */ 
49
               slug()->shouldReturn('/mc-laren/f1');
Loading history...
49
        $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

49
        $this->/** @scrutinizer ignore-call */ 
50
               price()->shouldReturn('$22,000,000.00');
Loading history...
50
        $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

50
        $this->/** @scrutinizer ignore-call */ 
51
               image()->shouldReturn('');
Loading history...
51
    }
52
}
53