chamilo/chamilo-lms

View on GitHub
public/main/exercise/qti2.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '42', column '26').
Open

    $formValidator = new FormValidator(
Severity: Minor
Found in public/main/exercise/qti2.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 parameter $array_file is not named in camelCase.
Open

function importFile($array_file)
{
    $unzip = 0;
    $process = process_uploaded_file($array_file, false);

Severity: Minor
Found in public/main/exercise/qti2.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

Consider putting global function "displayForm" in a static class
Open

function displayForm()

Variable "main_path" is not in valid camel caps format
Open

        $main_path = api_get_path(SYS_CODE_PATH);

Variable "main_path" is not in valid camel caps format
Open

        require_once $main_path.'exercise/export/exercise_import.inc.php';

Variable "is_allowedToEdit" is not in valid camel caps format
Open

$is_allowedToEdit = api_is_allowed_to_edit(null, true);

Consider putting global function "importFile" in a static class
Open

function importFile($array_file)

Variable "array_file" is not in valid camel caps format
Open

function importFile($array_file)

Variable "array_file" is not in valid camel caps format
Open

        return import_exercise($array_file['name']);

Variable "this_section" is not in valid camel caps format
Open

$this_section = SECTION_COURSES;

Variable "array_file" is not in valid camel caps format
Open

    $process = process_uploaded_file($array_file, false);

Variable "array_file" is not in valid camel caps format
Open

    if (preg_match('/\.zip$/i', $array_file['name'])) {

The variable $array_file is not named in camelCase.
Open

function importFile($array_file)
{
    $unzip = 0;
    $process = process_uploaded_file($array_file, false);

Severity: Minor
Found in public/main/exercise/qti2.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $array_file is not named in camelCase.
Open

function importFile($array_file)
{
    $unzip = 0;
    $process = process_uploaded_file($array_file, false);

Severity: Minor
Found in public/main/exercise/qti2.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $main_path is not named in camelCase.
Open

function importFile($array_file)
{
    $unzip = 0;
    $process = process_uploaded_file($array_file, false);

Severity: Minor
Found in public/main/exercise/qti2.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $main_path is not named in camelCase.
Open

function importFile($array_file)
{
    $unzip = 0;
    $process = process_uploaded_file($array_file, false);

Severity: Minor
Found in public/main/exercise/qti2.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $array_file is not named in camelCase.
Open

function importFile($array_file)
{
    $unzip = 0;
    $process = process_uploaded_file($array_file, false);

Severity: Minor
Found in public/main/exercise/qti2.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

There are no issues that match your filters.

Category
Status