Completed
Push — master ( a0580c...57df1c )
by Tomasz
01:44
created

ShardSpec   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A it_is_initializable() 0 3 1
A let() 0 5 1
A it_should_have_acceptable_source() 0 3 1
A it_should_have_key() 0 3 1
A it_should_have_uuid() 0 3 1
1
<?php
2
3
namespace spec\Aggrego\Domain\Model\InitialBoard\Entity;
4
5
use PhpSpec\ObjectBehavior;
6
use Aggrego\Domain\Model\InitialBoard\Entity\Shard;
0 ignored issues
show
Bug introduced by
The type Aggrego\Domain\Model\InitialBoard\Entity\Shard was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use Aggrego\Domain\ValueObject\Key;
0 ignored issues
show
Bug introduced by
The type Aggrego\Domain\ValueObject\Key was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use Aggrego\Domain\ValueObject\Source;
0 ignored issues
show
Bug introduced by
The type Aggrego\Domain\ValueObject\Source was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
use Aggrego\Domain\ValueObject\Uuid;
0 ignored issues
show
Bug introduced by
The type Aggrego\Domain\ValueObject\Uuid was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
10
11
class ShardSpec extends ObjectBehavior
12
{
13
    function let(Uuid $uuid, Key $key, Source $source)
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
        $key->getValue()->willReturn(['init']);
16
        $source->__toString()->willReturn('test:1.0');
17
        $this->beConstructedWith($uuid, $source, $key);
18
    }
19
20
    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...
21
    {
22
        $this->shouldHaveType(Shard::class);
23
    }
24
25
    function it_should_have_uuid()
26
    {
27
        $this->getUuid()->shouldBeAnInstanceOf(Uuid::class);
0 ignored issues
show
Bug introduced by
The method getUuid() does not exist on spec\Aggrego\Domain\Mode...lBoard\Entity\ShardSpec. 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

27
        $this->/** @scrutinizer ignore-call */ 
28
               getUuid()->shouldBeAnInstanceOf(Uuid::class);
Loading history...
28
    }
29
30
    function it_should_have_key()
31
    {
32
        $this->getKey()->shouldBeAnInstanceOf(Key::class);
0 ignored issues
show
Bug introduced by
The method getKey() does not exist on spec\Aggrego\Domain\Mode...lBoard\Entity\ShardSpec. 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

32
        $this->/** @scrutinizer ignore-call */ 
33
               getKey()->shouldBeAnInstanceOf(Key::class);
Loading history...
33
    }
34
35
    function it_should_have_acceptable_source()
36
    {
37
        $this->getAcceptableSource()->shouldBeAnInstanceOf(Source::class);
0 ignored issues
show
Bug introduced by
The method getAcceptableSource() does not exist on spec\Aggrego\Domain\Mode...lBoard\Entity\ShardSpec. 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
               getAcceptableSource()->shouldBeAnInstanceOf(Source::class);
Loading history...
38
    }
39
}
40