Skip to content

Commit

Permalink
Apply coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
othillo committed Jun 18, 2023
1 parent 2473a40 commit 5d8b2bd
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 39 deletions.
6 changes: 0 additions & 6 deletions src/Metadata/Metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,13 @@ public function __construct(array $criteria)
$this->criteria = $criteria;
}

/**
* {@inheritdoc}
*/
public function handles(DomainMessage $domainMessage): bool
{
$eventName = $this->getClassName($domainMessage);

return isset($this->criteria[$eventName]);
}

/**
* {@inheritdoc}
*/
public function criteria(DomainMessage $domainMessage): ?Criteria
{
$eventName = $this->getClassName($domainMessage);
Expand Down
3 changes: 0 additions & 3 deletions src/Metadata/StaticallyConfiguredSagaMetadataFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@

class StaticallyConfiguredSagaMetadataFactory implements MetadataFactoryInterface
{
/**
* {@inheritdoc}
*/
public function create(SagaInterface $saga): MetadataInterface
{
$requiredInterface = StaticallyConfiguredSagaInterface::class;
Expand Down
3 changes: 0 additions & 3 deletions src/Saga.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@

abstract class Saga implements SagaInterface
{
/**
* {@inheritdoc}
*/
public function handle(DomainMessage $domainMessage, State $state): State
{
$method = $this->getHandleMethod($domainMessage);
Expand Down
12 changes: 0 additions & 12 deletions src/State.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,11 @@ public function __construct(string $id)
$this->id = $id;
}

/**
* @param mixed $value
*/
public function set(string $key, $value): void

Check failure on line 50 in src/State.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Broadway\Saga\State::set() has parameter $value with no type specified.

Check failure on line 50 in src/State.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Broadway\Saga\State::set() has parameter $value with no type specified.
{
$this->values[$key] = $value;
}

/**
* @return mixed
*/
public function get(string $key)

Check failure on line 55 in src/State.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Broadway\Saga\State::get() has no return type specified.

Check failure on line 55 in src/State.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Broadway\Saga\State::get() has no return type specified.
{
if (!isset($this->values[$key])) {
Expand Down Expand Up @@ -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']);
Expand Down
6 changes: 0 additions & 6 deletions src/State/InMemoryRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ class InMemoryRepository implements RepositoryInterface
*/
private $states = [];

/**
* {@inheritdoc}
*/
public function findOneBy(Criteria $criteria, string $sagaId): ?State
{
if (!isset($this->states[$sagaId])) {
Expand Down Expand Up @@ -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()) {
Expand Down
3 changes: 0 additions & 3 deletions src/State/StateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions src/Testing/Scenario.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ public function given(array $events = []): Scenario
return $this;
}

/**
* @param mixed $event
*/
public function when($event): Scenario

Check failure on line 77 in src/Testing/Scenario.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Broadway\Saga\Testing\Scenario::when() has parameter $event with no type specified.

Check failure on line 77 in src/Testing/Scenario.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Broadway\Saga\Testing\Scenario::when() has parameter $event with no type specified.
{
$this->traceableCommandBus->record();
Expand All @@ -93,9 +90,6 @@ public function then(array $commands): Scenario
return $this;
}

/**
* @param mixed $event
*/
private function createDomainMessageForEvent($event): DomainMessage

Check failure on line 93 in src/Testing/Scenario.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Broadway\Saga\Testing\Scenario::createDomainMessageForEvent() has parameter $event with no type specified.

Check failure on line 93 in src/Testing/Scenario.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Broadway\Saga\Testing\Scenario::createDomainMessageForEvent() has parameter $event with no type specified.
{
++$this->playhead;
Expand Down

0 comments on commit 5d8b2bd

Please sign in to comment.