Skip to content

Commit 21f6bc6

Browse files
committed
Fixed coding styles and some phpstan errors
1 parent fffd290 commit 21f6bc6

3 files changed

Lines changed: 18 additions & 7 deletions

File tree

src/bundle/Core/Message/PublishContentAsync.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?php
22

3+
/**
4+
* @copyright Copyright (C) Ibexa AS. All rights reserved.
5+
* @license For full copyright and license information view LICENSE file distributed with this source code.
6+
*/
37
declare(strict_types=1);
48

59
namespace Ibexa\Bundle\Core\Message;
@@ -11,8 +15,8 @@
1115
public function __construct(
1216
public int $contentId,
1317
public int $versionNo,
14-
array $translations = Language::ALL,
15-
)
16-
{
18+
/** @var list<string> */
19+
public array $translations = Language::ALL,
20+
) {
1721
}
1822
}

src/bundle/Core/Message/PublishContentAsyncHandler.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
<?php
22

3+
/**
4+
* @copyright Copyright (C) Ibexa AS. All rights reserved.
5+
* @license For full copyright and license information view LICENSE file distributed with this source code.
6+
*/
37
declare(strict_types=1);
48

59
namespace Ibexa\Bundle\Core\Message;
610

711
use Ibexa\Contracts\Core\Repository\ContentService;
8-
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
912

1013
final class PublishContentAsyncHandler
1114
{
1215
public function __construct(
1316
private ContentService $contentService,
14-
)
15-
{
17+
) {
1618
}
1719

18-
public function __invoke(PublishContentAsync $message)
20+
public function __invoke(PublishContentAsync $message): void
1921
{
2022
$versionInfo = $this->contentService->loadVersionInfoById($message->contentId, $message->versionNo);
2123

src/bundle/Core/Messenger/MessageProvider.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
<?php
22

3+
/**
4+
* @copyright Copyright (C) Ibexa AS. All rights reserved.
5+
* @license For full copyright and license information view LICENSE file distributed with this source code.
6+
*/
37
declare(strict_types=1);
48

59
namespace Ibexa\Bundle\Core\Messenger;
610

711
use Ibexa\Bundle\Core\Message\PublishContentAsync;
12+
// TODO circular dependency on ibexa/messenger !!!
813
use Ibexa\Contracts\Messenger\Transport\MessageProviderInterface;
914

1015
final class MessageProvider implements MessageProviderInterface

0 commit comments

Comments
 (0)