Fix function declaration + undefined variable

pull/4521/head
Angel Fernando Quiroz Campos 3 years ago
parent 949c39395b
commit fcf64ae40c
  1. 2
      main/inc/lib/plugin.class.php
  2. 2
      plugin/bbb/lib/VM.php
  3. 4
      plugin/buycourses/src/buy_course_plugin.class.php
  4. 2
      plugin/lti_provider/LtiProviderPlugin.php
  5. 2
      plugin/whispeakauth/WhispeakAuthPlugin.php

@ -924,7 +924,7 @@ class Plugin
*
* @return bool True if plugin is installed/enabled, false otherwise
*/
public function isEnabled($checkEnabled = false)
public function isEnabled(bool $checkEnabled = false): bool
{
$settings = api_get_settings_params_simple(
[

@ -30,7 +30,7 @@ class VM
* @param bool $checkEnabled Check if, additionnally to being installed, the plugin is enabled
* @return bool
*/
public function isEnabled($checkEnabled = false)
public function isEnabled(bool $checkEnabled = false): bool
{
$config = $this->getConfig();

@ -135,7 +135,7 @@ class BuyCoursesPlugin extends Plugin
*
* @return bool
*/
public function isEnabled(bool $checkEnabled = false)
public function isEnabled(bool $checkEnabled = false): bool
{
return $this->get('paypal_enable') || $this->get('transfer_enable') || $this->get('culqi_enable') || $this->get('stripe_enable') || $this->get('cecabank_enable');
}
@ -3469,7 +3469,7 @@ class BuyCoursesPlugin extends Plugin
string $name = null,
int $min = 0,
int $max = 0,
mixed $appliesTo = '',
$appliesTo = '',
string $typeResult = 'all'
) {
$servicesTable = Database::get_main_table(self::TABLE_SERVICES);

@ -32,6 +32,8 @@ class LtiProviderPlugin extends Plugin
$launchUrlHtml = '';
$loginUrlHtml = '';
$redirectUrlHtml = '';
$jwksUrlHtml = '';
if ($this->areTablesCreated()) {
$publicKey = $this->getPublicKey();

@ -406,7 +406,7 @@ class WhispeakAuthPlugin extends Plugin implements HookPluginInterface
*
* @return bool
*/
public function isEnabled($checkEnabled = false)
public function isEnabled(bool $checkEnabled = false): bool
{
return parent::isEnabled() && 'true' === api_get_plugin_setting('whispeakauth', self::SETTING_ENABLE);
}

Loading…
Cancel
Save