chamilo/chamilo-lms

View on GitHub
public/plugin/pens/pens.php

Summary

Maintainability
A
0 mins
Test Coverage

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

        $server->sendAlert($request, new PENSResponse(0, 'Package successfully processed'));
Severity: Minor
Found in public/plugin/pens/pens.php by phpmd

MissingImport

Since: 2.7.0

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

Example

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

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

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

        $chamilo_pens = new ChamiloPens($request);
Severity: Minor
Found in public/plugin/pens/pens.php by phpmd

MissingImport

Since: 2.7.0

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

Example

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

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

The parameter $path_to_package is not named in camelCase.
Open

    public function processPackage($request, $path_to_package)
    {
        $server = PENSServer::singleton();
        // Moves the package to archive/pens
        $path_to_archives = api_get_path(SYS_ARCHIVE_PATH).'pens';
Severity: Minor
Found in public/plugin/pens/pens.php by phpmd

CamelCaseParameterName

Since: 0.2

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

Example

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

Source

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

            mkdir($path_to_archives, $mode, true);
Severity: Minor
Found in public/plugin/pens/pens.php by phpcodesniffer

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

        rename($path_to_package, $path_to_archives.'/'.$request->getFilename());
Severity: Minor
Found in public/plugin/pens/pens.php by phpcodesniffer

Missing function doc comment
Open

    public function processPackage($request, $path_to_package)
Severity: Minor
Found in public/plugin/pens/pens.php by phpcodesniffer

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

    public function processPackage($request, $path_to_package)
Severity: Minor
Found in public/plugin/pens/pens.php by phpcodesniffer

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

        $path_to_archives = api_get_path(SYS_ARCHIVE_PATH).'pens';
Severity: Minor
Found in public/plugin/pens/pens.php by phpcodesniffer

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

        $chamilo_pens->save();
Severity: Minor
Found in public/plugin/pens/pens.php by phpcodesniffer

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

        if (!is_dir($path_to_archives)) {
Severity: Minor
Found in public/plugin/pens/pens.php by phpcodesniffer

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

        rename($path_to_package, $path_to_archives.'/'.$request->getFilename());
Severity: Minor
Found in public/plugin/pens/pens.php by phpcodesniffer

Missing class doc comment
Open

class ChamiloPackageHandler extends PENSPackageHandler
Severity: Minor
Found in public/plugin/pens/pens.php by phpcodesniffer

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

        $chamilo_pens = new ChamiloPens($request);
Severity: Minor
Found in public/plugin/pens/pens.php by phpcodesniffer

The variable $path_to_archives is not named in camelCase.
Open

    public function processPackage($request, $path_to_package)
    {
        $server = PENSServer::singleton();
        // Moves the package to archive/pens
        $path_to_archives = api_get_path(SYS_ARCHIVE_PATH).'pens';
Severity: Minor
Found in public/plugin/pens/pens.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $chamilo_pens is not named in camelCase.
Open

    public function processPackage($request, $path_to_package)
    {
        $server = PENSServer::singleton();
        // Moves the package to archive/pens
        $path_to_archives = api_get_path(SYS_ARCHIVE_PATH).'pens';
Severity: Minor
Found in public/plugin/pens/pens.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $path_to_archives is not named in camelCase.
Open

    public function processPackage($request, $path_to_package)
    {
        $server = PENSServer::singleton();
        // Moves the package to archive/pens
        $path_to_archives = api_get_path(SYS_ARCHIVE_PATH).'pens';
Severity: Minor
Found in public/plugin/pens/pens.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $path_to_archives is not named in camelCase.
Open

    public function processPackage($request, $path_to_package)
    {
        $server = PENSServer::singleton();
        // Moves the package to archive/pens
        $path_to_archives = api_get_path(SYS_ARCHIVE_PATH).'pens';
Severity: Minor
Found in public/plugin/pens/pens.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $path_to_package is not named in camelCase.
Open

    public function processPackage($request, $path_to_package)
    {
        $server = PENSServer::singleton();
        // Moves the package to archive/pens
        $path_to_archives = api_get_path(SYS_ARCHIVE_PATH).'pens';
Severity: Minor
Found in public/plugin/pens/pens.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $chamilo_pens is not named in camelCase.
Open

    public function processPackage($request, $path_to_package)
    {
        $server = PENSServer::singleton();
        // Moves the package to archive/pens
        $path_to_archives = api_get_path(SYS_ARCHIVE_PATH).'pens';
Severity: Minor
Found in public/plugin/pens/pens.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $path_to_archives is not named in camelCase.
Open

    public function processPackage($request, $path_to_package)
    {
        $server = PENSServer::singleton();
        // Moves the package to archive/pens
        $path_to_archives = api_get_path(SYS_ARCHIVE_PATH).'pens';
Severity: Minor
Found in public/plugin/pens/pens.php by phpmd

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

There are no issues that match your filters.

Category
Status