Skip to content

Commit 6b83f67

Browse files
chore: Fix code style
1 parent 8cd1e1f commit 6b83f67

32 files changed

+107
-107
lines changed

src/Command/DevRobotsTxtCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class DevRobotsTxtCommand extends Command
1717
{
1818
public function __construct(
1919
#[Autowire('%kernel.project_dir%/public')]
20-
private readonly string $envPath
20+
private readonly string $envPath,
2121
) {
2222
parent::__construct();
2323
}

src/Command/EnvDelCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class EnvDelCommand extends Command
1818
{
1919
public function __construct(
2020
#[Autowire('%kernel.project_dir%/.env')]
21-
private readonly string $envPath
21+
private readonly string $envPath,
2222
) {
2323
parent::__construct();
2424
}

src/Command/EnvGetCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class EnvGetCommand extends Command
1919
{
2020
public function __construct(
2121
#[Autowire('%kernel.project_dir%/.env')]
22-
private readonly string $envPath
22+
private readonly string $envPath,
2323
) {
2424
parent::__construct();
2525
}

src/Command/EnvSetCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class EnvSetCommand extends Command
1818
{
1919
public function __construct(
2020
#[Autowire('%kernel.project_dir%/.env')]
21-
private readonly string $envPath
21+
private readonly string $envPath,
2222
) {
2323
parent::__construct();
2424
}

src/Command/MonitorCommand.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct(
4040
private readonly AbstractMailService $mailService,
4141
private readonly SystemConfigService $configService,
4242
private readonly Connection $connection,
43-
private readonly EntityRepository $scheduledTaskRepository
43+
private readonly EntityRepository $scheduledTaskRepository,
4444
) {
4545
parent::__construct();
4646
}
@@ -60,7 +60,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
6060
$errorSource = 'CLI option';
6161
} else {
6262
$recepientMail = $this->configService->getString(
63-
'FroshTools.config.monitorMail'
63+
'FroshTools.config.monitorMail',
6464
);
6565
$errorSource = 'plugin config';
6666
}
@@ -77,7 +77,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
7777
'recipients',
7878
[
7979
$recepientMail => 'Admin',
80-
]
80+
],
8181
);
8282
$data->set('senderName', 'Froshtools | Admin');
8383

@@ -112,7 +112,7 @@ private function queueFailed(): bool
112112
$availableAt = $this->connection->fetchOne('SELECT IFNULL(MIN(available_at), 0) FROM messenger_messages');
113113
$oldestMessage = (int) strtotime($availableAt);
114114
$minutes = $this->configService->getInt(
115-
'FroshTools.config.monitorQueueGraceTime'
115+
'FroshTools.config.monitorQueueGraceTime',
116116
);
117117

118118
return $oldestMessage && ($oldestMessage + ($minutes * 60)) < time();
@@ -121,7 +121,7 @@ private function queueFailed(): bool
121121
private function scheduledTaskFailed(): bool
122122
{
123123
$minutes = $this->configService->getInt(
124-
'FroshTools.config.monitorTaskGraceTime'
124+
'FroshTools.config.monitorTaskGraceTime',
125125
);
126126

127127
$date = new \DateTime();
@@ -131,14 +131,14 @@ private function scheduledTaskFailed(): bool
131131
$criteria->addFilter(
132132
new RangeFilter(
133133
'nextExecutionTime',
134-
['lte' => $date->format(Defaults::STORAGE_DATE_TIME_FORMAT)]
135-
)
134+
['lte' => $date->format(Defaults::STORAGE_DATE_TIME_FORMAT)],
135+
),
136136
);
137137
$criteria->addFilter(new NotFilter(
138138
NotFilter::CONNECTION_AND,
139139
[
140140
new EqualsFilter('status', ScheduledTaskDefinition::STATUS_INACTIVE),
141-
]
141+
],
142142
));
143143

144144
$oldTasks = $this->scheduledTaskRepository

src/Command/UpdateComposerPluginsCommand.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class UpdateComposerPluginsCommand extends Command
2323
public function __construct(
2424
#[Autowire('%kernel.project_dir%')]
2525
private readonly string $projectDir,
26-
private readonly KernelPluginLoader $pluginLoader
26+
private readonly KernelPluginLoader $pluginLoader,
2727
) {
2828
parent::__construct();
2929
$this->application = new Application();
@@ -51,7 +51,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
5151
'--working-dir' => $this->projectDir,
5252
'--direct' => null,
5353
'--format' => 'json',
54-
]
54+
],
5555
);
5656

5757
$this->application->run($composerinput, $composerOutput);
@@ -87,7 +87,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8787
'command' => 'update',
8888
'--working-dir' => $this->projectDir,
8989
'packages' => $updates,
90-
]
90+
],
9191
);
9292
$this->application->run($composerUpdate, $composerOutput);
9393

