chamilo/chamilo-lms

View on GitHub
src/CourseBundle/Component/CourseCopy/CourseArchiver.php

Summary

Maintainability
A
0 mins
Test Coverage

The method createBackup() has an NPath complexity of 1285956. The configured NPath complexity threshold is 200.
Open

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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 138.
Open

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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 118.
Open

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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 160.
Open

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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 96.
Open

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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 101.
Open

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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 90.
Open

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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 182.
Open

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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 106.
Open

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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 174.
Open

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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 51.
Open

    public static function cleanBackupDir()
    {
        $dir = self::getBackupDir();
        if (is_dir($dir)) {
            if ($handle = @opendir($dir)) {

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 167.
Open

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

Avoid assigning values to variables in if clauses and the like (line '51', column '17').
Open

    public static function cleanBackupDir()
    {
        $dir = self::getBackupDir();
        if (is_dir($dir)) {
            if ($handle = @opendir($dir)) {

IfStatementAssignment

Since: 2.7.0

Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

Example

class Foo
{
    public function bar($flag)
    {
        if ($foo = 'bar') { // possible typo
            // ...
        }
        if ($baz = 0) { // always false
            // ...
        }
    }
}

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

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

                } else {
                    @mkdir($backup_dir.$document->path, $perm_dirs, true);
                }

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 assigning values to variables in if clauses and the like (line '222', column '13').
Open

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

IfStatementAssignment

Since: 2.7.0

Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

Example

class Foo
{
    public function bar($flag)
    {
        if ($foo = 'bar') { // possible typo
            // ...
        }
        if ($baz = 0) { // always false
            // ...
        }
    }
}

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

Avoid unused parameters such as '$delete'.
Open

    public static function readCourse($filename, $delete = false)

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

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

Avoid unused parameters such as '$filename'.
Open

    public static function readCourse($filename, $delete = false)

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

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

The parameter $user_id is not named in camelCase.
Open

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

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 "user_id" is not in valid camel caps format
Open

    public static function getAvailableBackups($user_id = null)

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

                    $course_code = $file_parts[1];

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

                    if ('zip' == $ext && (null != $user_id && $owner_id == $user_id || null == $user_id)) {

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

            $fs->mkdir($new_dir);

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

            $doc_dir = dirname($backup_dir.'/upload/learning_path/');

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

            $doc_dir = dirname($backup_dir.'/upload/announcements/');

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

            $doc_dir = $backup_dir.'work';

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

                    if ('zip' == $ext && (null != $user_id && $owner_id == $user_id || null == $user_id)) {

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

        return $backup_files;

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

        $fp = @fopen($course_info_file, 'w');

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

                    $doc_dir = $backup_dir.$document->path;

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

            @mkdir($doc_dir, $perm_dirs, true);

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

                @mkdir(dirname($doc_dir), $perm_dirs, true);

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

        if (!is_dir($new_dir)) {

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

                    @mkdir(dirname($doc_dir), $perm_dirs, true);

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

            $doc_dir = $backup_dir.'work';

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

                    if ('zip' == $ext && (null != $user_id && $owner_id == $user_id || null == $user_id)) {

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

        if (is_dir($new_dir) && is_writable($new_dir)) {

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

                if ('document' === $document->file_type) {

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

            copyDirTo($course->path.'upload/calendar/', $doc_dir, false);

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

        $zip->create($backup_dir, PCLZIP_OPT_REMOVE_PATH, $backup_dir);

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

        $res = @mkdir($backup_dir, $perm_dirs);

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

                    $doc_dir = $backup_dir.$document->path;

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

            $doc_dir = dirname($backup_dir.'/upload/calendar/');

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

            $doc_dir = dirname($backup_dir.'/upload/learning_path/');

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

            $doc_dir = dirname($backup_dir.'/upload/announcements/');

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

                $file_parts = explode('_', $file);

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

                if (3 == count($file_parts)) {

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

        $res = @mkdir($backup_dir, $perm_dirs);

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

                    @mkdir(dirname($doc_dir), $perm_dirs, true);

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

            copyDirWithoutFilesTo($course->path.'work/', $doc_dir);

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

        $course_info_file = $backup_dir.'course_info.dat';

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

                                $contents = file_get_contents($doc_dir);

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

            @mkdir($doc_dir, $perm_dirs, true);

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

            @mkdir($doc_dir, $perm_dirs, true);

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

            copyDirTo($course->path.'upload/announcements/', $doc_dir, false);

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

                    $owner_id = $file_parts[0];

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

                                file_put_contents($doc_dir, $contents);

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

                copyDirTo($course->path.$document->path, $backup_dir.$document->path, false);

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

        rmdirr($backup_dir);

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

                    $owner_id = $file_parts[0];

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

                    $file_parts = explode('.', $file_parts[2]);

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

                    $ext = isset($file_parts[1]) ? $file_parts[1] : null;

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

                    if ('zip' == $ext && (null != $user_id && $owner_id == $user_id || null == $user_id)) {

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

                    @mkdir($backup_dir.$document->path, $perm_dirs, true);

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

        $backup_files = [];

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

        $new_filename = uniqid('import_file', true).'.zip';

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

                $doc_dir = $backup_dir.$asset->path;

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

                @mkdir(dirname($doc_dir), $perm_dirs, true);

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

                        $backup_files[] = [

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

                            'course_code' => $course_code,

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

        $new_dir = self::getBackupDir();

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

            move_uploaded_file($file, $new_dir.$new_filename);

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

            return $new_filename;

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

            $doc_dir = dirname($backup_dir.'/upload/calendar/');

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

                    $file_parts = explode('.', $file_parts[2]);

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

            move_uploaded_file($file, $new_dir.$new_filename);

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

        $perm_dirs = api_get_permissions_for_new_directories();

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

            @mkdir($doc_dir, $perm_dirs, true);

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

            @mkdir($doc_dir, $perm_dirs, true);

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

            @mkdir($doc_dir, $perm_dirs, true);

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

            copyDirTo($course->path.'upload/learning_path/', $doc_dir, false);

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

        if (is_dir($new_dir) && is_writable($new_dir)) {

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

        $course_info_file = $backup_dir.'course_info.dat';

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

            @mkdir($doc_dir, $perm_dirs, true);

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

            @mkdir($doc_dir, $perm_dirs, true);

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

                $doc_dir = $backup_dir.$asset->path;

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

                copy($course->path.$asset->path, $doc_dir);

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

        $zip->create($backup_dir, PCLZIP_OPT_REMOVE_PATH, $backup_dir);

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

                    $course_code = $file_parts[1];

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

                    $ext = isset($file_parts[1]) ? $file_parts[1] : null;

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

        $backup_dir = $backupDirectory.'CourseArchiver_'.api_get_unique_id().'/';

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

                        copy($course->path.$document->path, $doc_dir);

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

                    @mkdir($backup_dir.$document->path, $perm_dirs, true);

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

                    copyDirTo($course->path.$asset->path, $doc_dir, false);

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

                    $date = $file_parts[0];

The variable $perm_dirs is not named in camelCase.
Open

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function createBackup($course)
    {
        self::cleanBackupDir();
        self::createBackupDir();

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

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

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

    public static function importUploadedFile($file)
    {
        $new_filename = uniqid('import_file', true).'.zip';
        $new_dir = self::getBackupDir();
        if (!is_dir($new_dir)) {

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

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

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

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

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

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

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

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

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

    public static function importUploadedFile($file)
    {
        $new_filename = uniqid('import_file', true).'.zip';
        $new_dir = self::getBackupDir();
        if (!is_dir($new_dir)) {

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

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

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

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

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

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

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

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

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

    public static function importUploadedFile($file)
    {
        $new_filename = uniqid('import_file', true).'.zip';
        $new_dir = self::getBackupDir();
        if (!is_dir($new_dir)) {

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

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

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

    public static function importUploadedFile($file)
    {
        $new_filename = uniqid('import_file', true).'.zip';
        $new_dir = self::getBackupDir();
        if (!is_dir($new_dir)) {

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

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

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

    public static function importUploadedFile($file)
    {
        $new_filename = uniqid('import_file', true).'.zip';
        $new_dir = self::getBackupDir();
        if (!is_dir($new_dir)) {

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

    public static function importUploadedFile($file)
    {
        $new_filename = uniqid('import_file', true).'.zip';
        $new_dir = self::getBackupDir();
        if (!is_dir($new_dir)) {

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

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

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

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

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

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

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

    public static function importUploadedFile($file)
    {
        $new_filename = uniqid('import_file', true).'.zip';
        $new_dir = self::getBackupDir();
        if (!is_dir($new_dir)) {

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

    public static function importUploadedFile($file)
    {
        $new_filename = uniqid('import_file', true).'.zip';
        $new_dir = self::getBackupDir();
        if (!is_dir($new_dir)) {

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

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

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

    public static function getAvailableBackups($user_id = null)
    {
        $backup_files = [];
        $dirname = self::getBackupDir();

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

    public static function importUploadedFile($file)
    {
        $new_filename = uniqid('import_file', true).'.zip';
        $new_dir = self::getBackupDir();
        if (!is_dir($new_dir)) {

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