PizzaWasBaked   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 10
Bugs 0 Features 2
Metric Value
eloc 5
c 10
b 0
f 2
dl 0
loc 13
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A fromCommand() 0 3 1
A conflictsWith() 0 3 1
1
<?php declare(strict_types=1);
2
/**
3
 * This file is part of the daikon-cqrs/event-sourcing project.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
namespace Daikon\Tests\EventSourcing\Aggregate\Mock;
10
11
use Daikon\EventSourcing\Aggregate\Event\AnnotatesDomainEvent;
12
use Daikon\EventSourcing\Aggregate\Event\DomainEventInterface;
13
14
/**
15
 * @codeCoverageIgnore
16
 */
17
final class PizzaWasBaked implements DomainEventInterface
18
{
19
    use AnnotatesDomainEvent;
20
    use BakeMessageTrait;
21
22
    public static function fromCommand(BakePizza $bakePizza): self
23
    {
24
        return self::fromNative($bakePizza->toNative());
0 ignored issues
show
Bug Best Practice introduced by
The expression return self::fromNative($bakePizza->toNative()) returns the type Daikon\Interop\FromToNativeTrait which includes types incompatible with the type-hinted return Daikon\Tests\EventSourci...gate\Mock\PizzaWasBaked.
Loading history...
25
    }
26
27
    public function conflictsWith(DomainEventInterface $otherEvent): bool
28
    {
29
        return false;
30
    }
31
}
32