chamilo/chamilo-lms

View on GitHub
public/plugin/zoom/lib/MeetingRepository.php

Summary

Maintainability
A
0 mins
Test Coverage

Remove error control operator '@' on line 174.
Open

    public function periodUserMeetings($start, $end, $user = null)
    {
        /*return $this->userMeetings($user)->filter(
            function ($meeting) use ($start, $end) {
                return $meeting->startDateTime >= $start && $meeting->startDateTime <= $end;

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

Remove error control operator '@' on line 148.
Open

    public function unfinishedUserMeetings($user = null)
    {
        /*return $this->userMeetings($user)->filter(
           function ($meeting) {
               return 'finished' !== $meeting->getMeetingInfoGet()->status;

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

Multi-line function call not indented correctly; expected 16 spaces but found 20
Open

                    Criteria::expr()->andX(

Multi-line function call not indented correctly; expected 24 spaces but found 20
Open

                    Criteria::expr()->eq('course', $course),

Multi-line function call not indented correctly; expected 20 spaces but found 16
Open

                )

Multi-line function call not indented correctly; expected 24 spaces but found 20
Open

                    Criteria::expr()->eq('session', $session)

Multi-line function call not indented correctly; expected 24 spaces but found 17
Open

                 Criteria::expr()->eq('group', $group),

Multi-line function call not indented correctly; expected 20 spaces but found 16
Open

                )

Multi-line function call not indented correctly; expected 16 spaces but found 20
Open

                    Criteria::expr()->andX(

Multi-line function call not indented correctly; expected 24 spaces but found 20
Open

                    Criteria::expr()->eq('session', $session)

Multi-line function call not indented correctly; expected 24 spaces but found 17
Open

                 Criteria::expr()->eq('group', $group),

Multi-line function call not indented correctly; expected 24 spaces but found 20
Open

                    Criteria::expr()->eq('course', $course),

There are no issues that match your filters.

Category
Status