Skip to content
Snippets Groups Projects
Commit 843f036d authored by Marko Ivancic's avatar Marko Ivancic
Browse files

Fix psalm errors

parent 6c7fb662
No related branches found
No related tags found
1 merge request!2GUI tweaks
This commit is part of merge request !2. Comments created here will be created in the context of that merge request.
...@@ -8,7 +8,6 @@ class NetworkHelper ...@@ -8,7 +8,6 @@ class NetworkHelper
{ {
public function resolveClientIpAddress(string $clientIpAddress = null): ?string public function resolveClientIpAddress(string $clientIpAddress = null): ?string
{ {
/** @var string|null $clientIpAddress */
$clientIpAddress = $clientIpAddress ?? $clientIpAddress = $clientIpAddress ??
$_SERVER['HTTP_CLIENT_IP'] ?? $_SERVER['HTTP_CLIENT_IP'] ??
$_SERVER['HTTP_X_FORWARDED_FOR'] ?? $_SERVER['HTTP_X_FORWARDED_FOR'] ??
......
...@@ -465,7 +465,6 @@ class ModuleConfiguration ...@@ -465,7 +465,6 @@ class ModuleConfiguration
public function getTrackerDataRetentionPolicy(): ?DateInterval public function getTrackerDataRetentionPolicy(): ?DateInterval
{ {
/** @var string|null $value */
$value = $this->getConfiguration() $value = $this->getConfiguration()
->getOptionalString(self::OPTION_TRACKER_DATA_RETENTION_POLICY, null); ->getOptionalString(self::OPTION_TRACKER_DATA_RETENTION_POLICY, null);
......
...@@ -99,17 +99,6 @@ class Tracker implements AuthenticationDataTrackerInterface, AuthenticationDataP ...@@ -99,17 +99,6 @@ class Tracker implements AuthenticationDataTrackerInterface, AuthenticationDataP
{ {
$dateTime = (new DateTimeImmutable())->sub($retentionPolicy); $dateTime = (new DateTimeImmutable())->sub($retentionPolicy);
if ($dateTime === false) {
// @codeCoverageIgnoreStart
$message = sprintf(
'Could not create DateTime instance for data retention policy enforcement. Retention policy was: %s.',
var_export($retentionPolicy, true)
);
$this->logger->error($message);
throw new InvalidConfigurationException($message);
// @codeCoverageIgnoreEnd
}
$this->dataStore->deleteDataOlderThan($dateTime); $this->dataStore->deleteDataOlderThan($dateTime);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment