Skip to content

Commit 32b11ba

Browse files
committed
[BUGFIX] nullable type declaration
addition: CI should fail on cgl fail
1 parent 55d13ac commit 32b11ba

10 files changed

Lines changed: 16 additions & 10 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
public
22
composer.lock
33
vendor
4+
var
45
.php_cs.cache
56
.php-cs-fixer.cache
67
/.Build

Build/php-cs-fixer.php

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

33
$config = \TYPO3\CodingStandards\CsFixerConfig::create();
4-
$config->getFinder()->in(['Classes', 'Configuration']);
5-
$config->getFinder()->exclude(['var', 'public']);
4+
$config->getFinder()->exclude(['var', 'public', 'Build'])->in(__DIR__ . '/..');
5+
$config->addRules([
6+
'nullable_type_declaration' => [
7+
'syntax' => 'question_mark',
8+
],
9+
'nullable_type_declaration_for_default_null_value' => true,
10+
]);
611
return $config;

Build/testing-docker/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ services:
1515
set -x
1616
fi
1717
php -v | grep '^PHP';
18-
${CORE_ROOT}/.Build/bin/php-cs-fixer fix --config Build/php-cs-fixer.php
18+
${CORE_ROOT}/.Build/bin/php-cs-fixer fix --config Build/php-cs-fixer.php --dry-run --stop-on-violation --using-cache=no
1919
"
2020
2121
composer_update:

Classes/Command/CollectGarbageCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ final class CollectGarbageCommand extends Command
2323
{
2424
public function __construct(
2525
private readonly JobRepository $jobRepository,
26-
string $name = null
26+
?string $name = null
2727
) {
2828
parent::__construct($name);
2929
}

Classes/Command/JobCreatorCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct(
3030
private readonly ExtensionConfiguration $extensionConfiguration,
3131
private readonly ConfigurationValidator $validator,
3232
private readonly JobRepository $jobRepository,
33-
string $name = null
33+
?string $name = null
3434
) {
3535
parent::__construct($name);
3636
}

Classes/Command/JobKillerCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ final class JobKillerCommand extends Command
2323
{
2424
public function __construct(
2525
private readonly JobRepository $jobRepository,
26-
string $name = null
26+
?string $name = null
2727
) {
2828
parent::__construct($name);
2929
}

Classes/Command/RunnerCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct(
2828
private readonly ProcessRunner $processRunner,
2929
private readonly JobRepository $jobRepository,
3030
private readonly ConfigurationValidator $validator,
31-
string $name = null
31+
?string $name = null
3232
) {
3333
parent::__construct($name);
3434
}

Classes/Command/StatusReportCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class StatusReportCommand extends Command
2525
{
2626
public function __construct(
2727
private readonly StatusReportFactory $statusReportFactory,
28-
string $name = null
28+
?string $name = null
2929
) {
3030
parent::__construct($name);
3131
}

Classes/Domain/Model/Job.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function toDatabaseRow(): array
9090
'json_configuration' => $json,
9191
'created_time' => $this->createdTime->format('U'),
9292
'start_time' => $this->startTime ? $this->startTime->format('U') : 0,
93-
'end_time' => $this->endTime ? $this->endTime->format('U'): 0,
93+
'end_time' => $this->endTime ? $this->endTime->format('U') : 0,
9494
'error' => $this->error,
9595
];
9696
}

Classes/Event/BeforeProcessRunnerExecutesCommandsEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ final class BeforeProcessRunnerExecutesCommandsEvent
1818
{
1919
public int $timeoutPerProcess = 60;
2020

21-
public function __construct(
21+
public function __construct(
2222
public readonly Configuration $configuration,
2323
public array $commands
2424
) {}

0 commit comments

Comments
 (0)