src/Components/CacheHelper.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private static function getSizeFallback(string $path): int
7373
$dirIterator = new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS | \FilesystemIterator::SKIP_DOTS);
7474
$iterator = new \RecursiveIteratorIterator(
7575
$dirIterator,
76-
\RecursiveIteratorIterator::LEAVES_ONLY
76+
\RecursiveIteratorIterator::LEAVES_ONLY,
7777
);
7878

7979
$size = 0;

src/Components/Elasticsearch/AdminInfoSubscriberEventListener.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ final class AdminInfoSubscriberEventListener
1313
{
1414
public function __construct(
1515
#[Autowire('%frosh_tools.elasticsearch.enabled%')]
16-
private readonly bool $elasticsearchEnabled
16+
private readonly bool $elasticsearchEnabled,
1717
) {}
1818

1919
public function __invoke(ResponseEvent $event): void

src/Components/Elasticsearch/ElasticsearchManager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __construct(
2727
private readonly ElasticsearchOutdatedIndexDetector $outdatedIndexDetector,
2828
private readonly Connection $connection,
2929
#[Autowire(service: 'shopware.increment.gateway.registry')]
30-
private readonly IncrementGatewayRegistry $gatewayRegistry
30+
private readonly IncrementGatewayRegistry $gatewayRegistry,
3131
) {}
3232

3333
public function isEnabled(): bool

src/Components/Health/Checker/HealthChecker/MysqlChecker.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private function checkMariadbVersion(HealthCollection $collection, string $versi
4848
'mysql',
4949
'MariaDB Version',
5050
$version,
51-
'min ' . $minVersion
51+
'min ' . $minVersion,
5252
));
5353
}
5454
}
@@ -69,7 +69,7 @@ private function checkMysqlVersion(HealthCollection $collection, string $version
6969
'mysql',
7070
$snippet,
7171
$version,
72-
$recommended
72+
$recommended,
7373
));
7474

7575
return;
@@ -80,7 +80,7 @@ private function checkMysqlVersion(HealthCollection $collection, string $version
8080
'mysql',
8181
$snippet,
8282
$version,
83-
$recommended
83+
$recommended,
8484
));
8585

8686
return;
@@ -90,7 +90,7 @@ private function checkMysqlVersion(HealthCollection $collection, string $version
9090
'mysql',
9191
$snippet,
9292
$version,
93-
'min ' . $minVersion
93+
'min ' . $minVersion,
9494
));
9595
}
9696

@@ -115,7 +115,7 @@ private static function getVersionNumber(string $versionString): string
115115
if (!preg_match(
116116
'/^(?:5\.5\.5-)?(mariadb-)?(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)/i',
117117
$versionString,
118-
$versionParts
118+
$versionParts,
119119
)) {
120120
throw new \RuntimeException(sprintf('Invalid version string: %s', $versionString));
121121
}

src/Components/Health/Checker/HealthChecker/PhpChecker.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ private function checkPhp(HealthCollection $collection): void
3737
'php-version',
3838
'PHP Version',
3939
$currentPhpVersion,
40-
'min ' . $minPhpVersion
41-
)
40+
'min ' . $minPhpVersion,
41+
),
4242
);
4343

4444
return;
@@ -49,8 +49,8 @@ private function checkPhp(HealthCollection $collection): void
4949
'php-version',
5050
'PHP Version',
5151
$currentPhpVersion,
52-
'min ' . $minPhpVersion
53-
)
52+
'min ' . $minPhpVersion,
53+
),
5454
);
5555
}
5656

@@ -64,8 +64,8 @@ private function checkMaxExecutionTime(HealthCollection $collection): void
6464
'php-max-execution',
6565
'Max-Execution-Time',
6666
(string) $currentMaxExecutionTime,
67-
'min ' . $minMaxExecutionTime
68-
)
67+
'min ' . $minMaxExecutionTime,
68+
),
6969
);
7070

7171
return;
@@ -75,7 +75,7 @@ private function checkMaxExecutionTime(HealthCollection $collection): void
7575
'php-max-execution',
7676
'Max-Execution-Time',
7777
(string) $currentMaxExecutionTime,
78-
'min ' . $minMaxExecutionTime
78+
'min ' . $minMaxExecutionTime,
7979
));
8080
}
8181

@@ -91,8 +91,8 @@ private function checkMemoryLimit(HealthCollection $collection): void
9191
'php-memory-limit',
9292
'Memory-Limit',
9393
$this->formatSize($currentMemoryLimit),
94-
'min ' . $this->formatSize($minMemoryLimit)
95-
)
94+
'min ' . $this->formatSize($minMemoryLimit),
95+
),
9696
);
9797

9898
return;
@@ -102,7 +102,7 @@ private function checkMemoryLimit(HealthCollection $collection): void
102102
'php-memory-limit',
103103
'Memory-Limit',
104104
$this->formatSize($currentMemoryLimit),
105-
'min ' . $this->formatSize($minMemoryLimit)
105+
'min ' . $this->formatSize($minMemoryLimit),
106106
));
107107
}
108108

