Skip to content

Commit

Permalink
fixup! feat(dav): implement personal absence settings
Browse files Browse the repository at this point in the history
  • Loading branch information
st3iny committed Oct 27, 2023
1 parent a49ae2d commit 0956226
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion apps/dav/lib/Settings/AvailabilitySettings.php
Expand Up @@ -28,6 +28,7 @@

use OCA\DAV\AppInfo\Application;
use OCA\DAV\Db\AbsenceMapper;
use OCA\Mail\Vendor\Psr\Log\LoggerInterface;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
Expand All @@ -42,6 +43,7 @@ class AvailabilitySettings implements ISettings {
public function __construct(IConfig $config,
IInitialState $initialState,
?string $userId,
private LoggerInterface $logger,

Check failure on line 46 in apps/dav/lib/Settings/AvailabilitySettings.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

UndefinedClass

apps/dav/lib/Settings/AvailabilitySettings.php:46:9: UndefinedClass: Class, interface or enum named OCA\Mail\Vendor\Psr\Log\LoggerInterface does not exist (see https://psalm.dev/019)

Check failure

Code scanning / Psalm

UndefinedClass Error

Class, interface or enum named OCA\Mail\Vendor\Psr\Log\LoggerInterface does not exist
private AbsenceMapper $absenceMapper) {

Check failure on line 47 in apps/dav/lib/Settings/AvailabilitySettings.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

UndefinedClass

apps/dav/lib/Settings/AvailabilitySettings.php:47:9: UndefinedClass: Class, interface or enum named OCA\DAV\Db\AbsenceMapper does not exist (see https://psalm.dev/019)

Check failure

Code scanning / Psalm

UndefinedClass Error

Class, interface or enum named OCA\DAV\Db\AbsenceMapper does not exist
$this->config = $config;
$this->initialState = $initialState;
Expand All @@ -68,7 +70,13 @@ public function getForm(): TemplateResponse {
try {
$absence = $this->absenceMapper->findByUserId($this->userId);

Check failure on line 71 in apps/dav/lib/Settings/AvailabilitySettings.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

UndefinedClass

apps/dav/lib/Settings/AvailabilitySettings.php:71:16: UndefinedClass: Class, interface or enum named OCA\DAV\Db\AbsenceMapper does not exist (see https://psalm.dev/019)

Check failure

Code scanning / Psalm

UndefinedClass Error

Class, interface or enum named OCA\DAV\Db\AbsenceMapper does not exist
$this->initialState->provideInitialState('absence', $absence);
} catch (DoesNotExistException|\OCP\DB\Exception) {
} catch (DoesNotExistException) {
// The user has not yet set up an absence period.
// Logging this error is not necessary.
} catch (\OCP\DB\Exception $e) {
$this->logger->error("Could not find absence data for user $this->userId: " . $e->getMessage(), [

Check failure on line 77 in apps/dav/lib/Settings/AvailabilitySettings.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

UndefinedClass

apps/dav/lib/Settings/AvailabilitySettings.php:77:5: UndefinedClass: Class, interface or enum named OCA\Mail\Vendor\Psr\Log\LoggerInterface does not exist (see https://psalm.dev/019)

Check failure

Code scanning / Psalm

UndefinedClass Error

Class, interface or enum named OCA\Mail\Vendor\Psr\Log\LoggerInterface does not exist
'exception' => $e,
]);
}
}

Expand Down

0 comments on commit 0956226

Please sign in to comment.