Minor - Format code

pull/3944/head
Angel Fernando Quiroz Campos 4 years ago
parent fa5dc8b18b
commit d6d0baea0e
  1. 1
      plugin/ims_lti/edit.php
  2. 16
      plugin/ims_lti/src/Form/FrmAdd.php
  3. 9
      plugin/ims_lti/src/Form/FrmEdit.php
  4. 7
      plugin/lti_provider/src/Form/FrmEdit.php

@ -1,5 +1,6 @@
<?php
/* For license terms, see /license.txt */
use Chamilo\PluginBundle\Entity\ImsLti\ImsLtiTool;
use Chamilo\PluginBundle\Form\FrmEdit;

@ -41,11 +41,11 @@ class FrmAdd extends FormValidator
parent::__construct($name, 'POST', '', '', $attributes, self::LAYOUT_HORIZONTAL, true);
$this->baseTool = $tool;
$this->toolIsV1p3 = $this->baseTool &&
!empty($this->baseTool->publicKey) &&
!empty($this->baseTool->getClientId()) &&
!empty($this->baseTool->getLoginUrl()) &&
!empty($this->baseTool->getRedirectUrl());
$this->toolIsV1p3 = $this->baseTool
&& !empty($this->baseTool->publicKey)
&& !empty($this->baseTool->getClientId())
&& !empty($this->baseTool->getLoginUrl())
&& !empty($this->baseTool->getRedirectUrl());
}
/**
@ -96,8 +96,8 @@ class FrmAdd extends FormValidator
['iframe' => 'iframe', 'window' => 'window']
);
if (null === $this->baseTool ||
($this->baseTool && !$this->baseTool->isActiveDeepLinking())
if (null === $this->baseTool
|| ($this->baseTool && !$this->baseTool->isActiveDeepLinking())
) {
$this->addCheckBox(
'deep_linking',
@ -157,7 +157,7 @@ class FrmAdd extends FormValidator
'replacement_user_id',
[
$plugin->get_lang('ReplacementUserId'),
$plugin->get_lang('ReplacementUserIdHelp')
$plugin->get_lang('ReplacementUserIdHelp'),
],
false
);

@ -6,6 +6,7 @@ namespace Chamilo\PluginBundle\Form;
use Category;
use Chamilo\PluginBundle\Entity\ImsLti\ImsLtiTool;
use Display;
use Exception;
use FormValidator;
use ImsLti;
use ImsLtiPlugin;
@ -105,8 +106,8 @@ class FrmEdit extends FormValidator
['iframe' => 'iframe', 'window' => 'window']
);
if (null === $parent ||
(null !== $parent && !$parent->isActiveDeepLinking())
if (null === $parent
|| (null !== $parent && !$parent->isActiveDeepLinking())
) {
$this->addCheckBox(
'deep_linking',
@ -165,7 +166,7 @@ class FrmEdit extends FormValidator
'replacement_user_id',
[
$plugin->get_lang('ReplacementUserId'),
$plugin->get_lang('ReplacementUserIdHelp')
$plugin->get_lang('ReplacementUserIdHelp'),
],
false
);
@ -186,7 +187,7 @@ class FrmEdit extends FormValidator
}
/**
* @throws \Exception
* @throws Exception
*/
public function setDefaultValues()
{

@ -4,6 +4,7 @@
namespace Chamilo\PluginBundle\LtiProvider\Form;
use Chamilo\PluginBundle\Entity\LtiProvider\Platform;
use Exception;
use FormValidator;
use LtiProviderPlugin;
@ -32,10 +33,8 @@ class FrmEdit extends FormValidator
/**
* Build the form.
*
* @param bool $globalMode
*/
public function build(bool $globalMode = true)
public function build()
{
$plugin = LtiProviderPlugin::create();
$this->addHeader($plugin->get_lang('ConnectionDetails'));
@ -55,7 +54,7 @@ class FrmEdit extends FormValidator
}
/**
* @throws \Exception
* @throws Exception
*/
public function setDefaultValues(): void
{

Loading…
Cancel
Save