src/Components/Health/Checker/HealthChecker/ProductionChecker.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class ProductionChecker implements HealthCheckerInterface, CheckerInterface
1313
{
1414
public function __construct(
1515
#[Autowire('%kernel.environment%')]
16-
private readonly string $environment
16+
private readonly string $environment,
1717
) {}
1818

1919
public function collect(HealthCollection $collection): void

src/Components/Health/Checker/HealthChecker/QueueChecker.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function collect(HealthCollection $collection): void
2626

2727
if (\is_string($oldestMessageAt)) {
2828
$diff = round(abs(
29-
((new \DateTime($oldestMessageAt . ' UTC'))->getTimestamp() - $oldMessageLimit->getTimestamp()) / 60
29+
((new \DateTime($oldestMessageAt . ' UTC'))->getTimestamp() - $oldMessageLimit->getTimestamp()) / 60,
3030
));
3131

3232
if ($diff > $maxDiff) {

src/Components/Health/Checker/HealthChecker/SwagSecurityChecker.php

+18-18
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct(
2424
#[Autowire('%kernel.shopware_version%')]
2525
private readonly string $shopwareVersion,
2626
#[Autowire(service: 'cache.object')]
27-
private readonly CacheInterface $cacheObject
27+
private readonly CacheInterface $cacheObject,
2828
) {}
2929

3030
public function collect(HealthCollection $collection): void
@@ -38,7 +38,7 @@ public function collect(HealthCollection $collection): void
3838
private function refreshPlugins(Connection $connection): void
3939
{
4040
$result = $connection->executeQuery(
41-
'SELECT COUNT(*) FROM plugin WHERE updated_at < DATE_SUB(NOW(), INTERVAL 1 DAY)'
41+
'SELECT COUNT(*) FROM plugin WHERE updated_at < DATE_SUB(NOW(), INTERVAL 1 DAY)',
4242
)->fetchOne();
4343

4444
if (empty($result)) {
@@ -98,8 +98,8 @@ private function determineSecurityIssue(HealthCollection $collection): void
9898
'Cannot check security.json from shopware-static-data',
9999
'not accessible',
100100
'accessible',
101-
'https://raw.githubusercontent.com/FriendsOfShopware/shopware-static-data/main/data/security.json'
102-
)
101+
'https://raw.githubusercontent.com/FriendsOfShopware/shopware-static-data/main/data/security.json',
102+
),
103103
);
104104
}
105105

@@ -113,8 +113,8 @@ private function determineSecurityIssue(HealthCollection $collection): void
113113
'Security update',
114114
'Shopware outdated',
115115
'Update Shopware to the latest version or install recent version of the plugin SwagPlatformSecurity',
116-
'https://store.shopware.com/en/swag136939272659f/shopware-6-security-plugin.html'
117-
)
116+
'https://store.shopware.com/en/swag136939272659f/shopware-6-security-plugin.html',
117+
),
118118
);
119119
}
120120

@@ -133,8 +133,8 @@ private function determineEolSupport(HealthCollection $collection): void
133133
$snippet,
134134
'releases.json not accessible',
135135
'accessible',
136-
'https://raw.githubusercontent.com/shopware/shopware/trunk/releases.json'
137-
)
136+
'https://raw.githubusercontent.com/shopware/shopware/trunk/releases.json',
137+
),
138138
);
139139

140140
return;
@@ -148,8 +148,8 @@ private function determineEolSupport(HealthCollection $collection): void
148148
$id,
149149
$snippet,
150150
'unknown, possibly ended security support',
151-
$recommended
152-
)
151+
$recommended,
152+
),
153153
);
154154

155155
return;
@@ -163,8 +163,8 @@ private function determineEolSupport(HealthCollection $collection): void
163163
$id,
164164
$snippet,
165165
'ended security support on ' . $releaseSupport['security_eol'],
166-
$recommended
167-
)
166+
$recommended,
167+
),
168168
);
169169

170170
return;
@@ -176,8 +176,8 @@ private function determineEolSupport(HealthCollection $collection): void
176176
$id,
177177
$snippet,
178178
'less than six months (' . $releaseSupport['security_eol'] . ')',
179-
$recommended
180-
)
179+
$recommended,
180+
),
181181
);
182182

183183
return;
@@ -189,8 +189,8 @@ private function determineEolSupport(HealthCollection $collection): void
189189
$id,
190190
$snippet,
191191
'less than one year (' . $releaseSupport['security_eol'] . ')',
192-
$recommended
193-
)
192+
$recommended,
193+
),
194194
);
195195

196196
return;
@@ -200,8 +200,8 @@ private function determineEolSupport(HealthCollection $collection): void
200200
SettingsResult::ok(
201201
$id,
202202
$snippet,
203-
'until ' . $releaseSupport['security_eol']
204-
)
203+
'until ' . $releaseSupport['security_eol'],
204+
),
205205
);
206206
}
207207

0 commit comments

Comments
 (0)