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
|
|||||||
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
![]() |
|||||||
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
![]() |
|||||||
45 | } |
||||||
46 | } |
||||||
47 | |||||||
48 | class TestEvent extends AbstractEvent implements Event |
||||||
49 | { |
||||||
50 | |||||||
51 | } |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.