From 7d31cc6d5129943c50edc9816d91cbd1345b81ed Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 16 Jul 2020 07:59:46 +0200 Subject: [PATCH] Minor - flint fixes --- .../HookConditionalLoginObserverInterface.php | 2 -- ...kMyStudentsLpTrackingObserverInterface.php | 4 ---- ...yStudentsQuizTrackingObserverInterface.php | 4 ---- main/install/install.lib.php | 2 +- .../Controller/AuthenticationController.php | 3 +-- .../Controller/BaseController.php | 6 +---- .../Controller/EnrollmentController.php | 2 +- plugin/whispeakauth/Entity/LogEventLp.php | 2 +- plugin/whispeakauth/Entity/LogEventQuiz.php | 2 +- plugin/whispeakauth/Request/ApiRequest.php | 6 ----- plugin/whispeakauth/WhispeakAuthPlugin.php | 24 +++++++++---------- .../WhispeakConditionalLoginHook.php | 2 -- .../WhispeakMyStudentsLpTrackingHook.php | 4 ---- .../WhispeakMyStudentsQuizTrackingHook.php | 4 ---- plugin/whispeakauth/admin.php | 2 +- plugin/whispeakauth/ajax/record_audio.php | 2 +- plugin/zoom/admin.php | 2 -- plugin/zoom/lib/zoom_plugin.class.php | 13 ++-------- plugin/zoom/start.php | 2 -- 19 files changed, 21 insertions(+), 67 deletions(-) diff --git a/main/inc/lib/hook/interfaces/HookConditionalLoginObserverInterface.php b/main/inc/lib/hook/interfaces/HookConditionalLoginObserverInterface.php index d31178a7d3..5566781d5e 100644 --- a/main/inc/lib/hook/interfaces/HookConditionalLoginObserverInterface.php +++ b/main/inc/lib/hook/interfaces/HookConditionalLoginObserverInterface.php @@ -16,8 +16,6 @@ interface HookConditionalLoginObserverInterface extends HookObserverInterface * * conditional_function returns false to redirect to the url and returns true to continue with the classical login. * - * @param HookConditionalLoginEventInterface $hook - * * @return array */ public function hookConditionalLogin(HookConditionalLoginEventInterface $hook); diff --git a/main/inc/lib/hook/interfaces/HookMyStudentsLpTrackingObserverInterface.php b/main/inc/lib/hook/interfaces/HookMyStudentsLpTrackingObserverInterface.php index c75a15eb01..e4e0fe176f 100644 --- a/main/inc/lib/hook/interfaces/HookMyStudentsLpTrackingObserverInterface.php +++ b/main/inc/lib/hook/interfaces/HookMyStudentsLpTrackingObserverInterface.php @@ -15,8 +15,6 @@ interface HookMyStudentsLpTrackingObserverInterface extends HookObserverInterfac * ] * . * - * @param HookMyStudentsLpTrackingEventInterface $hook - * * @return array */ public function trackingHeader(HookMyStudentsLpTrackingEventInterface $hook); @@ -30,8 +28,6 @@ interface HookMyStudentsLpTrackingObserverInterface extends HookObserverInterfac * ] * . * - * @param HookMyStudentsLpTrackingEventInterface $hook - * * @return array */ public function trackingContent(HookMyStudentsLpTrackingEventInterface $hook); diff --git a/main/inc/lib/hook/interfaces/HookMyStudentsQuizTrackingObserverInterface.php b/main/inc/lib/hook/interfaces/HookMyStudentsQuizTrackingObserverInterface.php index b41d0698e6..b768bec50a 100644 --- a/main/inc/lib/hook/interfaces/HookMyStudentsQuizTrackingObserverInterface.php +++ b/main/inc/lib/hook/interfaces/HookMyStudentsQuizTrackingObserverInterface.php @@ -15,8 +15,6 @@ interface HookMyStudentsQuizTrackingObserverInterface extends HookObserverInterf * ] * . * - * @param HookMyStudentsQuizTrackingEventInterface $hook - * * @return array */ public function trackingHeader(HookMyStudentsQuizTrackingEventInterface $hook); @@ -30,8 +28,6 @@ interface HookMyStudentsQuizTrackingObserverInterface extends HookObserverInterf * ] * . * - * @param HookMyStudentsQuizTrackingEventInterface $hook - * * @return array */ public function trackingContent(HookMyStudentsQuizTrackingEventInterface $hook); diff --git a/main/install/install.lib.php b/main/install/install.lib.php index 724d9cd702..b6e4f9972a 100755 --- a/main/install/install.lib.php +++ b/main/install/install.lib.php @@ -1681,7 +1681,7 @@ function display_configuration_parameter( $inputType = 'password'; $eyeForPassword = ''.' '; } $html .= '
get(self::SETTING_API_URL); - - return trim($url, " \t\n\r \v/").'/'; - } } diff --git a/plugin/whispeakauth/WhispeakConditionalLoginHook.php b/plugin/whispeakauth/WhispeakConditionalLoginHook.php index 5cce8030f3..b4611b0bf1 100644 --- a/plugin/whispeakauth/WhispeakConditionalLoginHook.php +++ b/plugin/whispeakauth/WhispeakConditionalLoginHook.php @@ -29,8 +29,6 @@ class WhispeakConditionalLoginHook extends HookObserver implements HookCondition * * conditional_function returns false to redirect to the url and returns true to continue with the classical login. * - * @param HookConditionalLoginEventInterface $hook - * * @return array */ public function hookConditionalLogin(HookConditionalLoginEventInterface $hook) diff --git a/plugin/whispeakauth/WhispeakMyStudentsLpTrackingHook.php b/plugin/whispeakauth/WhispeakMyStudentsLpTrackingHook.php index 89ed5fa0cd..67dd85ad02 100644 --- a/plugin/whispeakauth/WhispeakMyStudentsLpTrackingHook.php +++ b/plugin/whispeakauth/WhispeakMyStudentsLpTrackingHook.php @@ -18,8 +18,6 @@ class WhispeakMyStudentsLpTrackingHook extends HookObserver implements HookMyStu } /** - * @param HookMyStudentsLpTrackingEventInterface $hook - * * @return array */ public function trackingHeader(HookMyStudentsLpTrackingEventInterface $hook) @@ -31,8 +29,6 @@ class WhispeakMyStudentsLpTrackingHook extends HookObserver implements HookMyStu } /** - * @param HookMyStudentsLpTrackingEventInterface $hook - * * @throws \Doctrine\ORM\Query\QueryException * * @return array diff --git a/plugin/whispeakauth/WhispeakMyStudentsQuizTrackingHook.php b/plugin/whispeakauth/WhispeakMyStudentsQuizTrackingHook.php index 1fcd28ff5e..399ae88e47 100644 --- a/plugin/whispeakauth/WhispeakMyStudentsQuizTrackingHook.php +++ b/plugin/whispeakauth/WhispeakMyStudentsQuizTrackingHook.php @@ -26,8 +26,6 @@ class WhispeakMyStudentsQuizTrackingHook extends HookObserver implements HookMyS * ] * . * - * @param HookMyStudentsQuizTrackingEventInterface $hook - * * @return array */ public function trackingHeader(HookMyStudentsQuizTrackingEventInterface $hook) @@ -49,8 +47,6 @@ class WhispeakMyStudentsQuizTrackingHook extends HookObserver implements HookMyS * ] * . * - * @param HookMyStudentsQuizTrackingEventInterface $hook - * * @throws \Doctrine\ORM\Query\QueryException * * @return array diff --git a/plugin/whispeakauth/admin.php b/plugin/whispeakauth/admin.php index bb8cb8163b..b0e73bbeaf 100644 --- a/plugin/whispeakauth/admin.php +++ b/plugin/whispeakauth/admin.php @@ -71,7 +71,7 @@ if ($form->validate()) { $pageContent = ''; /** - * @var int $userId + * @var int $userId * @var array|LogEvent[] $logEvents */ foreach ($results as $userId => $logEvents) { diff --git a/plugin/whispeakauth/ajax/record_audio.php b/plugin/whispeakauth/ajax/record_audio.php index 417e001dcb..c3418be4a7 100644 --- a/plugin/whispeakauth/ajax/record_audio.php +++ b/plugin/whispeakauth/ajax/record_audio.php @@ -30,7 +30,7 @@ if ($isEnrollment) { } if ($isAuthentify) { - $controller= new AuthenticationController(); + $controller = new AuthenticationController(); try { $controller->ajax(); diff --git a/plugin/zoom/admin.php b/plugin/zoom/admin.php index 673f45c065..e8affc4b04 100644 --- a/plugin/zoom/admin.php +++ b/plugin/zoom/admin.php @@ -1,8 +1,6 @@ setSelected($registeredUserIds); - - return [ $form, $registrants ]; + return [$form, $registrants]; } /** @@ -878,15 +877,7 @@ class ZoomPlugin extends Plugin $path = '/zoom_meeting_recording_file_'.$file->id.'.'.$file->file_type; $docId = DocumentManager::addCloudLink($courseInfo, $path, $file->play_url, $name); if (!$docId) { - throw new Exception( - get_lang( - DocumentManager::cloudLinkExists( - $courseInfo, - $path, - $file->play_url - ) ? 'UrlAlreadyExists' : 'ErrorAddCloudLink' - ) - ); + throw new Exception(get_lang(DocumentManager::cloudLinkExists($courseInfo, $path, $file->play_url) ? 'UrlAlreadyExists' : 'ErrorAddCloudLink')); } } diff --git a/plugin/zoom/start.php b/plugin/zoom/start.php index 90b5374ada..c40bfe2019 100755 --- a/plugin/zoom/start.php +++ b/plugin/zoom/start.php @@ -1,8 +1,6 @@