From 88be6942755111ef6887bee7c2371f74e05861b5 Mon Sep 17 00:00:00 2001 From: Jefferson Casimir Date: Tue, 16 Apr 2024 11:25:57 -0400 Subject: [PATCH 01/10] Overrided notification function --- modules/publication/php/files.class.inc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/publication/php/files.class.inc b/modules/publication/php/files.class.inc index 2704d19b4d3..648a74fbad6 100644 --- a/modules/publication/php/files.class.inc +++ b/modules/publication/php/files.class.inc @@ -49,4 +49,16 @@ class Files extends \LORIS\Http\FilesPassthroughEndpoint { return "/files/"; } + + /** + * Send a notification for the download. + * + * @param string $file The filename being downloaded + * + * @return void + */ + protected function doDownloadNotification($file) + { + // Not implemented for this module + } } From 1629a298b81560febe6ca9b19b2d6f81c352e456 Mon Sep 17 00:00:00 2001 From: jeffersoncasimir <15801528+jeffersoncasimir@users.noreply.github.com> Date: Tue, 16 Apr 2024 12:52:09 -0400 Subject: [PATCH 02/10] Added @phan-suppress-next-line --- modules/publication/php/files.class.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/publication/php/files.class.inc b/modules/publication/php/files.class.inc index 648a74fbad6..588411eabae 100644 --- a/modules/publication/php/files.class.inc +++ b/modules/publication/php/files.class.inc @@ -52,10 +52,14 @@ class Files extends \LORIS\Http\FilesPassthroughEndpoint /** * Send a notification for the download. - * + * * @param string $file The filename being downloaded * * @return void + * + * @phan-suppress-next-line PhanUnusedProtectedMethodParameter + * Next line suppressed due to false-positive + * Unused parameter $file required to match parent signature */ protected function doDownloadNotification($file) { From 973fc41645fd698fcbc18b2fd6d037e1bd120f92 Mon Sep 17 00:00:00 2001 From: jeffersoncasimir <15801528+jeffersoncasimir@users.noreply.github.com> Date: Tue, 16 Apr 2024 12:59:26 -0400 Subject: [PATCH 03/10] Satisfy linter --- modules/publication/php/files.class.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/publication/php/files.class.inc b/modules/publication/php/files.class.inc index 588411eabae..eabc2acaf73 100644 --- a/modules/publication/php/files.class.inc +++ b/modules/publication/php/files.class.inc @@ -52,11 +52,11 @@ class Files extends \LORIS\Http\FilesPassthroughEndpoint /** * Send a notification for the download. - * + * * @param string $file The filename being downloaded * * @return void - * + * * @phan-suppress-next-line PhanUnusedProtectedMethodParameter * Next line suppressed due to false-positive * Unused parameter $file required to match parent signature From 1049b9b186cfe5f44f8fdbceace7524fafab609d Mon Sep 17 00:00:00 2001 From: jeffersoncasimir <15801528+jeffersoncasimir@users.noreply.github.com> Date: Tue, 16 Apr 2024 13:08:05 -0400 Subject: [PATCH 04/10] Added @phan-suppress-current-line --- modules/publication/php/files.class.inc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/publication/php/files.class.inc b/modules/publication/php/files.class.inc index eabc2acaf73..ca4b831810b 100644 --- a/modules/publication/php/files.class.inc +++ b/modules/publication/php/files.class.inc @@ -53,15 +53,14 @@ class Files extends \LORIS\Http\FilesPassthroughEndpoint /** * Send a notification for the download. * + * Next line suppressed due to false-positive + * Unused parameter $file required to match parent signature + * * @param string $file The filename being downloaded * * @return void - * - * @phan-suppress-next-line PhanUnusedProtectedMethodParameter - * Next line suppressed due to false-positive - * Unused parameter $file required to match parent signature */ - protected function doDownloadNotification($file) + protected function doDownloadNotification($file) // @phan-suppress-current-line PhanUnusedProtectedMethodParameter { // Not implemented for this module } From c3acc09f15652ea79c8d8d9ae8baccbf1167bdb6 Mon Sep 17 00:00:00 2001 From: jeffersoncasimir <15801528+jeffersoncasimir@users.noreply.github.com> Date: Tue, 16 Apr 2024 14:00:03 -0400 Subject: [PATCH 05/10] Changed back to @phan-suppress-next-line --- modules/publication/php/files.class.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/publication/php/files.class.inc b/modules/publication/php/files.class.inc index ca4b831810b..2c54eba18cc 100644 --- a/modules/publication/php/files.class.inc +++ b/modules/publication/php/files.class.inc @@ -60,7 +60,8 @@ class Files extends \LORIS\Http\FilesPassthroughEndpoint * * @return void */ - protected function doDownloadNotification($file) // @phan-suppress-current-line PhanUnusedProtectedMethodParameter + // @phan-suppress-next-line PhanUnusedProtectedMethodParameter + protected function doDownloadNotification($file) { // Not implemented for this module } From b0d1cf514d7249b8575826d7352c4e3c6a42f083 Mon Sep 17 00:00:00 2001 From: jeffersoncasimir <15801528+jeffersoncasimir@users.noreply.github.com> Date: Tue, 16 Apr 2024 14:07:55 -0400 Subject: [PATCH 06/10] Fixed comment style --- modules/publication/php/files.class.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/publication/php/files.class.inc b/modules/publication/php/files.class.inc index 2c54eba18cc..9d7098e5a05 100644 --- a/modules/publication/php/files.class.inc +++ b/modules/publication/php/files.class.inc @@ -60,7 +60,7 @@ class Files extends \LORIS\Http\FilesPassthroughEndpoint * * @return void */ - // @phan-suppress-next-line PhanUnusedProtectedMethodParameter + /** @phan-suppress-next-line PhanUnusedProtectedMethodParameter */ protected function doDownloadNotification($file) { // Not implemented for this module From 3257706525cb59fe53d6422753cfca2465a63968 Mon Sep 17 00:00:00 2001 From: jeffersoncasimir <15801528+jeffersoncasimir@users.noreply.github.com> Date: Tue, 16 Apr 2024 14:21:05 -0400 Subject: [PATCH 07/10] Update files.class.inc --- modules/publication/php/files.class.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/publication/php/files.class.inc b/modules/publication/php/files.class.inc index 9d7098e5a05..ce52fc6b97f 100644 --- a/modules/publication/php/files.class.inc +++ b/modules/publication/php/files.class.inc @@ -59,8 +59,8 @@ class Files extends \LORIS\Http\FilesPassthroughEndpoint * @param string $file The filename being downloaded * * @return void + * @phan-suppress-next-line PhanUnusedProtectedMethodParameter */ - /** @phan-suppress-next-line PhanUnusedProtectedMethodParameter */ protected function doDownloadNotification($file) { // Not implemented for this module From 0b6bf821487a6244ac198b0b07309c63da967b5f Mon Sep 17 00:00:00 2001 From: jeffersoncasimir <15801528+jeffersoncasimir@users.noreply.github.com> Date: Tue, 16 Apr 2024 14:32:11 -0400 Subject: [PATCH 08/10] Update files.class.inc --- modules/publication/php/files.class.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/publication/php/files.class.inc b/modules/publication/php/files.class.inc index ce52fc6b97f..ed599d8907c 100644 --- a/modules/publication/php/files.class.inc +++ b/modules/publication/php/files.class.inc @@ -59,6 +59,7 @@ class Files extends \LORIS\Http\FilesPassthroughEndpoint * @param string $file The filename being downloaded * * @return void + * * @phan-suppress-next-line PhanUnusedProtectedMethodParameter */ protected function doDownloadNotification($file) From 7dc0c118582f008c56f8f5f980a6277d46ee117e Mon Sep 17 00:00:00 2001 From: jeffersoncasimir <15801528+jeffersoncasimir@users.noreply.github.com> Date: Tue, 16 Apr 2024 14:57:41 -0400 Subject: [PATCH 09/10] Update files.class.inc --- modules/publication/php/files.class.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/publication/php/files.class.inc b/modules/publication/php/files.class.inc index ed599d8907c..d226147ef90 100644 --- a/modules/publication/php/files.class.inc +++ b/modules/publication/php/files.class.inc @@ -60,8 +60,7 @@ class Files extends \LORIS\Http\FilesPassthroughEndpoint * * @return void * - * @phan-suppress-next-line PhanUnusedProtectedMethodParameter - */ + * @phan-suppress-next-line PhanUnusedProtectedMethodParameter */ protected function doDownloadNotification($file) { // Not implemented for this module From 5679a7647b001b333dae75c661328a7792ed6d2d Mon Sep 17 00:00:00 2001 From: jeffersoncasimir <15801528+jeffersoncasimir@users.noreply.github.com> Date: Tue, 16 Apr 2024 15:07:58 -0400 Subject: [PATCH 10/10] Changed to @phan-file-suppress --- modules/publication/php/files.class.inc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/publication/php/files.class.inc b/modules/publication/php/files.class.inc index d226147ef90..bc9fdd7865d 100644 --- a/modules/publication/php/files.class.inc +++ b/modules/publication/php/files.class.inc @@ -1,4 +1,9 @@