Minor - flint fixes

pull/3683/head
Julio Montoya 5 years ago
parent 4fdecd6d4c
commit 37e366cadb
  1. 2
      plugin/xapi/admin.php
  2. 29
      plugin/xapi/src/Entity/LrsAuth.php
  3. 2
      plugin/xapi/src/Lrs/LrsRequest.php
  4. 20
      plugin/xapi/src/XApiPlugin.php

@ -170,7 +170,7 @@ switch ($request->query->getAlpha('action')) {
Display::url(
Display::return_icon('delete.png', get_lang('Edit')),
$pageBaseUrl.'?action=delete&id='.$auth->getId()
)
),
];
$table->setCellContents($row, 0, $auth->getUsername());

@ -45,27 +45,16 @@ class LrsAuth
*/
private $createdAt;
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @return string
*/
public function getUsername(): string
{
return $this->username;
}
/**
* @param string $username
*
* @return LrsAuth
*/
public function setUsername(string $username): LrsAuth
{
$this->username = $username;
@ -73,19 +62,11 @@ class LrsAuth
return $this;
}
/**
* @return string
*/
public function getPassword(): string
{
return $this->password;
}
/**
* @param string $password
*
* @return LrsAuth
*/
public function setPassword(string $password): LrsAuth
{
$this->password = $password;
@ -93,19 +74,11 @@ class LrsAuth
return $this;
}
/**
* @return bool
*/
public function isEnabled(): bool
{
return $this->enabled;
}
/**
* @param bool $enabled
*
* @return LrsAuth
*/
public function setEnabled(bool $enabled): LrsAuth
{
$this->enabled = $enabled;
@ -123,8 +96,6 @@ class LrsAuth
/**
* @param \DateTime $createdAt
*
* @return LrsAuth
*/
public function setCreatedAt(DateTime $createdAt): LrsAuth
{

@ -8,8 +8,6 @@ use Symfony\Component\HttpFoundation\Request as HttpRequest;
use Symfony\Component\HttpFoundation\Response as HttpResponse;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
use Xabbuh\XApi\Common\Exception\AccessDeniedException;
/**
* Class LrsRequest.

@ -419,6 +419,16 @@ class XApiPlugin extends Plugin implements HookPluginInterface
return null;
}
/**
* {@inheritdoc}
*/
public function getAdminUrl()
{
$webPath = api_get_path(WEB_PLUGIN_PATH).$this->get_name();
return "$webPath/admin.php";
}
/**
* @throws \Doctrine\ORM\Tools\ToolsException
*/
@ -520,14 +530,4 @@ class XApiPlugin extends Plugin implements HookPluginInterface
->createQuery('DELETE FROM ChamiloCourseBundle:CTool t WHERE t.category = :category AND t.link LIKE :link')
->execute(['category' => 'plugin', 'link' => 'xapi/cmi5/index.php%']);
}
/**
* @inheritDoc
*/
public function getAdminUrl()
{
$webPath = api_get_path(WEB_PLUGIN_PATH).$this->get_name();
return "$webPath/admin.php";
}
}

Loading…
Cancel
Save