From 5d8b2bd50a8990c24706b2fea4f55692cba77f4c Mon Sep 17 00:00:00 2001 From: othillo Date: Sun, 18 Jun 2023 06:15:46 +0000 Subject: [PATCH] Apply coding standards --- src/Metadata/Metadata.php | 6 ------ .../StaticallyConfiguredSagaMetadataFactory.php | 3 --- src/Saga.php | 3 --- src/State.php | 12 ------------ src/State/InMemoryRepository.php | 6 ------ src/State/StateManager.php | 3 --- src/Testing/Scenario.php | 6 ------ 7 files changed, 39 deletions(-) diff --git a/src/Metadata/Metadata.php b/src/Metadata/Metadata.php index e1a5041..4a9d6dd 100644 --- a/src/Metadata/Metadata.php +++ b/src/Metadata/Metadata.php @@ -29,9 +29,6 @@ public function __construct(array $criteria) $this->criteria = $criteria; } - /** - * {@inheritdoc} - */ public function handles(DomainMessage $domainMessage): bool { $eventName = $this->getClassName($domainMessage); @@ -39,9 +36,6 @@ public function handles(DomainMessage $domainMessage): bool return isset($this->criteria[$eventName]); } - /** - * {@inheritdoc} - */ public function criteria(DomainMessage $domainMessage): ?Criteria { $eventName = $this->getClassName($domainMessage); diff --git a/src/Metadata/StaticallyConfiguredSagaMetadataFactory.php b/src/Metadata/StaticallyConfiguredSagaMetadataFactory.php index 56f3471..94a53f9 100644 --- a/src/Metadata/StaticallyConfiguredSagaMetadataFactory.php +++ b/src/Metadata/StaticallyConfiguredSagaMetadataFactory.php @@ -18,9 +18,6 @@ class StaticallyConfiguredSagaMetadataFactory implements MetadataFactoryInterface { - /** - * {@inheritdoc} - */ public function create(SagaInterface $saga): MetadataInterface { $requiredInterface = StaticallyConfiguredSagaInterface::class; diff --git a/src/Saga.php b/src/Saga.php index 21c47f9..dda1c9d 100644 --- a/src/Saga.php +++ b/src/Saga.php @@ -17,9 +17,6 @@ abstract class Saga implements SagaInterface { - /** - * {@inheritdoc} - */ public function handle(DomainMessage $domainMessage, State $state): State { $method = $this->getHandleMethod($domainMessage); diff --git a/src/State.php b/src/State.php index ef97026..50d6dca 100644 --- a/src/State.php +++ b/src/State.php @@ -47,17 +47,11 @@ public function __construct(string $id) $this->id = $id; } - /** - * @param mixed $value - */ public function set(string $key, $value): void { $this->values[$key] = $value; } - /** - * @return mixed - */ public function get(string $key) { if (!isset($this->values[$key])) { @@ -90,17 +84,11 @@ public function isDone(): bool return $this->done; } - /** - * {@inheritdoc} - */ public function serialize(): array { return ['id' => $this->getId(), 'values' => $this->values, 'done' => $this->isDone()]; } - /** - * {@inheritdoc} - */ public static function deserialize(array $data): State { $state = new State($data['id']); diff --git a/src/State/InMemoryRepository.php b/src/State/InMemoryRepository.php index 9baf671..bc2bf58 100644 --- a/src/State/InMemoryRepository.php +++ b/src/State/InMemoryRepository.php @@ -22,9 +22,6 @@ class InMemoryRepository implements RepositoryInterface */ private $states = []; - /** - * {@inheritdoc} - */ public function findOneBy(Criteria $criteria, string $sagaId): ?State { if (!isset($this->states[$sagaId])) { @@ -54,9 +51,6 @@ public function findOneBy(Criteria $criteria, string $sagaId): ?State return null; } - /** - * {@inheritdoc} - */ public function save(State $state, string $sagaId): void { if ($state->isDone()) { diff --git a/src/State/StateManager.php b/src/State/StateManager.php index d140347..060cbf8 100644 --- a/src/State/StateManager.php +++ b/src/State/StateManager.php @@ -34,9 +34,6 @@ public function __construct(RepositoryInterface $repository, UuidGeneratorInterf $this->generator = $generator; } - /** - * {@inheritdoc} - */ public function findOneBy(?Criteria $criteria, string $sagaId): ?State { // TODO: Use CreationPolicy to determine whether and how a new state should be created diff --git a/src/Testing/Scenario.php b/src/Testing/Scenario.php index 6337b50..b0392ed 100644 --- a/src/Testing/Scenario.php +++ b/src/Testing/Scenario.php @@ -74,9 +74,6 @@ public function given(array $events = []): Scenario return $this; } - /** - * @param mixed $event - */ public function when($event): Scenario { $this->traceableCommandBus->record(); @@ -93,9 +90,6 @@ public function then(array $commands): Scenario return $this; } - /** - * @param mixed $event - */ private function createDomainMessageForEvent($event): DomainMessage { ++$this->playhead;