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

CForumAttachmentRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 5
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getResources() 0 3 1
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