diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-11-07 13:40:30 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-01-02 15:02:28 +0100 |
commit | a372564850cb2f8813c4c3cca67bd1b6cfcdb882 (patch) | |
tree | fc879b783dae0d038c60111b7adbb3b0749c6d09 /apps/weather_status | |
parent | e4e20bf40ad8ca139655b36a6efa2b1710ae50f0 (diff) | |
download | nextcloud-server-a372564850cb2f8813c4c3cca67bd1b6cfcdb882.tar.gz nextcloud-server-a372564850cb2f8813c4c3cca67bd1b6cfcdb882.zip |
Fix psalm spotted errors with new requirements
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/weather_status')
-rw-r--r-- | apps/weather_status/lib/Service/WeatherStatusService.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/weather_status/lib/Service/WeatherStatusService.php b/apps/weather_status/lib/Service/WeatherStatusService.php index fa3177b20f6..5b1d926f090 100644 --- a/apps/weather_status/lib/Service/WeatherStatusService.php +++ b/apps/weather_status/lib/Service/WeatherStatusService.php @@ -26,19 +26,19 @@ declare(strict_types=1); */ namespace OCA\WeatherStatus\Service; -use OCP\IConfig; -use OCP\IL10N; -use OCP\App\IAppManager; +use OCA\WeatherStatus\AppInfo\Application; use OCP\Accounts\IAccountManager; use OCP\Accounts\PropertyDoesNotExistException; -use OCP\IUserManager; -use OCP\Http\Client\IClientService; +use OCP\App\IAppManager; use OCP\Http\Client\IClient; -use OCP\ICacheFactory; +use OCP\Http\Client\IClientService; use OCP\ICache; +use OCP\ICacheFactory; +use OCP\IConfig; +use OCP\IL10N; use OCP\ILogger; -use OCA\WeatherStatus\AppInfo\Application; +use OCP\IUserManager; /** * Class WeatherStatusService @@ -426,8 +426,8 @@ class WeatherStatusService { $cacheDuration = 60 * 60; if (isset($headers['Expires']) && count($headers['Expires']) > 0) { // if the Expires response header is set, use it to define cache duration - $expireTs = (new \Datetime($headers['Expires'][0]))->getTimestamp(); - $nowTs = (new \Datetime())->getTimestamp(); + $expireTs = (new \DateTime($headers['Expires'][0]))->getTimestamp(); + $nowTs = (new \DateTime())->getTimestamp(); $duration = $expireTs - $nowTs; if ($duration > $cacheDuration) { $cacheDuration = $duration; |