Skip to content

Commit 69342a1

Browse files
authored
Updated codebase to PHP 8.0 (#53)
1 parent 4a11cdc commit 69342a1

File tree

4 files changed

+8
-16
lines changed

4 files changed

+8
-16
lines changed

docs/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ final class ImportUsersJob extends ItemJob
100100
JobExecutionStorageInterface $executionStorage,
101101
ManagerRegistry $doctrine,
102102
DenormalizerInterface $denormalizer,
103-
KernelInterface $kernel
103+
KernelInterface $kernel,
104104
) {
105105
parent::__construct(
106106
500,

src/ContainerParameterAccessor.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,16 @@
1515
*/
1616
final class ContainerParameterAccessor implements JobParameterAccessorInterface
1717
{
18-
private ContainerInterface $container;
19-
private string $name;
20-
21-
public function __construct(ContainerInterface $container, string $name)
22-
{
23-
$this->container = $container;
24-
$this->name = $name;
18+
public function __construct(
19+
private ContainerInterface $container,
20+
private string $name,
21+
) {
2522
}
2623

2724
/**
2825
* @inheritdoc
2926
*/
30-
public function get(JobExecution $execution)
27+
public function get(JobExecution $execution): mixed
3128
{
3229
try {
3330
return $this->container->getParameter($this->name);

src/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function getConfigTreeBuilder(): TreeBuilder
2020

2121
$root
2222
->children()
23-
->append($this->storage())
23+
->append($this->storage())
2424
->end()
2525
;
2626

src/DependencyInjection/YokaiBatchExtension.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,7 @@ private function configureStorage(ContainerBuilder $container, array $config): v
102102
} else {
103103
$container
104104
->register('yokai_batch.storage.filesystem', FilesystemJobExecutionStorage::class)
105-
->setArguments(
106-
[
107-
new Reference($config['filesystem']['serializer']),
108-
$config['filesystem']['dir'],
109-
]
110-
)
105+
->setArguments([new Reference($config['filesystem']['serializer']), $config['filesystem']['dir']])
111106
;
112107

113108
$defaultStorage = 'yokai_batch.storage.filesystem';

0 commit comments

Comments
 (0)