Test Failed
Push — master ( e46311...6bec89 )
by Hannes
02:05
created

CodeBlockSpec   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A it_can_prepend_code() 0 3 1
A let() 0 3 1
A it_contains_code() 0 3 1
A it_is_initializable() 0 3 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace spec\hanneskod\readmetester\Utils;
6
7
use hanneskod\readmetester\Utils\CodeBlock;
8
use PhpSpec\ObjectBehavior;
0 ignored issues
show
Bug introduced by
The type PhpSpec\ObjectBehavior 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 Prophecy\Argument;
0 ignored issues
show
Bug introduced by
The type Prophecy\Argument 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 CodeBlockSpec 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('foo');
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(CodeBlock::CLASS);
0 ignored issues
show
Bug introduced by
The constant hanneskod\readmetester\Utils\CodeBlock::CLASS was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
21
    }
22
23
    function it_contains_code()
24
    {
25
        $this->getCode()->shouldReturn('foo');
26
    }
27
28
    function it_can_prepend_code()
29
    {
30
        $this->prepend(new CodeBlock('bar:'))->shouldBeLike(new CodeBlock('bar:foo'));
31
    }
32
}
33