Skip to content

Commit 4a9ba6b

Browse files
committed
chore: Apply fixes from PHP CS Fixer and PHPStan.
1 parent 963c28c commit 4a9ba6b

File tree

5 files changed

+7
-10
lines changed

5 files changed

+7
-10
lines changed

src/Infrastructure/Doctrine/Paginator.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ class Paginator implements PaginatorInterface
2828
*/
2929
public function __construct(
3030
private readonly OrmPaginator $ormPaginator,
31-
)
32-
{
31+
) {
3332
$query = $this->ormPaginator->getQuery();
3433
$firstResult = $query->getFirstResult();
3534
$maxResults = $query->getMaxResults();

src/Infrastructure/Doctrine/Repository.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ public function collect(): Collection
6565
public function paginate(
6666
int $itemsPerPage,
6767
int $currentPage = 1
68-
): Paginator
69-
{
68+
): Paginator {
7069
$repository = $this->filter(
7170
function (QueryBuilder $queryBuilder) use (
72-
$itemsPerPage, $currentPage
71+
$itemsPerPage,
72+
$currentPage
7373
) {
7474
$queryBuilder
7575
->setFirstResult($itemsPerPage * ($currentPage - 1))->setMaxResults($itemsPerPage);

src/Support/Traits/DispatchableTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ trait DispatchableTrait
2424
/**
2525
* @see GeekCell\Ddd\Contracts\Core\Dispatchable
2626
*/
27-
public function dispatch(object $event)
27+
public function dispatch(object $event): void
2828
{
2929
Assertion::isInstanceOf($event, DomainEvent::class);
3030
$this->getEventDispatcher()->dispatch($event);

tests/Unit/Infrastructure/Messenger/CommandBusTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ public function testDispatch(): void
5050
private function createMessageBus(
5151
string $type,
5252
callable $handler
53-
): MessageBus
54-
{
53+
): MessageBus {
5554
return new MessageBus([
5655
new HandleMessageMiddleware(new HandlersLocator([
5756
$type => [$handler],

tests/Unit/Infrastructure/Messenger/QueryBusTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ public function testDispatch(): void
5050
private function createMessageBus(
5151
string $type,
5252
callable $handler
53-
): MessageBus
54-
{
53+
): MessageBus {
5554
return new MessageBus([
5655
new HandleMessageMiddleware(new HandlersLocator([
5756
$type => [$handler],

0 commit comments

Comments
 (0)