Minor - remove unneeded variable definition

pull/3378/head
Julio Montoya 5 years ago
parent 7d31cc6d51
commit 7d1b77ca27
  1. 3
      src/Chamilo/UserBundle/Entity/User.php
  2. 4
      src/Chamilo/UserBundle/Repository/UserRepository.php

@ -3,6 +3,7 @@
namespace Chamilo\UserBundle\Entity;
use Chamilo\CoreBundle\Entity\CourseRelUser;
use Chamilo\CoreBundle\Entity\ExtraFieldValues;
use Chamilo\CoreBundle\Entity\SessionRelCourseRelUser;
use Chamilo\CoreBundle\Entity\Skill;
@ -747,7 +748,7 @@ class User implements UserInterface //implements ParticipantInterface, ThemeUser
}
/**
* @return ArrayCollection
* @return ArrayCollection|UsergroupRelUser[]
*/
public function getClasses()
{

@ -511,7 +511,6 @@ class UserRepository extends EntityRepository
$courses = $user->getCourses();
$list = [];
$chatFiles = [];
/** @var CourseRelUser $course */
foreach ($courses as $course) {
$list[] = $course->getCourse()->getCode();
$courseDir = api_get_path(SYS_COURSE_PATH).$course->getCourse()->getDirectory();
@ -531,7 +530,6 @@ class UserRepository extends EntityRepository
$classes = $user->getClasses();
$list = [];
/** @var UsergroupRelUser $class */
foreach ($classes as $class) {
$name = $class->getUsergroup()->getName();
$list[$class->getUsergroup()->getGroupType()][] = $name.' - Status: '.$class->getRelationType();
@ -540,14 +538,12 @@ class UserRepository extends EntityRepository
$collection = $user->getSessionCourseSubscriptions();
$list = [];
/** @var SessionRelCourseRelUser $item */
foreach ($collection as $item) {
$list[$item->getSession()->getName()][] = $item->getCourse()->getCode();
}
$user->setSessionCourseSubscriptions($list);
$documents = \DocumentManager::getAllDocumentsCreatedByUser($userId);
$friends = \SocialManager::get_friends($userId);
$friendList = [];
if (!empty($friends)) {

Loading…
Cancel
Save