Passed
Push — master ( 121f34...84abac )
by Julito
12:32
created

CChatConversationRepository::getResourceSettings()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 10
rs 10
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CourseBundle\Repository;
6
7
use Chamilo\CoreBundle\Entity\Course;
8
use Chamilo\CoreBundle\Entity\Resource\ResourceNode;
9
use Chamilo\CoreBundle\Entity\Session;
10
use Chamilo\CoreBundle\Repository\ResourceRepository;
11
use Chamilo\CourseBundle\Entity\CGroupInfo;
12
use Chamilo\UserBundle\Entity\User;
13
use Doctrine\ORM\QueryBuilder;
14
15
final class CChatConversationRepository extends ResourceRepository
16
{
17
    public function getResources(User $user, ResourceNode $parentNode, Course $course = null, Session $session = null, CGroupInfo $group = null): QueryBuilder
18
    {
19
        return $this->getResourcesByCourse($course, $session, $group, $parentNode);
0 ignored issues
show
Bug introduced by
It seems like $course can also be of type null; however, parameter $course of Chamilo\CoreBundle\Repos...:getResourcesByCourse() does only seem to accept Chamilo\CoreBundle\Entity\Course, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

19
        return $this->getResourcesByCourse(/** @scrutinizer ignore-type */ $course, $session, $group, $parentNode);
Loading history...
20
    }
21
}
22