Skip to content

Commit 3da14bd

Browse files
committed
* Fix CI
1 parent c5c7672 commit 3da14bd

11 files changed

Lines changed: 18 additions & 18 deletions

File tree

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
$config->setRules([
1010
'@Symfony' => true,
1111
'@Symfony:risky' => true,
12+
'@PHP8x2Migration:risky' => true,
1213
'@PSR12' => true,
1314
'array_syntax' => [
1415
'syntax' => 'short',

src/DataflowType/AbstractDataflowType.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
namespace CodeRhapsodie\DataflowBundle\DataflowType;
66

77
use CodeRhapsodie\DataflowBundle\Repository\JobRepository;
8-
use Psr\Log\LoggerAwareInterface;
98
use Psr\Log\LoggerAwareTrait;
109
use Psr\Log\LoggerInterface;
1110
use Symfony\Component\OptionsResolver\OptionsResolver;
1211

13-
abstract class AbstractDataflowType implements DataflowTypeInterface, LoggerAwareInterface, AutoUpdateCountInterface
12+
abstract class AbstractDataflowType implements DataflowTypeInterface, AutoUpdateCountInterface
1413
{
1514
use LoggerAwareTrait;
1615

@@ -36,7 +35,7 @@ public function process(array $options, ?int $jobId = null): Result
3635

3736
$builder = $this->createDataflowBuilder();
3837
$builder->setName($this->getLabel());
39-
$builder->addAfterItemProcessor(function (int|string $index, mixed $item, int $count) use ($jobId) {
38+
$builder->addAfterItemProcessor(function (int|string $index, mixed $item, int $count) use ($jobId): void {
4039
if ($jobId === null || $this->saveDate > new \DateTime()) {
4140
return;
4241
}

src/DataflowType/Dataflow/AMPAsyncDataflow.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ private function processState(mixed $state, int &$count, int &$countExceptions):
122122
$this->stepsJobs[$stepIndex][$readIndex] = true;
123123
/** @var Promise<void> $promise */
124124
$promise = coroutine($step)($item);
125-
$promise->onResolve(function (?\Throwable $exception = null, $newItem = null) use ($stepIndex, $readIndex, &$countExceptions) {
125+
$promise->onResolve(function (?\Throwable $exception = null, $newItem = null) use ($stepIndex, $readIndex, &$countExceptions): void {
126126
if ($exception) {
127127
++$countExceptions;
128128
$this->logException($exception, (string) $stepIndex);

src/DataflowType/Writer/CollectionWriter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ public function __construct(private readonly WriterInterface $writer)
1818
{
1919
}
2020

21-
public function prepare()
21+
public function prepare(): void
2222
{
2323
$this->writer->prepare();
2424
}
2525

26-
public function write($collection)
26+
public function write($collection): void
2727
{
2828
if (!is_iterable($collection)) {
2929
throw new UnsupportedItemTypeException(\sprintf('Item to write was expected to be an iterable, received %s.', get_debug_type($collection)));
@@ -34,7 +34,7 @@ public function write($collection)
3434
}
3535
}
3636

37-
public function finish()
37+
public function finish(): void
3838
{
3939
$this->writer->finish();
4040
}

src/DataflowType/Writer/DelegatorWriter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ public function __construct()
2121
{
2222
}
2323

24-
public function prepare()
24+
public function prepare(): void
2525
{
2626
foreach ($this->delegates as $delegate) {
2727
$delegate->prepare();
2828
}
2929
}
3030

31-
public function write($item)
31+
public function write($item): void
3232
{
3333
foreach ($this->delegates as $delegate) {
3434
if (!$delegate->supports($item)) {
@@ -43,7 +43,7 @@ public function write($item)
4343
throw new UnsupportedItemTypeException(\sprintf('None of the registered delegate writers support the received item of type %s', get_debug_type($item)));
4444
}
4545

46-
public function finish()
46+
public function finish(): void
4747
{
4848
foreach ($this->delegates as $delegate) {
4949
$delegate->finish();

src/DataflowType/Writer/PortWriterAdapter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ public function __construct(private readonly \Port\Writer $writer)
1010
{
1111
}
1212

13-
public function prepare()
13+
public function prepare(): void
1414
{
1515
$this->writer->prepare();
1616
}
1717

18-
public function write($item)
18+
public function write($item): void
1919
{
2020
$this->writer->writeItem((array) $item);
2121
}
2222

23-
public function finish()
23+
public function finish(): void
2424
{
2525
$this->writer->finish();
2626
}

src/Factory/ConnectionFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function __construct(private readonly Container $container, private strin
1717
{
1818
}
1919

20-
public function setConnectionName(string $connectionName)
20+
public function setConnectionName(string $connectionName): void
2121
{
2222
$this->connectionName = $connectionName;
2323
}

src/MessengerMode/JobMessageHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function __construct(private readonly JobRepository $repository, private
1515
{
1616
}
1717

18-
public function __invoke(JobMessage $message)
18+
public function __invoke(JobMessage $message): void
1919
{
2020
$this->processor->process($this->repository->find($message->getJobId()));
2121
}

src/Repository/JobRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function findForScheduled(int $id): iterable
116116
}
117117
}
118118

119-
public function save(Job $job)
119+
public function save(Job $job): void
120120
{
121121
$datas = $job->toArray();
122122
unset($datas['id']);

src/Repository/ScheduledDataflowRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function listAllOrderedByLabel(): array
8585
return $query->executeQuery()->fetchAllAssociative();
8686
}
8787

88-
public function save(ScheduledDataflow $scheduledDataflow)
88+
public function save(ScheduledDataflow $scheduledDataflow): void
8989
{
9090
$datas = $scheduledDataflow->toArray();
9191
unset($datas['id']);

0 commit comments

Comments
 (0)