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

CForumAttachmentRepository::getResources()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 5
dl 0
loc 3
rs 10
c 1
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
/**
15
 * Class CForumAttachmentRepository.
16
 */
17
class CForumAttachmentRepository extends ResourceRepository
18
{
19
    public function getResources(User $user, ResourceNode $parentNode, Course $course = null, Session $session = null, CGroupInfo $group = null)
20
    {
21
        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

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