Skip to content

Commit c0499dc

Browse files
committed
fixed coding standards
1 parent 087bc83 commit c0499dc

33 files changed

+44
-44
lines changed

rector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@
2929
$configurator->import(PHPUnitSetList::PHPUNIT_MOCK);
3030
$configurator->import(PHPUnitSetList::PHPUNIT_SPECIFIC_METHOD);
3131
$configurator->import(PHPUnitSetList::PHPUNIT_YIELD_DATA_PROVIDER);
32-
// $configurator->import(SetList::CODE_QUALITY);
32+
// $configurator->import(SetList::CODE_QUALITY);
3333
$configurator->import(SetList::EARLY_RETURN);
3434
$configurator->import(SetList::PHP_74);
3535
$configurator->import(SetList::PHP_80);
36-
// $configurator->import(SetList::PRIVATIZATION);
36+
// $configurator->import(SetList::PRIVATIZATION);
3737

3838
$parameters->set(Option::SKIP, [
3939
]);

src/Domain/Entity/EventSourcing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function registerAggregate(Event\Sourced\Aggregate $aggregate): void
4545
public function aggregateRoot(): Event\Sourced\AggregateRoot
4646
{
4747
if (null === $this->aggregateRoot) {
48-
throw new \BadMethodCallException(sprintf('Aggregate root no registered. Did you forget to run %s::registerAggregateRoot()?', static::class));
48+
throw new \BadMethodCallException(\sprintf('Aggregate root no registered. Did you forget to run %s::registerAggregateRoot()?', static::class));
4949
}
5050

5151
return $this->aggregateRoot;

src/Domain/Event/Envelope.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function set(string $name, $value): self
9292
throw new \InvalidArgumentException('Name of the attribute can not be empty.');
9393
}
9494
if (!\is_scalar($value)) {
95-
throw new \InvalidArgumentException(sprintf('Value for attribute "%s" is a scalar.', $name));
95+
throw new \InvalidArgumentException(\sprintf('Value for attribute "%s" is a scalar.', $name));
9696
}
9797

9898
$new = new self(

src/Domain/Event/Exception/EventNotSupported.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class EventNotSupported extends \InvalidArgumentException
2424
{
2525
public function __construct(private Event\Envelope $event, \Throwable $previous = null)
2626
{
27-
parent::__construct(sprintf('Event "%s" not supported.', $event->name()), 0, $previous);
27+
parent::__construct(\sprintf('Event "%s" not supported.', $event->name()), 0, $previous);
2828
}
2929

3030
public function event(): Event\Envelope

src/Domain/Event/Exception/NotSupportedType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct($value)
3030
} else {
3131
$type = \gettype($value);
3232
}
33-
parent::__construct(sprintf('Type %s is not supported for conversion!', $type));
33+
parent::__construct(\sprintf('Type %s is not supported for conversion!', $type));
3434
$this->value = $value;
3535
}
3636

src/Domain/Event/Exception/SourcingObjectWithEventFailed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class SourcingObjectWithEventFailed extends \BadMethodCallException
2424
{
2525
public function __construct(private object $subject, private Event\Envelope $event, \Throwable $previous = null)
2626
{
27-
$message = sprintf('Sourcing "%s" object with "%s" event failed.', $subject::class, $event->name());
27+
$message = \sprintf('Sourcing "%s" object with "%s" event failed.', $subject::class, $event->name());
2828

2929
parent::__construct($message, 0, $previous);
3030
}

src/Domain/Event/Listener/Filtering.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function filter(Event\Stream $stream): Event\Stream
6969

7070
// ...that is final...
7171
if (false === $parameter->isFinal()) {
72-
throw new \InvalidArgumentException(sprintf('Event class "%s" must be final in order to be used for stream filtering.', $parameter->getName()));
72+
throw new \InvalidArgumentException(\sprintf('Event class "%s" must be final in order to be used for stream filtering.', $parameter->getName()));
7373
}
7474

7575
$types[] = $parameter->getName();

src/Domain/Event/Listener/Listening.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function on(Event\Envelope $event): bool
104104
}
105105

106106
if (false === \is_bool($listenedTo)) {
107-
throw new \UnexpectedValueException(sprintf('Value returned by %s::%s($event) expected to be null or boolean, but %s was given.', $reflection->getShortName(), $method->getName(), \gettype($listenedTo)));
107+
throw new \UnexpectedValueException(\sprintf('Value returned by %s::%s($event) expected to be null or boolean, but %s was given.', $reflection->getShortName(), $method->getName(), \gettype($listenedTo)));
108108
}
109109

110110
return $listenedTo;

src/Domain/Event/Subscription/Exception/EventIgnored.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class EventIgnored extends \RuntimeException
2424
{
2525
public function __construct(private Event\Envelope $event)
2626
{
27-
$message = sprintf('Event "%s" was ignored.', $event->message()::class);
27+
$message = \sprintf('Event "%s" was ignored.', $event->message()::class);
2828

2929
parent::__construct($message);
3030
}

src/Domain/Event/Subscription/Exception/ListenerNotFound.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ListenerNotFound extends \RuntimeException
2424
{
2525
public function __construct(private Listener\Id $listenerId, \Throwable $previous = null)
2626
{
27-
$message = sprintf('Listener "%s@%s" not found.', $this->listenerId::class, $this->listenerId->toString());
27+
$message = \sprintf('Listener "%s@%s" not found.', $this->listenerId::class, $this->listenerId->toString());
2828

2929
parent::__construct($message, 0, $previous);
3030
}

0 commit comments

Comments
 (0)