diff --git a/appinfo/info.xml b/appinfo/info.xml index 50f360ee0..f0532ccec 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -21,7 +21,7 @@ The Notes app is a distraction free notes taking app for [Nextcloud](https://www https://github.com/nextcloud/notes.git https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Notes/notes.png - + diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 67ef91dde..92017a64d 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -12,6 +12,7 @@ use OCP\EventDispatcher\GenericEvent; use OCP\EventDispatcher\IEventDispatcher; use OCP\Share\Events\BeforeShareCreatedEvent; +/** @phan-suppress-next-line PhanUnreferencedUseNormal */ use OCP\Share\IShare; class Application extends App implements IBootstrap { @@ -43,6 +44,7 @@ public function register(IRegistrationContext $context): void { } /** @var IShare $share */ + /** @phan-suppress-next-line PhanDeprecatedFunction */ $share = $event->getSubject(); $modernListener = \OCP\Server::get(BeforeShareCreatedListener::class); diff --git a/lib/AppInfo/BeforeShareCreatedListener.php b/lib/AppInfo/BeforeShareCreatedListener.php index 3717c9faf..d94bbd8e1 100644 --- a/lib/AppInfo/BeforeShareCreatedListener.php +++ b/lib/AppInfo/BeforeShareCreatedListener.php @@ -16,6 +16,7 @@ class BeforeShareCreatedListener implements IEventListener { private SettingsService $settings; private NoteUtil $noteUtil; + private LoggerInterface $logger; public function __construct(SettingsService $settings, NoteUtil $noteUtil, LoggerInterface $logger) { $this->settings = $settings; diff --git a/lib/AppInfo/DashboardWidget.php b/lib/AppInfo/DashboardWidget.php index d017ba1c6..ce87f40dd 100644 --- a/lib/AppInfo/DashboardWidget.php +++ b/lib/AppInfo/DashboardWidget.php @@ -74,10 +74,18 @@ public function load(): void { public function getWidgetButtons(string $userId): array { $buttons = [ - new WidgetButton(WidgetButton::TYPE_NEW, $this->url->linkToRouteAbsolute('notes.page.create'), $this->l10n->t('Create new note')) + new WidgetButton( + WidgetButton::TYPE_NEW, + $this->url->linkToRouteAbsolute('notes.page.create'), + $this->l10n->t('Create new note') + ) ]; if ($this->notesService->countNotes($userId) > 7) { - $buttons[] = new WidgetButton(WidgetButton::TYPE_MORE, $this->url->linkToRouteAbsolute('notes.page.index'), $this->l10n->t('More notes')); + $buttons[] = new WidgetButton( + WidgetButton::TYPE_MORE, + $this->url->linkToRouteAbsolute('notes.page.index'), + $this->l10n->t('More notes') + ); } return $buttons; } diff --git a/lib/Controller/NotesController.php b/lib/Controller/NotesController.php index 3aad4f9cb..dfcc54a05 100644 --- a/lib/Controller/NotesController.php +++ b/lib/Controller/NotesController.php @@ -322,8 +322,14 @@ public function getAttachment(int $noteid, string $path): Http\Response { $path ); $response = new StreamResponse($targetimage->fopen('rb')); - $response->addHeader('Content-Disposition', 'attachment; filename="' . rawurldecode($targetimage->getName()) . '"'); - $response->addHeader('Content-Type', $this->mimeTypeDetector->getSecureMimeType($targetimage->getMimeType())); + $response->addHeader( + 'Content-Disposition', + 'attachment; filename="' . rawurldecode($targetimage->getName()) . '"' + ); + $response->addHeader( + 'Content-Type', + $this->mimeTypeDetector->getSecureMimeType($targetimage->getMimeType()) + ); $response->addHeader('Cache-Control', 'public, max-age=604800'); return $response; } catch (\Exception $e) { diff --git a/tests/phan-config.php b/tests/phan-config.php index ec14a76c4..86ebe0098 100644 --- a/tests/phan-config.php +++ b/tests/phan-config.php @@ -1,11 +1,16 @@ [ - 'lib/', - 'vendor/', - 'tests/stubs/', - ], + 'directory_list' => $testDirs, "exclude_analysis_directory_list" => [ 'vendor/', ],