Passed
Push — master ( ff7940...243d80 )
by Julito
16:14
created

CForumCategoryRepository::findAllInCourse()   A

Complexity

Conditions 4
Paths 4

Size

Total Lines 41
Code Lines 21

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 21
nc 4
nop 3
dl 0
loc 41
rs 9.584
c 0
b 0
f 0
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
14
class CForumCategoryRepository extends ResourceRepository
15
{
16
    public function getResources(User $user, ResourceNode $parentNode, Course $course = null, Session $session = null, CGroupInfo $group = null)
17
    {
18
        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

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