cubiche /
event-sourcing
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | /** |
||
| 4 | * This file is part of the Cubiche package. |
||
| 5 | * |
||
| 6 | * Copyright (c) Cubiche |
||
| 7 | * |
||
| 8 | * For the full copyright and license information, please view the LICENSE |
||
| 9 | * file that was distributed with this source code. |
||
| 10 | */ |
||
| 11 | |||
| 12 | namespace Cubiche\Domain\EventSourcing; |
||
| 13 | |||
| 14 | use Cubiche\Domain\EventPublisher\DomainEvent as BaseDomainEvent; |
||
| 15 | use Cubiche\Domain\Model\IdInterface; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * DomainEvent class. |
||
| 19 | * |
||
| 20 | * @author Ivannis Suárez Jerez <[email protected]> |
||
| 21 | */ |
||
| 22 | class DomainEvent extends BaseDomainEvent implements DomainEventInterface |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * EntityDomainEvent constructor. |
||
| 26 | * |
||
| 27 | * @param IdInterface $aggregateId |
||
| 28 | */ |
||
| 29 | public function __construct(IdInterface $aggregateId) |
||
| 30 | { |
||
| 31 | parent::__construct(); |
||
| 32 | |||
| 33 | $this->setMetadata('aggregateId', $aggregateId); |
||
|
0 ignored issues
–
show
|
|||
| 34 | $this->setMetadata('eventId', DomainEventId::next()); |
||
|
0 ignored issues
–
show
The method
setMetadata() does not seem to exist on object<Cubiche\Domain\EventSourcing\DomainEvent>.
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||
| 35 | $this->setVersion(0); |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | public function eventId() |
||
| 42 | { |
||
| 43 | return $this->getMetadata('eventId'); |
||
|
0 ignored issues
–
show
The method
getMetadata() does not seem to exist on object<Cubiche\Domain\EventSourcing\DomainEvent>.
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * {@inheritdoc} |
||
| 48 | */ |
||
| 49 | public function aggregateId() |
||
| 50 | { |
||
| 51 | return $this->getMetadata('aggregateId'); |
||
|
0 ignored issues
–
show
The method
getMetadata() does not seem to exist on object<Cubiche\Domain\EventSourcing\DomainEvent>.
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * {@inheritdoc} |
||
| 56 | */ |
||
| 57 | public function version() |
||
| 58 | { |
||
| 59 | return $this->getMetadata('version'); |
||
|
0 ignored issues
–
show
The method
getMetadata() does not seem to exist on object<Cubiche\Domain\EventSourcing\DomainEvent>.
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * {@inheritdoc} |
||
| 64 | */ |
||
| 65 | public function setVersion($version) |
||
| 66 | { |
||
| 67 | $this->setMetadata('version', $version); |
||
|
0 ignored issues
–
show
The method
setMetadata() does not seem to exist on object<Cubiche\Domain\EventSourcing\DomainEvent>.
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||
| 68 | } |
||
| 69 | } |
||
| 70 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.