Completed
Pull Request — master (#97)
by Freek
01:07
created

ProjectsEvents::reset()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
namespace Spatie\EventSourcing\Projectors;
4
5
use Spatie\EventSourcing\EventHandlers\HandlesEvents;
6
7
trait ProjectsEvents
8
{
9
    use HandlesEvents;
10
11
    public function getName(): string
12
    {
13
        return $this->name ?? get_class($this);
14
    }
15
16
    public function shouldBeCalledImmediately(): bool
17
    {
18
        return ! $this instanceof QueuedProjector;
19
    }
20
}
21