OrderAmountSpec::it_is_initializable()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
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\SyliusQuadPayPlugin\Validator\Constraints;
14
15
use BitBag\SyliusQuadPayPlugin\Validator\Constraints\OrderAmount;
16
use PhpSpec\ObjectBehavior;
17
use Symfony\Component\Validator\Constraint;
18
19
final class OrderAmountSpec extends ObjectBehavior
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(OrderAmount::class);
24
    }
25
26
    function it_extends_constraint_class(): void
27
    {
28
        $this->shouldHaveType(Constraint::class);
29
    }
30
31
    function it_has_a_message(): void
32
    {
33
        $this->maximumAmountMessage->shouldReturn(null);
0 ignored issues
show
Bug Best Practice introduced by
The property maximumAmountMessage does not exist on spec\BitBag\SyliusQuadPa...traints\OrderAmountSpec. Since you implemented __get, consider adding a @property annotation.
Loading history...
34
        $this->minimumAmountMessage->shouldReturn(null);
0 ignored issues
show
Bug Best Practice introduced by
The property minimumAmountMessage does not exist on spec\BitBag\SyliusQuadPa...traints\OrderAmountSpec. Since you implemented __get, consider adding a @property annotation.
Loading history...
35
    }
36
37
    function it_is_validate_by_unique_user_email_validator(): void
38
    {
39
        $this->validatedBy()->shouldReturn('bitbag_sylius_quadpay_plugin_order_amount');
0 ignored issues
show
Bug introduced by
The method validatedBy() does not exist on spec\BitBag\SyliusQuadPa...traints\OrderAmountSpec. 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
               validatedBy()->shouldReturn('bitbag_sylius_quadpay_plugin_order_amount');
Loading history...
40
    }
41
42
    function it_has_targets(): void
43
    {
44
        $this->getTargets()->shouldReturn(Constraint::CLASS_CONSTRAINT);
0 ignored issues
show
Bug introduced by
The method getTargets() does not exist on spec\BitBag\SyliusQuadPa...traints\OrderAmountSpec. 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

44
        $this->/** @scrutinizer ignore-call */ 
45
               getTargets()->shouldReturn(Constraint::CLASS_CONSTRAINT);
Loading history...
45
    }
46
}
47