Issues (27)

spec/Domain/AbstractEventSpec.php (3 issues)

1
<?php
2
3
/**
4
 * This file is part of slick/event package
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace spec\Slick\Event\Domain;
11
12
use Cassandra\Date;
13
use DateTimeImmutable;
14
use Slick\Event\Domain\AbstractEvent;
15
use PhpSpec\ObjectBehavior;
16
use Slick\Event\Domain\EventId;
17
use Slick\Event\Event;
18
19
/**
20
 * AbstractEventSpec specs
21
 *
22
 * @package spec\Slick\Event\Domain
23
 */
24
class AbstractEventSpec extends ObjectBehavior
25
{
26
27
    function let()
0 ignored issues
show
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...
28
    {
29
        $this->beAnInstanceOf(TestEvent::class);
30
    }
31
32
    function it_is_initializable()
33
    {
34
        $this->shouldHaveType(AbstractEvent::class);
35
    }
36
37
    function it_has_an_event_id()
38
    {
39
        $this->eventId()->shouldBeAnInstanceOf(EventId::class);
0 ignored issues
show
The method eventId() does not exist on spec\Slick\Event\Domain\AbstractEventSpec. 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
               eventId()->shouldBeAnInstanceOf(EventId::class);
Loading history...
40
    }
41
42
    function it_has_an_occurrence_date_and_time()
43
    {
44
        $this->occurredOn()->shouldBeAnInstanceOf(DateTimeImmutable::class);
0 ignored issues
show
The method occurredOn() does not exist on spec\Slick\Event\Domain\AbstractEventSpec. 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
               occurredOn()->shouldBeAnInstanceOf(DateTimeImmutable::class);
Loading history...
45
    }
46
}
47
48
class TestEvent extends AbstractEvent implements Event
49
{
50
51
}