chamilo/chamilo-lms

View on GitHub
public/main/exercise/export/aiken/aiken_import.inc.php

Summary

Maintainability
A
0 mins
Test Coverage

The function aiken_import_exercise() has an NPath complexity of 4664. The configured NPath complexity threshold is 200.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

The function aiken_parse_file() has an NPath complexity of 3192. The configured NPath complexity threshold is 200.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

Missing class import via use statement (line '81', column '29').
Open

            $question = new Aiken2Question();

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 '27', column '27').
Open

    $form_validator = new FormValidator(

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 '95', column '27').
Open

            $answer = new Answer($last_question_id, $courseId, $exercise, false);

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 '71', column '21').
Open

    $exercise = new Exercise();

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 aiken_import_file uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            Display::addFlash(Display::return_message(get_lang($imported), 'error'));

            return false;
        }

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

The method aiken_parse_file uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

    } else {
        $text = str_ireplace(["\x0D", "\r\n"], "\n", $text); // Removes ^M char from win files.
        $data = explode("\n\n", $text);
    }

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

The method aiken_import_exercise uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    $answer->new_correct[$key] = 0;
                }

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

Avoid unused local variables such as '$file_found'.
Open

    $file_found = false;

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

Avoid unused local variables such as '$question'.
Open

    foreach ($exercise_info['question'] as $key => $question) {

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

The parameter $array_file is not named in camelCase.
Open

function aiken_import_file($array_file)
{
    $unzip = 0;
    $process = process_uploaded_file($array_file, false);
    if (preg_match('/\.(zip|txt)$/i', $array_file['name'])) {

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

The parameter $exercise_info is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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

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

    $form_validator->addElement('header', $name_tools);

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

    $form_validator->addElement('header', $name_tools);

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

    $exercise_info['question'] = [];

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

    $exercise->exercise = $exercise_info['name'];

Expected 68 spaces after parameter type; 1 found
Open

 * @param string $exercisePath

Superfluous parameter comment
Open

 * @param string $file

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

            $exercise_info['question'][$question_index]['correct_answers'][] = $correct_answer_index + 1;

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

            $exercise_info['question'][$question_index]['score'] = (float) $matches[1];

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

            $question_index++;

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

            $exercise_info['question'][$question_index]['feedback'] = $matches[1];

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

            $exercise_info['question'][$question_index]['answer_tags'] = explode(',', $matches[1]);

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

    if (!empty($last_exercise_id)) {

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

            foreach ($question_array['answer'] as $key => $answers) {

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

                $answer->new_comment[$key] = '';

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

            $answers_array[] = $matches[1];

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

            $exercise_info['question'][$question_index]['correct_answers'][] = $correct_answer_index + 1;

Missing parameter name
Open

 * @param   string  Report message to show in case of error

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

            if (isset($question_array['description'])) {

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

            $answer->new_nbrAnswers = count($question_array['answer']);

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

            $max_score = 0;

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

                    'position' => $answer->new_position[$key],

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

                ['iid = ?' => [$last_question_id]]

Superfluous parameter comment
Open

 * @param string $exercisePath

Expected 68 spaces after parameter type; 1 found
Open

 * @param string $file

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

            $exercise_info['question'][$question_index]['answer'][]['value'] = $matches[3];

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

    $form_validator->addElement('text', 'total_weight', get_lang('Total weight'));

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

            $exercise_info['question'][$question_index]['feedback'] = $matches[1];

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

    $form_validator->addButtonUpload(get_lang('Upload'), 'submit');

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

    foreach ($exercise_info['question'] as $key => $question) {

Missing parameter name
Open

 * @param string Name of the last directory part for the file (without /)

Superfluous parameter comment
Open

 * @param string $questionFile

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

        $exercise_info['question'][$question_index]['type'] = 'MCUA';

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

                $scoreFromFile = $question_array['score'];

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

                    if (isset($question_array['feedback'])) {

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

    $question_index = 0;

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

            $exercise_info['question'][$question_index]['feedback'] = $matches[1];

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

    $total_questions = count($exercise_info['question']);

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

    $total_weight = !empty($_POST['total_weight']) ? (int) ($_POST['total_weight']) : 20;

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

            $answer = new Answer($last_question_id, $courseId, $exercise, false);

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

                $answer->new_position[$key] = $key;

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

                    $answer->new_weighting[$key] = $scoreFromFile;

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

function aiken_display_form()

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

function aiken_import_exercise($file)

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

                if (isset($question_array['correct_answers']) &&

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

                        $answer->new_comment[$key] = $question_array['feedback'];

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

                    $answer->new_weighting[$key] = $question_array['weighting'][$key - 1];

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

                    $max_score += $question_array['weighting'][$key - 1];

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

                $answers_array = [];

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

    $total_questions = count($exercise_info['question']);

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

        if (!isset($exercise_info['question'][$key]['weighting'])) {

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

            $question->updateTitle($question_array['title']);

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

            $last_question_id = $question->getId();

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

                    'comment' => $answer->new_comment[$key],

Missing parameter name
Open

 * @param array The reference to the array in which to store the questions

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

            $correct_answer_index = array_search($matches[1], $answers_array);

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

                $answers_array = [];

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

            $correct_answer_index = array_search($matches[1], $answers_array);

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

            $exercise_info['question'][$question_index]['answer_tags'] = explode(',', $matches[1]);

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

    $form_validator = new FormValidator(

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

                    'answer' => $answer->new_answer[$key],

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

            $exercise_info['question'][$question_index]['weighting'][$correct_answer_index] = 1;

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

            $exercise_info['question'][$question_index]['score'] = (float) $matches[1];

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

                $question_index++;

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

            $exercise_info['question'][$question_index]['title'] = $matches[1];

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

            $exercise_info['question'][$question_index]['answer_tags'] = explode(',', $matches[1]);

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

    $name_tools = get_lang('Import Aiken quiz');

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

                if (isset($question_array['weighting'][$key - 1])) {

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

                if (!empty($scoreFromFile) && $answer->new_correct[$key]) {

Expected 68 spaces after parameter type; 1 found
Open

 * @param string $questionFile

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

function aiken_parse_file(&$exercise_info, $file)

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

function aiken_parse_file(&$exercise_info, $file)

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

            $exercise_info['question'][$question_index]['answer'][]['value'] = $matches[3];

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

            $exercise_info['question'][$question_index]['weighting'][$correct_answer_index] = 1;

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

            $correct_answer_index = array_search($matches[1], $answers_array);

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

    $form_validator->addElement('file', 'userFile', get_lang('File'));

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

                $answer->new_answer[$key] = $answers['value'];

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

                    $answer->new_correct[$key] = 1;

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

                        $answer->new_comment[$key] = $question_array['feedback'];

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

                    $max_score += $question_array['weighting'][$key - 1];

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

            $params = ['ponderation' => $max_score];

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

                $answers_array = [];

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

                $question->updateDescription($question_array['description']);

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

            $answer->new_nbrAnswers = count($question_array['answer']);

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

            if (isset($question_array['score']) && !empty($question_array['score'])) {

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

                    in_array($key, $question_array['correct_answers'])

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

                    'correct' => $answer->new_correct[$key],

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

            $correct_answer_index = array_search($matches[1], $answers_array);

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

            $exercise_info['question'][$question_index]['feedback'] = $matches[1];

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

    $exercise_info = [];

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

    $result = aiken_parse_file($exercise_info, $file);

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

        foreach ($exercise_info['question'] as $key => $question_array) {

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

            if (isset($question_array['score']) && !empty($question_array['score'])) {

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

                    $answer->new_correct[$key] = 0;

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

                    $answer->new_weighting[$key] = $question_array['weighting'][$key - 1];

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

    $answers_array = [];

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

        $exercise_info['question'][$question_index]['type'] = 'MCUA';

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

                $question_index++;

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

            $correct_answer_index = array_search($matches[1], $answers_array);

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

            $correct_answer_index = array_search($matches[1], $answers_array);

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

            $correct_answer_index = array_search($matches[1], $answers_array);

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

            $exercise_info['question'][$question_index]['title'] = $matches[1];

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

            $exercise_info['question'][$question_index]['answer_tags'] = explode(',', $matches[1]);

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

        $exercise_info['question'][$key]['weighting'][current(array_keys($exercise_info['question'][$key]['weighting']))] = $total_weight / $total_questions;

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

        foreach ($exercise_info['question'] as $key => $question_array) {

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

            $question->type = $question_array['type'];

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

                    'question_id' => $last_question_id,

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

                    'ponderation' => isset($answer->new_weighting[$key]) ? $answer->new_weighting[$key] : '',

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

                $max_score = $scoreFromFile;

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

        $operation = $last_exercise_id;

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

            $exercise_info['question'][$question_index]['correct_answers'][] = $correct_answer_index + 1;

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

            $exercise_info['question'][$question_index]['weighting'][$correct_answer_index] = 1;

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

            $exercise_info['question'][$question_index]['description'] = $matches[1];

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

        $exercise_info['question'][$key]['weighting'][current(array_keys($exercise_info['question'][$key]['weighting']))] = $total_weight / $total_questions;

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

    $last_exercise_id = $exercise->getId();

Missing parameter name
Open

 * @param string Path to the directory with the file to be parsed (without final /)

Missing parameter name
Open

 * @param string Name of the file to be parsed (including extension)

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

            $answers_array = [];

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

            $correct_answer_index = array_search($matches[1], $answers_array);

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

    $form .= $form_validator->returnForm();

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

    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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

    $file_found = false;

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

                    'ponderation' => isset($answer->new_weighting[$key]) ? $answer->new_weighting[$key] : '',

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

            $exercise_info['question'][$question_index]['description'] = $matches[1];

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

                $question_index++;

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

        $exercise_info['question'][$key]['weighting'][current(array_keys($exercise_info['question'][$key]['weighting']))] = $total_weight / $total_questions;

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

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

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

        $exercise_info['question'][$key]['weighting'][current(array_keys($exercise_info['question'][$key]['weighting']))] = $total_weight / $total_questions;

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

    $process = process_uploaded_file($array_file, false);

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

function aiken_import_file($array_file)

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

function aiken_import_file($array_file)

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

        $imported = aiken_import_exercise($array_file['name']);

The variable $exercise_info is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $question_array is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $question_array is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $last_exercise_id is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $answers_array is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $question_array is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $question_array is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $exercise_info is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $answers_array is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 aiken_import_file($array_file)
{
    $unzip = 0;
    $process = process_uploaded_file($array_file, false);
    if (preg_match('/\.(zip|txt)$/i', $array_file['name'])) {

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 $question_array is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $question_array is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $question_array is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $answers_array is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $total_questions is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 aiken_import_file($array_file)
{
    $unzip = 0;
    $process = process_uploaded_file($array_file, false);
    if (preg_match('/\.(zip|txt)$/i', $array_file['name'])) {

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 $form_validator is not named in camelCase.
Open

function aiken_display_form()
{
    $name_tools = get_lang('Import Aiken quiz');
    $form = '<div class="actions">';
    $form .= '<a href="exercise.php?show=test&'.api_get_cidreq().'">'.

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 $exercise_info is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $file_found is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $last_exercise_id is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $question_array is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $max_score is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $exercise_info is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $answers_array is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $name_tools is not named in camelCase.
Open

function aiken_display_form()
{
    $name_tools = get_lang('Import Aiken quiz');
    $form = '<div class="actions">';
    $form .= '<a href="exercise.php?show=test&'.api_get_cidreq().'">'.

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 $question_array is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $question_array is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $question_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $last_exercise_id is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $last_question_id is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $exercise_info is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $correct_answer_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $answers_array is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $answers_array is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $exercise_info is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $form_validator is not named in camelCase.
Open

function aiken_display_form()
{
    $name_tools = get_lang('Import Aiken quiz');
    $form = '<div class="actions">';
    $form .= '<a href="exercise.php?show=test&'.api_get_cidreq().'">'.

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 $question_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $answers_array is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $exercise_info is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $answers_array is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $question_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $exercise_info is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $question_array is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $question_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 aiken_import_file($array_file)
{
    $unzip = 0;
    $process = process_uploaded_file($array_file, false);
    if (preg_match('/\.(zip|txt)$/i', $array_file['name'])) {

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 $exercise_info is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $question_array is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $question_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $question_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $form_validator is not named in camelCase.
Open

function aiken_display_form()
{
    $name_tools = get_lang('Import Aiken quiz');
    $form = '<div class="actions">';
    $form .= '<a href="exercise.php?show=test&'.api_get_cidreq().'">'.

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 $question_array is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $question_array is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $exercise_info is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $correct_answer_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $exercise_info is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $correct_answer_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $exercise_info is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $exercise_info is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $exercise_info is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $name_tools is not named in camelCase.
Open

function aiken_display_form()
{
    $name_tools = get_lang('Import Aiken quiz');
    $form = '<div class="actions">';
    $form .= '<a href="exercise.php?show=test&'.api_get_cidreq().'">'.

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 $question_array is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $question_array is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $max_score is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $correct_answer_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $correct_answer_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $answers_array is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $total_questions is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $exercise_info is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $exercise_info is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $last_question_id is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $last_question_id is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $answers_array is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $question_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $question_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $form_validator is not named in camelCase.
Open

function aiken_display_form()
{
    $name_tools = get_lang('Import Aiken quiz');
    $form = '<div class="actions">';
    $form .= '<a href="exercise.php?show=test&'.api_get_cidreq().'">'.

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 $max_score is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $question_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $question_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $question_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $total_weight is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $total_weight is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $exercise_info is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $question_array is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $max_score is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $exercise_info is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $question_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $form_validator is not named in camelCase.
Open

function aiken_display_form()
{
    $name_tools = get_lang('Import Aiken quiz');
    $form = '<div class="actions">';
    $form .= '<a href="exercise.php?show=test&'.api_get_cidreq().'">'.

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 $form_validator is not named in camelCase.
Open

function aiken_display_form()
{
    $name_tools = get_lang('Import Aiken quiz');
    $form = '<div class="actions">';
    $form .= '<a href="exercise.php?show=test&'.api_get_cidreq().'">'.

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 $exercise_info is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $last_question_id is not named in camelCase.
Open

function aiken_import_exercise($file)
{
    // set some default values for the new exercise
    $exercise_info = [];
    $exercise_info['name'] = preg_replace('/.(txt)$/i', '', $file);

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 $question_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $question_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $question_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $correct_answer_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $exercise_info is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $question_index is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $exercise_info is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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 $exercise_info is not named in camelCase.
Open

function aiken_parse_file(&$exercise_info, $file)
{
    if (!is_file($file)) {
        return 'FileNotFound';
    }

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