Minor - format code

pull/3262/head
Julio Montoya 5 years ago
parent a57d820968
commit f4f1d65069
  1. 18
      public/main/install/install.lib.php
  2. 2
      src/CoreBundle/Controller/AccountController.php
  3. 1
      src/CoreBundle/Controller/SecurityController.php
  4. 2
      src/CoreBundle/Controller/SessionController.php
  5. 2
      src/CoreBundle/Controller/UserController.php
  6. 1
      src/CoreBundle/Entity/AccessUrlRelUser.php
  7. 3
      src/CoreBundle/Entity/Course.php
  8. 1
      src/CoreBundle/Entity/CourseRelUser.php
  9. 1
      src/CoreBundle/Entity/CourseRelUserCatalogue.php
  10. 1
      src/CoreBundle/Entity/CourseRequest.php
  11. 1
      src/CoreBundle/Entity/ExtraFieldSavedSearch.php
  12. 1
      src/CoreBundle/Entity/GradebookCategory.php
  13. 5
      src/CoreBundle/Entity/Group.php
  14. 1
      src/CoreBundle/Entity/Manager/SessionManager.php
  15. 1
      src/CoreBundle/Entity/Message.php
  16. 1
      src/CoreBundle/Entity/MessageFeedback.php
  17. 1
      src/CoreBundle/Entity/Portfolio.php
  18. 1
      src/CoreBundle/Entity/PortfolioCategory.php
  19. 1
      src/CoreBundle/Entity/Resource/AbstractResource.php
  20. 2
      src/CoreBundle/Entity/Resource/ResourceComment.php
  21. 2
      src/CoreBundle/Entity/Resource/ResourceLink.php
  22. 2
      src/CoreBundle/Entity/Resource/ResourceNode.php
  23. 1
      src/CoreBundle/Entity/Session.php
  24. 1
      src/CoreBundle/Entity/SessionRelCourseRelUser.php
  25. 1
      src/CoreBundle/Entity/SessionRelUser.php
  26. 1
      src/CoreBundle/Entity/SkillRelUser.php
  27. 1
      src/CoreBundle/Entity/SkillRelUserComment.php
  28. 29
      src/CoreBundle/Entity/User.php
  29. 1
      src/CoreBundle/Entity/UsergroupRelUser.php
  30. 2
      src/CoreBundle/EventListener/LegacyListener.php
  31. 2
      src/CoreBundle/EventListener/LoginSuccessHandler.php
  32. 2
      src/CoreBundle/Framework/Container.php
  33. 3
      src/CoreBundle/Menu/MenuVoter.php
  34. 2
      src/CoreBundle/Repository/GridInterface.php
  35. 2
      src/CoreBundle/Repository/IllustrationRepository.php
  36. 2
      src/CoreBundle/Repository/PersonalFileRepository.php
  37. 2
      src/CoreBundle/Repository/ResourceRepository.php
  38. 4
      src/CoreBundle/Repository/UserRepository.php
  39. 2
      src/CoreBundle/Security/Authorization/Voter/CourseVoter.php
  40. 2
      src/CoreBundle/Security/Authorization/Voter/SessionVoter.php
  41. 3
      src/CoreBundle/Security/LoginFormAuthenticator.php
  42. 6
      src/CoreBundle/Security/TokenAuthenticator.php
  43. 2
      src/CoreBundle/Traits/ResourceControllerTrait.php
  44. 2
      src/CourseBundle/Entity/CGroupInfo.php
  45. 2
      src/CourseBundle/EventListener/CourseListener.php
  46. 2
      src/CourseBundle/Repository/CChatConversationRepository.php
  47. 2
      src/CourseBundle/Repository/CCourseDescriptionRepository.php
  48. 2
      src/CourseBundle/Repository/CDocumentRepository.php
  49. 2
      src/CourseBundle/Repository/CForumAttachmentRepository.php
  50. 2
      src/CourseBundle/Repository/CForumCategoryRepository.php
  51. 2
      src/CourseBundle/Repository/CForumPostRepository.php
  52. 2
      src/CourseBundle/Repository/CGlossaryRepository.php
  53. 2
      src/CourseBundle/Repository/CLinkCategoryRepository.php
  54. 2
      src/CourseBundle/Repository/CLinkRepository.php
  55. 2
      src/CourseBundle/Repository/CNotebookRepository.php
  56. 2
      src/CourseBundle/Repository/CShortcutRepository.php
  57. 2
      src/CourseBundle/Repository/CStudentPublicationRepository.php
  58. 2
      src/CourseBundle/Repository/CThematicAdvanceRepository.php
  59. 2
      src/CourseBundle/Repository/CThematicPlanRepository.php
  60. 2
      src/CourseBundle/Repository/CThematicRepository.php
  61. 2
      src/CourseBundle/Repository/CToolRepository.php
  62. 2
      src/GraphQlBundle/Map/EnumMap.php
  63. 2
      src/GraphQlBundle/Map/MutationMap.php
  64. 2
      src/GraphQlBundle/Map/QueryMap.php
  65. 2
      src/GraphQlBundle/Resolver/UserResolver.php
  66. 2
      src/GraphQlBundle/Traits/GraphQLTrait.php
  67. 2
      src/LtiBundle/Controller/CourseController.php
  68. 2
      src/LtiBundle/Util/Utils.php

