PizzaWasBaked::fromCommand()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
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