Showing 910 of 910 total issues

Missing class import via use statement (line '69', column '24').
Open

            $sql = new Pluf_SQL('topic=%s', array(
Severity: Minor
Found in src/ELearn/Views/Course.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '92', column '24').
Open

            $sql = new Pluf_SQL('lesson=%s', array(
Severity: Minor
Found in src/ELearn/Views/Part.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '160', column '21').
Open

        $form = new ELearn_Form_PartUpdate(array_merge($request->REQUEST, $request->FILES), $extra);
Severity: Minor
Found in src/ELearn/Views/Part.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

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

    function save($commit = true)
    {
        if (! $this->isValid()) {
            throw new Pluf_Exception_Form('cannot save the Part from an invalid form', $this);
        }
Severity: Minor
Found in src/ELearn/Form/PartCreate.php by phpmd

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

The method preSave has a boolean flag argument $create, which is a certain sign of a Single Responsibility Principle violation.
Open

    function preSave($create = false)
Severity: Minor
Found in src/ELearn/Grade.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

Missing class import via use statement (line '163', column '24').
Open

            $sql = new Pluf_SQL($request->REQUEST['_px_fk'] . '=%s', $request->REQUEST['_px_fv']);
Severity: Minor
Found in src/ELearn/Searcher.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '48', column '20').
Open

        return new Pluf_HTTP_Response_Json($course);
Severity: Minor
Found in src/ELearn/Views/Course.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

The method preSave has a boolean flag argument $create, which is a certain sign of a Single Responsibility Principle violation.
Open

    function preSave($create = false)
Severity: Minor
Found in src/ELearn/Domain.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method save has a boolean flag argument $commit, which is a certain sign of a Single Responsibility Principle violation.
Open

    function save($commit = true)
Severity: Minor
Found in src/ELearn/Form/PartCreate.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

Missing class import via use statement (line '48', column '20').
Open

        return new Pluf_HTTP_Response_Json($lesson);
Severity: Minor
Found in src/ELearn/Views/Lesson.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '119', column '20').
Open

        return new Pluf_HTTP_Response_Json($lessonCopy);
Severity: Minor
Found in src/ELearn/Views/Lesson.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '190', column '25').
Open

        $response = new Pluf_HTTP_Response_File($part->getAbsloutPath(), $part->mime_type);
Severity: Minor
Found in src/ELearn/Views/Part.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '119', column '20').
Open

        return new Pluf_HTTP_Response_Json($courseCopy);
Severity: Minor
Found in src/ELearn/Views/Course.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '38', column '21').
Open

        $form = new ELearn_Form_PartUpdate(array_merge($request->REQUEST, $request->FILES), $extra);
Severity: Minor
Found in src/ELearn/Views/Part.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '162', column '20').
Open

        return new Pluf_HTTP_Response_Json($part);
Severity: Minor
Found in src/ELearn/Views/Part.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

The method postSave has a boolean flag argument $create, which is a certain sign of a Single Responsibility Principle violation.
Open

    function postSave($create = false)
Severity: Minor
Found in src/ELearn/Part.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method preSave has a boolean flag argument $create, which is a certain sign of a Single Responsibility Principle violation.
Open

    function preSave($create = false)
Severity: Minor
Found in src/ELearn/PartHistory.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

Missing class import via use statement (line '135', column '27').
Open

                throw new Pluf_Exception_DoesNotExist('Lesson with id (' . $lesson->id . ') does not exist in course with id (' . $course->id . ')');
Severity: Minor
Found in src/ELearn/Views/Lesson.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '114', column '27').
Open

                throw new Pluf_Exception_DoesNotExist('Course with id (' . $courseId . ') does not exist in topic with id (' . $topicId . ')');
Severity: Minor
Found in src/ELearn/Views/Course.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '138', column '28').
Open

        $plufService = new Pluf_Views();
Severity: Minor
Found in src/ELearn/Views/Lesson.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Severity
Category
Status
Source
Language