DictionarySpec::let()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace spec\Knp\DictionaryBundle\Validator\Constraints;
6
7
use Knp\DictionaryBundle\Validator\Constraints\Dictionary;
8
use Knp\DictionaryBundle\Validator\Constraints\DictionaryValidator;
9
use PhpSpec\ObjectBehavior;
10
11
final class DictionarySpec extends ObjectBehavior
12
{
13
    function let()
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...
14
    {
15
        $this->beConstructedWith(['name' => 'yolo']);
16
    }
17
18
    function it_is_initializable()
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...
19
    {
20
        $this->shouldHaveType(Dictionary::class);
21
    }
22
23
    function it_adds_default_values()
24
    {
25
        $this->name->shouldReturn('yolo');
0 ignored issues
show
Bug Best Practice introduced by
The property name does not exist on spec\Knp\DictionaryBundl...straints\DictionarySpec. Since you implemented __get, consider adding a @property annotation.
Loading history...
26
        $this->validatedBy()->shouldReturn(DictionaryValidator::class);
0 ignored issues
show
Bug introduced by
The method validatedBy() does not exist on spec\Knp\DictionaryBundl...straints\DictionarySpec. 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

26
        $this->/** @scrutinizer ignore-call */ 
27
               validatedBy()->shouldReturn(DictionaryValidator::class);
Loading history...
27
    }
28
}
29