SubscriptionSpec   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 7
eloc 12
dl 0
loc 39
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A it_gets_subscription_id() 0 4 1
A it_implements_subscription_interface() 0 3 1
A it_is_initializable() 0 3 1
A it_gets_customer_id() 0 4 1
A it_has_null_id_by_default() 0 3 1
A it_gets_state() 0 4 1
A it_gets_order() 0 4 1
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\SyliusMolliePlugin\Entity;
14
15
use BitBag\SyliusMolliePlugin\Entity\Subscription;
16
use BitBag\SyliusMolliePlugin\Entity\SubscriptionInterface;
17
use PhpSpec\ObjectBehavior;
18
use Sylius\Component\Core\Model\OrderInterface;
19
20
class SubscriptionSpec extends ObjectBehavior
21
{
22
    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...
23
    {
24
        $this->shouldHaveType(Subscription::class);
25
    }
26
27
    function it_implements_subscription_interface(): void
28
    {
29
        $this->shouldHaveType(SubscriptionInterface::class);
30
    }
31
32
    function it_has_null_id_by_default(): void
33
    {
34
        $this->getId()->shouldReturn(null);
0 ignored issues
show
Bug introduced by
The method getId() does not exist on spec\BitBag\SyliusMollie...Entity\SubscriptionSpec. 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
               getId()->shouldReturn(null);
Loading history...
35
    }
36
37
    function it_gets_order(OrderInterface $order): void
38
    {
39
        $this->setOrder($order);
0 ignored issues
show
Bug introduced by
The method setOrder() does not exist on spec\BitBag\SyliusMollie...Entity\SubscriptionSpec. 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
               setOrder($order);
Loading history...
40
        $this->getOrder()->shouldReturn($order);
0 ignored issues
show
Bug introduced by
The method getOrder() does not exist on spec\BitBag\SyliusMollie...Entity\SubscriptionSpec. 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
               getOrder()->shouldReturn($order);
Loading history...
41
    }
42
43
    function it_gets_state(): void
44
    {
45
        $this->setState('active');
0 ignored issues
show
Bug introduced by
The method setState() does not exist on spec\BitBag\SyliusMollie...Entity\SubscriptionSpec. 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
               setState('active');
Loading history...
46
        $this->getState()->shouldReturn('active');
0 ignored issues
show
Bug introduced by
The method getState() does not exist on spec\BitBag\SyliusMollie...Entity\SubscriptionSpec. 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
               getState()->shouldReturn('active');
Loading history...
47
    }
48
49
    function it_gets_subscription_id(): void
50
    {
51
        $this->setSubscriptionId('id_1');
0 ignored issues
show
Bug introduced by
The method setSubscriptionId() does not exist on spec\BitBag\SyliusMollie...Entity\SubscriptionSpec. 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

51
        $this->/** @scrutinizer ignore-call */ 
52
               setSubscriptionId('id_1');
Loading history...
52
        $this->getSubscriptionId()->shouldReturn('id_1');
0 ignored issues
show
Bug introduced by
The method getSubscriptionId() does not exist on spec\BitBag\SyliusMollie...Entity\SubscriptionSpec. 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

52
        $this->/** @scrutinizer ignore-call */ 
53
               getSubscriptionId()->shouldReturn('id_1');
Loading history...
53
    }
54
55
    function it_gets_customer_id(): void
56
    {
57
        $this->setCustomerId('id_1');
0 ignored issues
show
Bug introduced by
The method setCustomerId() does not exist on spec\BitBag\SyliusMollie...Entity\SubscriptionSpec. 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

57
        $this->/** @scrutinizer ignore-call */ 
58
               setCustomerId('id_1');
Loading history...
58
        $this->getCustomerId()->shouldReturn('id_1');
0 ignored issues
show
Bug introduced by
The method getCustomerId() does not exist on spec\BitBag\SyliusMollie...Entity\SubscriptionSpec. 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

58
        $this->/** @scrutinizer ignore-call */ 
59
               getCustomerId()->shouldReturn('id_1');
Loading history...
59
    }
60
}
61