@ -11,7 +11,6 @@ use Chamilo\TicketBundle\Entity\Priority as TicketPriority;
use Chamilo\TicketBundle\Entity\Project as TicketProject;
use Chamilo\CoreBundle\Entity\Group;
use Doctrine\ORM\EntityManager;
use Sonata\PageBundle\Entity\PageManager;
use Symfony\Component\DependencyInjection\Container as SymfonyContainer;
/**
@ -2919,11 +2918,11 @@ function installPages($container)
{
error_log('installPages');
$siteManager = Container::getSiteManager();
//$siteManager = Container::getSiteManager();
// Create site
/** @var Chamilo\PageBundle\Entity\Site $site */
$site = $siteManager->create();
/*$site = $siteManager->create();
$site->setHost('localhost');
$site->setEnabled(true);
$site->setName('localhost');
@ -2932,12 +2931,11 @@ function installPages($container)
$site->setRelativePath('');
$site->setIsDefault(true);
$site->setLocale('en');
$siteManager->save($site);
$siteManager->save($site);*/
// Create home page
/** @var PageManager $pageManager */
$pageManager = $container->get('sonata.page.manager.page');
/** @var \Sonata\PageBundle\Model\Page $page */
/*$pageManager = $container->get('sonata.page.manager.page');
$page = $pageManager->create();
$page->setSlug('homepage');
$page->setUrl('/');
@ -2997,12 +2995,12 @@ function installPages($container)
$parentBlock = $block;
}
}
}
}*/
// Create block in main content
$block = $container->get('sonata.page.manager.block');
//$block = $container->get('sonata.page.manager.block');
/** @var \Sonata\BlockBundle\Model\Block $myBlock */
$myBlock = $block->create();
/*$myBlock = $block->create();
$myBlock->setType('sonata.formatter.block.formatter');
$myBlock->setSetting('format', 'richhtml');
$myBlock->setSetting('content', '');
@ -3010,7 +3008,7 @@ function installPages($container)
$myBlock->setSetting('template', '@SonataFormatter/Block/block_formatter.html.twig');
$myBlock->setParent($parentBlock);
$pageWelcome->addBlocks($myBlock);
$pageManager->save($pageWelcome);
$pageManager->save($pageWelcome);*/
}
/**

@ -4,10 +4,10 @@
namespace Chamilo\CoreBundle\Controller;
use Chamilo\CoreBundle\Form\ProfileType;
use Chamilo\CoreBundle\Repository\IllustrationRepository;
use Chamilo\CoreBundle\Repository\UserRepository;
use Chamilo\CoreBundle\Traits\ControllerTrait;
use Chamilo\CoreBundle\Form\ProfileType;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;

@ -17,7 +17,6 @@ class SecurityController extends AbstractController
{
/**
* @Route("/login", name="login")
*
*/
public function login(AuthenticationUtils $authenticationUtils): Response
{

@ -8,10 +8,10 @@ use Chamilo\CoreBundle\Entity\ExtraField;
use Chamilo\CoreBundle\Entity\SequenceResource;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\SessionRelCourse;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CoreBundle\Repository\SequenceRepository;
use Chamilo\CourseBundle\Entity\CCourseDescription;
use Chamilo\CoreBundle\Entity\User;
use CoursesController;
use Essence\Essence;
use ExtraFieldValue;

@ -5,9 +5,9 @@
namespace Chamilo\CoreBundle\Controller;
use Chamilo\CoreBundle\Repository\IllustrationRepository;
use Symfony\Component\Security\Core\User\UserInterface;
use Chamilo\CoreBundle\Repository\UserRepository;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Core\User\UserInterface;
/**
* Class UserController.

@ -4,7 +4,6 @@
namespace Chamilo\CoreBundle\Entity;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
/**

@ -12,7 +12,6 @@ use Chamilo\CoreBundle\Entity\Resource\AbstractResource;
use Chamilo\CoreBundle\Entity\Resource\ResourceInterface;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CourseBundle\Entity\CTool;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Criteria;
use Doctrine\ORM\Mapping as ORM;
@ -64,7 +63,7 @@ class Course extends AbstractResource implements ResourceInterface
protected $id;
/**
* @var string The course title.
* @var string the course title
* @Groups({"course:read", "course:write", "list"})
* @Assert\NotBlank()
*

@ -4,7 +4,6 @@
namespace Chamilo\CoreBundle\Entity;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;

@ -4,7 +4,6 @@
namespace Chamilo\CoreBundle\Entity;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
/**

@ -4,7 +4,6 @@
namespace Chamilo\CoreBundle\Entity;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
/**

@ -4,7 +4,6 @@
namespace Chamilo\CoreBundle\Entity;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Timestampable\Traits\TimestampableEntity;

@ -4,7 +4,6 @@
namespace Chamilo\CoreBundle\Entity;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
/**

@ -44,7 +44,7 @@ class Group
*/
protected $code;
public function __construct($name, $roles = array())
public function __construct($name, $roles = [])
{
$this->name = $name;
$this->roles = $roles;
@ -68,6 +68,7 @@ class Group
{
return $this->roles;
}
public function removeRole($role)
{
if (false !== $key = array_search(strtoupper($role), $this->roles, true)) {
@ -91,8 +92,6 @@ class Group
}
/**
* @param array $roles
*
* @return Group
*/
public function setRoles(array $roles)

@ -8,6 +8,7 @@ use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\SessionRelUser;
use Chamilo\CoreBundle\Entity\User;
/**
* Class SessionManager.
*/

@ -4,7 +4,6 @@
namespace Chamilo\CoreBundle\Entity;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;

@ -4,7 +4,6 @@
namespace Chamilo\CoreBundle\Entity;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\Index;
use Gedmo\Mapping\Annotation as Gedmo;

@ -4,7 +4,6 @@
namespace Chamilo\CoreBundle\Entity;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
/**

@ -4,7 +4,6 @@
namespace Chamilo\CoreBundle\Entity;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\Criteria;

@ -22,6 +22,7 @@ abstract class AbstractResource
{
/**
* SerializedName("description").
*
* @Assert\Valid()
* @ApiSubresource()
* @Groups({"resource_node:read", "document:read"})

@ -5,8 +5,8 @@
namespace Chamilo\CoreBundle\Entity\Resource;
use ApiPlatform\Core\Annotation\ApiResource;
use Chamilo\CoreBundle\Traits\TimestampableAgoTrait;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Traits\TimestampableAgoTrait;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;

@ -7,9 +7,9 @@ namespace Chamilo\CoreBundle\Entity\Resource;
use ApiPlatform\Core\Annotation\ApiResource;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Entity\Usergroup;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;

@ -8,8 +8,8 @@ use ApiPlatform\Core\Annotation\ApiFilter;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Core\Serializer\Filter\PropertyFilter;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Traits\TimestampableAgoTrait;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Traits\TimestampableAgoTrait;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Criteria;
use Doctrine\ORM\Mapping as ORM;

@ -8,7 +8,6 @@ use ApiPlatform\Core\Annotation\ApiFilter;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
use Chamilo\CourseBundle\Entity\CStudentPublication;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\Criteria;

@ -4,7 +4,6 @@
namespace Chamilo\CoreBundle\Entity;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
/**

@ -4,7 +4,6 @@
namespace Chamilo\CoreBundle\Entity;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
/**

@ -5,7 +5,6 @@
namespace Chamilo\CoreBundle\Entity;
use Chamilo\SkillBundle\Entity\Level;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Criteria;
use Doctrine\ORM\Mapping as ORM;

@ -4,7 +4,6 @@
namespace Chamilo\CoreBundle\Entity;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
/**

@ -8,26 +8,18 @@ use ApiPlatform\Core\Annotation\ApiFilter;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\BooleanFilter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
use Chamilo\CoreBundle\Entity\AccessUrl;
use Chamilo\CoreBundle\Entity\AccessUrlRelUser;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
use Chamilo\CoreBundle\Entity\Skill;
use Chamilo\CoreBundle\Entity\UsergroupRelUser;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\Criteria;
use Doctrine\ORM\Event\LifecycleEventArgs;
use Doctrine\ORM\Mapping as ORM;
use FOS\UserBundle\Model\GroupInterface;
use Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Core\User\EquatableInterface;
use Symfony\Component\Security\Core\User\PasswordUpgraderInterface;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Mapping\ClassMetadata;
use Symfony\Component\Security\Core\User\UserInterface;
/**
* @ApiResource(
@ -109,10 +101,10 @@ class User implements UserInterface, EquatableInterface
*/
protected $id;
/**
* @ORM\Column(type="string", unique=true, nullable=true)
*/
private $apiToken;
/**
* @ORM\Column(type="string", unique=true, nullable=true)
*/
private $apiToken;
/**
* @var string
@ -135,7 +127,6 @@ class User implements UserInterface, EquatableInterface
*/
protected $locale;
/**
* @var string
* @Groups({"user:read", "user:write"})
@ -179,7 +170,6 @@ class User implements UserInterface, EquatableInterface
/**
* @var string
*
* @var string
* @Groups({"user:read", "user:write"})
* @Assert\NotBlank()
@ -2014,18 +2004,19 @@ class User implements UserInterface, EquatableInterface
return $this->courseGroupsAsMember->matching($criteria);
}
public function getFirstname(){
public function getFirstname()
{
}
public function getLastname(){
public function getLastname()
{
}
public function eraseCredentials()
{
$this->plainPassword = null;
}
public function hasRole($role)
{
return in_array(strtoupper($role), $this->getRoles(), true);

@ -4,7 +4,6 @@
namespace Chamilo\CoreBundle\Entity;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
/**

@ -4,8 +4,8 @@
namespace Chamilo\CoreBundle\EventListener;
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Framework\Container;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpKernel\Event\ControllerEvent;

@ -4,8 +4,8 @@
namespace Chamilo\CoreBundle\EventListener;
use Chamilo\SettingsBundle\Manager\SettingsManager;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\SettingsBundle\Manager\SettingsManager;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;

@ -10,6 +10,7 @@ use Chamilo\CoreBundle\Repository\AccessUrlRepository;
use Chamilo\CoreBundle\Repository\CourseCategoryRepository;
use Chamilo\CoreBundle\Repository\CourseRepository;
use Chamilo\CoreBundle\Repository\IllustrationRepository;
use Chamilo\CoreBundle\Repository\UserRepository;
use Chamilo\CoreBundle\ToolChain;
use Chamilo\CourseBundle\Repository\CAnnouncementAttachmentRepository;
use Chamilo\CourseBundle\Repository\CAnnouncementRepository;
@ -37,7 +38,6 @@ use Chamilo\CourseBundle\Repository\CStudentPublicationCommentRepository;
use Chamilo\CourseBundle\Repository\CStudentPublicationRepository;
use Chamilo\PageBundle\Entity\Page;
use Chamilo\SettingsBundle\Manager\SettingsManager;
use Chamilo\CoreBundle\Repository\UserRepository;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;

@ -23,9 +23,6 @@ class MenuVoter implements VoterInterface
$this->requestStack = $requestStack;
}
/**
* @return bool|null
*/
public function matchItem(ItemInterface $item): ?bool
{
$request = $this->requestStack->getCurrentRequest();

@ -10,8 +10,8 @@ use Chamilo\CoreBundle\Component\Resource\Settings;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Symfony\Component\Form\FormInterface;
interface GridInterface

@ -12,9 +12,9 @@ use Chamilo\CoreBundle\Entity\Resource\AbstractResource;
use Chamilo\CoreBundle\Entity\Resource\ResourceFile;
use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Form\Resource\IllustrationType;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\File\UploadedFile;

@ -10,9 +10,9 @@ use Chamilo\CoreBundle\Component\Resource\Settings;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Form\Resource\PersonalFileType;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormInterface;

@ -17,12 +17,12 @@ use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
use Chamilo\CoreBundle\Entity\Resource\ResourceRight;
use Chamilo\CoreBundle\Entity\Resource\ResourceType;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Entity\Usergroup;
use Chamilo\CoreBundle\Security\Authorization\Voter\ResourceNodeVoter;
use Chamilo\CoreBundle\ToolChain;
use Chamilo\CourseBundle\Entity\CDocument;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CoreBundle\Entity\User;
use Cocur\Slugify\SlugifyInterface;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityRepository;

@ -26,10 +26,10 @@ use Chamilo\CoreBundle\Entity\TrackELastaccess;
use Chamilo\CoreBundle\Entity\TrackELogin;
use Chamilo\CoreBundle\Entity\TrackEOnline;
use Chamilo\CoreBundle\Entity\TrackEUploads;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Entity\UserCourseCategory;
use Chamilo\CoreBundle\Entity\UsergroupRelUser;
use Chamilo\CoreBundle\Entity\UserRelCourseVote;
use Chamilo\CoreBundle\Repository\ResourceRepository;
use Chamilo\CourseBundle\Entity\CAttendanceResult;
use Chamilo\CourseBundle\Entity\CAttendanceSheet;
use Chamilo\CourseBundle\Entity\CBlogPost;
@ -46,7 +46,6 @@ use Chamilo\CourseBundle\Entity\CStudentPublicationComment;
use Chamilo\CourseBundle\Entity\CSurveyAnswer;
use Chamilo\CourseBundle\Entity\CWiki;
use Chamilo\TicketBundle\Entity\Ticket;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\Common\Collections\Criteria;
use Doctrine\ORM\Query\Expr\Join;
use Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface;
@ -73,7 +72,6 @@ class UserRepository extends ResourceRepository implements UserLoaderInterface,
public function updateUser($user)
{
$this->getEntityManager()->persist($user);
$this->getEntityManager()->flush();
}

@ -5,8 +5,8 @@
namespace Chamilo\CoreBundle\Security\Authorization\Voter;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Repository\CourseRepository;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Repository\CourseRepository;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;

@ -5,8 +5,8 @@
namespace Chamilo\CoreBundle\Security\Authorization\Voter;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Repository\CourseRepository;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Repository\CourseRepository;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;

@ -7,7 +7,6 @@ namespace Chamilo\CoreBundle\Security;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Hook\CheckLoginCredentialsHook;
use Chamilo\CoreBundle\Hook\HookFactory;
use Chamilo\CoreBundle\Form\LoginType;
use Chamilo\CoreBundle\Repository\UserRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Form\FormFactoryInterface;
@ -55,7 +54,6 @@ class LoginFormAuthenticator extends AbstractFormLoginAuthenticator implements P
HookFactory $hookFactory,
UserRepository $userRepository,
CsrfTokenManagerInterface $csrfTokenManager
) {
$this->router = $router;
$this->passwordEncoder = $passwordEncoder;
@ -68,7 +66,6 @@ class LoginFormAuthenticator extends AbstractFormLoginAuthenticator implements P
$this->urlGenerator = $urlGenerator;
$this->csrfTokenManager = $csrfTokenManager;
$this->passwordEncoder = $passwordEncoder;
}
public function supports(Request $request): bool

@ -74,7 +74,7 @@ class TokenAuthenticator extends AbstractGuardAuthenticator
{
$data = [
// you may want to customize or obfuscate the message first
'message' => strtr($exception->getMessageKey(), $exception->getMessageData())
'message' => strtr($exception->getMessageKey(), $exception->getMessageData()),
// or to translate this message
// $this->translator->trans($exception->getMessageKey(), $exception->getMessageData())
@ -84,13 +84,13 @@ class TokenAuthenticator extends AbstractGuardAuthenticator
}
/**
* Called when authentication is needed, but it's not sent
* Called when authentication is needed, but it's not sent.
*/
public function start(Request $request, AuthenticationException $authException = null)
{
$data = [
// you might translate this message
'message' => 'Authentication Required'
'message' => 'Authentication Required',
];
return new JsonResponse($data, Response::HTTP_UNAUTHORIZED);

@ -8,9 +8,9 @@ use Chamilo\CoreBundle\Component\Utils\Glide;
use Chamilo\CoreBundle\Entity\Resource\AbstractResource;
use Chamilo\CoreBundle\Entity\Resource\ResourceInterface;
use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Repository\ResourceFactory;
use Chamilo\CoreBundle\Repository\ResourceRepository;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\EntityNotFoundException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;

@ -7,8 +7,8 @@ namespace Chamilo\CourseBundle\Entity;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Resource\AbstractResource;
use Chamilo\CoreBundle\Entity\Resource\ResourceInterface;
use Chamilo\CoreBundle\Traits\CourseTrait;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Traits\CourseTrait;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\Criteria;
use Doctrine\ORM\Mapping as ORM;

@ -5,12 +5,12 @@
namespace Chamilo\CourseBundle\EventListener;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CoreBundle\Security\Authorization\Voter\CourseVoter;
use Chamilo\CoreBundle\Security\Authorization\Voter\GroupVoter;
use Chamilo\CoreBundle\Security\Authorization\Voter\SessionVoter;
use Chamilo\CourseBundle\Controller\CourseControllerInterface;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\EntityManager;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
use Symfony\Component\DependencyInjection\ContainerInterface;

@ -7,9 +7,9 @@ namespace Chamilo\CourseBundle\Repository;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Repository\ResourceRepository;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\QueryBuilder;
final class CChatConversationRepository extends ResourceRepository

@ -11,12 +11,12 @@ use Chamilo\CoreBundle\Component\Resource\Template;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Form\Resource\CCourseDescriptionType;
use Chamilo\CoreBundle\Repository\GridInterface;
use Chamilo\CoreBundle\Repository\ResourceRepository;
use Chamilo\CourseBundle\Entity\CCourseDescription;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormInterface;

@ -11,13 +11,13 @@ use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Resource\ResourceLink;
use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Form\Resource\CDocumentType;
use Chamilo\CoreBundle\Repository\GridInterface;
use Chamilo\CoreBundle\Repository\ResourceRepository;
use Chamilo\CoreBundle\Repository\UploadInterface;
use Chamilo\CourseBundle\Entity\CDocument;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\File\UploadedFile;

@ -7,9 +7,9 @@ namespace Chamilo\CourseBundle\Repository;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Repository\ResourceRepository;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\QueryBuilder;
/**

@ -7,9 +7,9 @@ namespace Chamilo\CourseBundle\Repository;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Repository\ResourceRepository;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\QueryBuilder;
class CForumCategoryRepository extends ResourceRepository

@ -6,11 +6,11 @@ namespace Chamilo\CourseBundle\Repository;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Resource\AbstractResource;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Repository\ResourceRepository;
use Chamilo\CourseBundle\Entity\CForumPost;
use Chamilo\CourseBundle\Entity\CForumThread;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CoreBundle\Entity\User;
/**
* Class CForumPostRepository.

@ -11,12 +11,12 @@ use Chamilo\CoreBundle\Component\Resource\Template;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Form\Resource\CGlossaryType;
use Chamilo\CoreBundle\Repository\GridInterface;
use Chamilo\CoreBundle\Repository\ResourceRepository;
use Chamilo\CourseBundle\Entity\CGlossary;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormInterface;

@ -10,12 +10,12 @@ use Chamilo\CoreBundle\Component\Resource\Settings;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Form\Resource\CLinkType;
use Chamilo\CoreBundle\Repository\GridInterface;
use Chamilo\CoreBundle\Repository\ResourceRepository;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CourseBundle\Entity\CLink;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormInterface;

@ -9,12 +9,12 @@ use APY\DataGridBundle\Grid\Grid;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Form\Resource\CLinkType;
use Chamilo\CoreBundle\Repository\GridInterface;
use Chamilo\CoreBundle\Repository\ResourceRepository;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CourseBundle\Entity\CLink;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormInterface;

@ -6,8 +6,8 @@ namespace Chamilo\CourseBundle\Repository;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CourseBundle\Entity\CNotebook;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CourseBundle\Entity\CNotebook;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Common\Persistence\ManagerRegistry;

@ -8,10 +8,10 @@ use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Resource\AbstractResource;
use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Repository\ResourceRepository;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CourseBundle\Entity\CShortcut;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormInterface;

@ -6,8 +6,8 @@ namespace Chamilo\CourseBundle\Repository;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Repository\ResourceRepository;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Repository\ResourceRepository;
use Doctrine\ORM\Query\Expr\Join;
/**

@ -7,9 +7,9 @@ namespace Chamilo\CourseBundle\Repository;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Repository\ResourceRepository;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\QueryBuilder;
final class CThematicAdvanceRepository extends ResourceRepository

@ -7,9 +7,9 @@ namespace Chamilo\CourseBundle\Repository;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Repository\ResourceRepository;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\QueryBuilder;
final class CThematicPlanRepository extends ResourceRepository

@ -7,9 +7,9 @@ namespace Chamilo\CourseBundle\Repository;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Repository\ResourceRepository;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\QueryBuilder;
final class CThematicRepository extends ResourceRepository

@ -8,9 +8,9 @@ use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Resource\ResourceLink;
use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Repository\ResourceRepository;
use Chamilo\CourseBundle\Entity\CGroupInfo;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\QueryBuilder;
final class CToolRepository extends ResourceRepository

@ -4,8 +4,8 @@
namespace Chamilo\GraphQlBundle\Map;
use Chamilo\GraphQlBundle\Traits\GraphQLTrait;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\GraphQlBundle\Traits\GraphQLTrait;
use Overblog\GraphQLBundle\Resolver\ResolverMap;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;

@ -6,11 +6,11 @@ namespace Chamilo\GraphQlBundle\Map;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CourseBundle\Entity\CForumPost;
use Chamilo\CourseBundle\Entity\CForumThread;
use Chamilo\CourseBundle\Entity\CNotebook;
use Chamilo\GraphQlBundle\Traits\GraphQLTrait;
use Chamilo\CoreBundle\Entity\User;
use GraphQL\Type\Definition\ResolveInfo;
use Overblog\GraphQLBundle\Definition\Argument;
use Overblog\GraphQLBundle\Error\UserError;

@ -8,6 +8,7 @@ use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Message;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\SessionCategory;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Security\Authorization\Voter\CourseVoter;
use Chamilo\CoreBundle\Security\Authorization\Voter\SessionVoter;
use Chamilo\CourseBundle\Entity\CForumCategory;
@ -18,7 +19,6 @@ use Chamilo\CourseBundle\Entity\CLpCategory;
use Chamilo\CourseBundle\Entity\CNotebook;
use Chamilo\CourseBundle\Entity\CTool;
use Chamilo\GraphQlBundle\Traits\GraphQLTrait;
use Chamilo\CoreBundle\Entity\User;
use GraphQL\Type\Definition\ResolveInfo;
use Overblog\GraphQLBundle\Definition\Argument;
use Overblog\GraphQLBundle\Error\UserError;

@ -5,8 +5,8 @@
namespace Chamilo\GraphQlBundle\Resolver;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\GraphQlBundle\Traits\GraphQLTrait;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\GraphQlBundle\Traits\GraphQLTrait;
use Doctrine\Common\Collections\ArrayCollection;
use Overblog\GraphQLBundle\Definition\Argument;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;

@ -7,8 +7,8 @@ namespace Chamilo\GraphQlBundle\Traits;
use Chamilo\CoreBundle\Entity\AccessUrl;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\SettingsBundle\Manager\SettingsManager;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\SettingsBundle\Manager\SettingsManager;
use Doctrine\ORM\EntityManager;
use Firebase\JWT\JWT;
use Overblog\GraphQLBundle\Error\UserError;

@ -7,11 +7,11 @@ namespace Chamilo\LtiBundle\Controller;
use Chamilo\CoreBundle\Controller\BaseController;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CourseBundle\Entity\CTool;
use Chamilo\LtiBundle\Entity\ExternalTool;
use Chamilo\LtiBundle\Form\ExternalToolType;
use Chamilo\LtiBundle\Util\Utils;
use Chamilo\CoreBundle\Entity\User;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

@ -4,9 +4,9 @@
namespace Chamilo\LtiBundle\Util;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\LtiBundle\Entity\ExternalTool;
use Chamilo\SettingsBundle\Manager\SettingsManager;
use Chamilo\CoreBundle\Entity\User;
/**
* Class Utils.

Loading…
Cancel
Save