Skip to content

Commit 4d96e4e

Browse files
committed
4565: Applied coding standards
1 parent cb17e47 commit 4d96e4e

File tree

3 files changed

+6
-16
lines changed

3 files changed

+6
-16
lines changed

composer.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,6 @@
131131
"fixtures-load": [
132132
"bin/console hautelook:fixtures:load --no-interaction"
133133
],
134-
"prepare-code": [
135-
"bin/console doctrine:schema:validate",
136-
"@coding-standards-apply",
137-
"vendor/bin/rector",
138-
"vendor/bin/psalm --no-cache",
139-
"@test-setup",
140-
"@test"
141-
],
142134
"test": [
143135
"vendor/bin/phpunit --stop-on-failure"
144136
],

src/Command/UpdateCommand.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@
1919
)]
2020
class UpdateCommand extends Command
2121
{
22-
private TemplateService $templateService;
23-
24-
public function __construct(TemplateService $templateService, ?string $name = null)
25-
{
22+
public function __construct(
23+
private readonly TemplateService $templateService,
24+
?string $name = null
25+
) {
2626
parent::__construct($name);
27-
$this->templateService = $templateService;
2827
}
2928

3029
final protected function execute(InputInterface $input, OutputInterface $output): int

src/Command/Utils/ConvertConfigJsonToEnvCommand.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ final protected function execute(InputInterface $input, OutputInterface $output)
3939
try {
4040
$content = file_get_contents($input->getArgument('filepath'));
4141

42-
if (!$content) {
42+
if (false === $content) {
4343
throw new \Exception('Error reading file');
4444
}
4545

@@ -56,7 +56,6 @@ final protected function execute(InputInterface $input, OutputInterface $output)
5656
$rejseplanenApiKey = $config['rejseplanenApiKey'] ?? null;
5757
$showScreenStatus = $config['showScreenStatus'] ?? null;
5858
$touchButtonRegions = $config['touchButtonRegions'] ?? null;
59-
$enhancedPreview = $config['previewClient'] ?? null;
6059
$loginMethods = $config['loginMethods'] ?? null;
6160

6261
if (null !== $loginMethods) {
@@ -72,7 +71,7 @@ final protected function execute(InputInterface $input, OutputInterface $output)
7271
null !== $touchButtonRegions && $io->writeln('ADMIN_TOUCH_BUTTON_REGIONS='.var_export($touchButtonRegions, true));
7372
null !== $loginMethods && $io->writeln("ADMIN_LOGIN_METHODS='".json_encode($loginMethods)."'");
7473
// This is a conversion from an url to boolean value. If the url is not empty, it is interpreted as true.
75-
!empty($enhancedPreview) && $io->writeln('ADMIN_ENHANCED_PREVIEW=true');
74+
!empty($config['previewClient']) && $io->writeln('ADMIN_ENHANCED_PREVIEW=true');
7675
$io->writeln('###< Admin configuration ###');
7776
} elseif ('client' === $type) {
7877
$io->success('Insert the following lines in .env.local');

0 commit comments

Comments
 (0)