chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '152', column '83').
Open

                    $this->_updated_at = new DateTime($request['updated_at'], new DateTimeZone('UTC'));
Severity: Minor
Found in public/plugin/pens/chamilo_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 '150', column '42').
Open

                $this->_created_at = new DateTime($request['created_at'], new DateTimeZone('UTC'));
Severity: Minor
Found in public/plugin/pens/chamilo_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 '152', column '46').
Open

                    $this->_updated_at = new DateTime($request['updated_at'], new DateTimeZone('UTC'));
Severity: Minor
Found in public/plugin/pens/chamilo_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 '150', column '79').
Open

                $this->_created_at = new DateTime($request['created_at'], new DateTimeZone('UTC'));
Severity: Minor
Found in public/plugin/pens/chamilo_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 method findByPackageId uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            return null;
        }
Severity: Minor
Found in public/plugin/pens/chamilo_pens.php by phpmd

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

        } else {
            if (is_array($request)) {
                $this->_id = $request['id'];
                $this->_pens_version = $request['pens_version'];
                $this->_package_type = $request['package_type'];
Severity: Minor
Found in public/plugin/pens/chamilo_pens.php by phpmd

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

    public static function findByPackageId($package_id)
    {
        $table = Database::get_main_table(self::TABLE_NAME);
        $sql_query = "SELECT * FROM $table WHERE package_id = '".$package_id."';";
        $results = Database::query($sql_query);
Severity: Minor
Found in public/plugin/pens/chamilo_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

The property $_package_type_version is not named in camelCase.
Open

class ChamiloPens extends Plugin
{
    /**
     * Database table to be used.
     */
Severity: Minor
Found in public/plugin/pens/chamilo_pens.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $_pens_version is not named in camelCase.
Open

class ChamiloPens extends Plugin
{
    /**
     * Database table to be used.
     */
Severity: Minor
Found in public/plugin/pens/chamilo_pens.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $_vendor_data is not named in camelCase.
Open

class ChamiloPens extends Plugin
{
    /**
     * Database table to be used.
     */
Severity: Minor
Found in public/plugin/pens/chamilo_pens.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $_package_name is not named in camelCase.
Open

class ChamiloPens extends Plugin
{
    /**
     * Database table to be used.
     */
Severity: Minor
Found in public/plugin/pens/chamilo_pens.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $_id is not named in camelCase.
Open

class ChamiloPens extends Plugin
{
    /**
     * Database table to be used.
     */
Severity: Minor
Found in public/plugin/pens/chamilo_pens.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $_created_at is not named in camelCase.
Open

class ChamiloPens extends Plugin
{
    /**
     * Database table to be used.
     */
Severity: Minor
Found in public/plugin/pens/chamilo_pens.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $_package_type is not named in camelCase.
Open

class ChamiloPens extends Plugin
{
    /**
     * Database table to be used.
     */
Severity: Minor
Found in public/plugin/pens/chamilo_pens.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $_client is not named in camelCase.
Open

class ChamiloPens extends Plugin
{
    /**
     * Database table to be used.
     */
Severity: Minor
Found in public/plugin/pens/chamilo_pens.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $_updated_at is not named in camelCase.
Open

class ChamiloPens extends Plugin
{
    /**
     * Database table to be used.
     */
Severity: Minor
Found in public/plugin/pens/chamilo_pens.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $_package_format is not named in camelCase.
Open

class ChamiloPens extends Plugin
{
    /**
     * Database table to be used.
     */
Severity: Minor
Found in public/plugin/pens/chamilo_pens.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The property $_package_id is not named in camelCase.
Open

class ChamiloPens extends Plugin
{
    /**
     * Database table to be used.
     */
Severity: Minor
Found in public/plugin/pens/chamilo_pens.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

Property name "$_package_id" should not be prefixed with an underscore to indicate visibility
Open

    protected $_package_id = null;

Member variable "_package_id" is not in valid camel caps format
Open

    protected $_package_id = null;

Property name "$_id" should not be prefixed with an underscore to indicate visibility
Open

    protected $_id = null;

Property name "$_pens_version" should not be prefixed with an underscore to indicate visibility
Open

    protected $_pens_version = null;

Property name "$_package_type" should not be prefixed with an underscore to indicate visibility
Open

    protected $_package_type = null;

Property name "$_client" should not be prefixed with an underscore to indicate visibility
Open

    protected $_client = null;

Member variable "_package_type_version" is not in valid camel caps format
Open

    protected $_package_type_version = null;

Property name "$_package_format" should not be prefixed with an underscore to indicate visibility
Open

    protected $_package_format = null;

Member variable "_package_format" is not in valid camel caps format
Open

    protected $_package_format = null;

Property name "$_vendor_data" should not be prefixed with an underscore to indicate visibility
Open

    protected $_vendor_data = null;

Member variable "_created_at" is not in valid camel caps format
Open

    protected $_created_at = null;

Missing function doc comment
Open

    public function getPackageFormat()

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

                $this->_created_at = new DateTime($request['created_at'], new DateTimeZone('UTC'));

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

        $clean_vendor_data = Database::escape_string($this->_vendor_data);

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

    public static function findByPackageId($package_id)

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

        return $this->_package_format;

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

            $this->_package_type = $request->getPackageType();

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

                $this->_package_type_version = $request['package_type_version'];

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

        $results = Database::query($sql_query);

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

        $sql_query = "INSERT INTO $table (pens_version, package_type, package_type_version, package_format, package_id, client, vendor_data, package_name, created_at) VALUES (".

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

            "'".$this->_pens_version."', ".

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

            $this->_package_id = $request->getPackageId();

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

            "'".$created_at."') ON DUPLICATE KEY UPDATE ".

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

                $this->_pens_version = $request['pens_version'];

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

        $sql_query = "SELECT * FROM $table WHERE package_id = '".$package_id."';";

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

                    $this->_updated_at = new DateTime($request['updated_at'], new DateTimeZone('UTC'));

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

        $clean_package_id = Database::escape_string($this->_package_id);

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

        $clean_package_id = Database::escape_string($this->_package_id);

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

            "'".$clean_package_type_version."', ".

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

            "'".$this->_package_format."', ".

Missing function doc comment
Open

    public function getPackageName()

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

            $this->_vendor_data = $request->getVendorData();

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

        $clean_vendor_data = Database::escape_string($this->_vendor_data);

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

        return $this->_package_id;

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

            $this->_package_type_version = $request->getPackageTypeVersion();

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

            $this->_package_format = $request->getPackageFormat();

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

            "'".$clean_client."', ".

Missing function doc comment
Open

    public function getId()

Member variable "_package_name" is not in valid camel caps format
Open

    protected $_package_name = null;

Property name "$_created_at" should not be prefixed with an underscore to indicate visibility
Open

    protected $_created_at = null;

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

            $this->_package_name = $request->getFilename();

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

                $this->_vendor_data = $request['vendor_data'];

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

        $clean_package_type_version = Database::escape_string($this->_package_type_version);

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

        $clean_client = Database::escape_string($this->_client);

Missing function doc comment
Open

    public function getVendorData()

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

            "'".$clean_vendor_data."', ".

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

        $results = Database::query($sql_query);

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

        return $this->_pens_version;

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

        return $this->_package_type;

Property name "$_updated_at" should not be prefixed with an underscore to indicate visibility
Open

    protected $_updated_at = null;

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

                $this->_package_type = $request['package_type'];

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

        return $this->_package_type_version;

Member variable "_vendor_data" is not in valid camel caps format
Open

    protected $_vendor_data = null;

Property name "$_package_name" should not be prefixed with an underscore to indicate visibility
Open

    protected $_package_name = null;

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

        $clean_package_type_version = Database::escape_string($this->_package_type_version);

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

        $created_at = api_get_utc_datetime();

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

            "'".$clean_package_id."', ".

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

            "'".$this->_package_name."', ".

Member variable "_pens_version" is not in valid camel caps format
Open

    protected $_pens_version = null;

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

        $sql_query = "SELECT * FROM $table ORDER BY created_at;";

Member variable "_package_type" is not in valid camel caps format
Open

    protected $_package_type = null;

Property name "$_package_type_version" should not be prefixed with an underscore to indicate visibility
Open

    protected $_package_type_version = null;

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

                $this->_package_format = $request['package_format'];

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

                $this->_package_id = $request['package_id'];

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

            "updated_at = '".$created_at."';";

Missing function doc comment
Open

    public function getPackageType()

Missing function doc comment
Open

    public function getClient()

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

        return $this->_vendor_data;

Member variable "_updated_at" is not in valid camel caps format
Open

    protected $_updated_at = null;

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

            $this->_pens_version = $request->getPensVersion();

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

                $this->_package_name = $request['package_name'];

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

            "'".$this->_package_type."', ".

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

        Database::query($sql_query);

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

        $sql_query = "SELECT * FROM $table WHERE package_id = '".$package_id."';";

Missing function doc comment
Open

    public function getPackageId()

Missing function doc comment
Open

    public function getPensVersion()

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

        return $this->_package_name;

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

        return $this->_created_at;

Missing function doc comment
Open

    public function getPackageTypeVersion()

Missing function doc comment
Open

    public function getCreatedAt()

The variable $clean_client is not named in camelCase.
Open

    public function save()
    {
        $clean_package_type_version = Database::escape_string($this->_package_type_version);
        $clean_package_id = Database::escape_string($this->_package_id);
        $clean_client = Database::escape_string($this->_client);
Severity: Minor
Found in public/plugin/pens/chamilo_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 $created_at is not named in camelCase.
Open

    public function save()
    {
        $clean_package_type_version = Database::escape_string($this->_package_type_version);
        $clean_package_id = Database::escape_string($this->_package_id);
        $clean_client = Database::escape_string($this->_client);
Severity: Minor
Found in public/plugin/pens/chamilo_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 $sql_query is not named in camelCase.
Open

    public function save()
    {
        $clean_package_type_version = Database::escape_string($this->_package_type_version);
        $clean_package_id = Database::escape_string($this->_package_id);
        $clean_client = Database::escape_string($this->_client);
Severity: Minor
Found in public/plugin/pens/chamilo_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 $sql_query is not named in camelCase.
Open

    public function save()
    {
        $clean_package_type_version = Database::escape_string($this->_package_type_version);
        $clean_package_id = Database::escape_string($this->_package_id);
        $clean_client = Database::escape_string($this->_client);
Severity: Minor
Found in public/plugin/pens/chamilo_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 $sql_query is not named in camelCase.
Open

    public static function findByPackageId($package_id)
    {
        $table = Database::get_main_table(self::TABLE_NAME);
        $sql_query = "SELECT * FROM $table WHERE package_id = '".$package_id."';";
        $results = Database::query($sql_query);
Severity: Minor
Found in public/plugin/pens/chamilo_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 $clean_package_type_version is not named in camelCase.
Open

    public function save()
    {
        $clean_package_type_version = Database::escape_string($this->_package_type_version);
        $clean_package_id = Database::escape_string($this->_package_id);
        $clean_client = Database::escape_string($this->_client);
Severity: Minor
Found in public/plugin/pens/chamilo_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 $clean_package_id is not named in camelCase.
Open

    public function save()
    {
        $clean_package_type_version = Database::escape_string($this->_package_type_version);
        $clean_package_id = Database::escape_string($this->_package_id);
        $clean_client = Database::escape_string($this->_client);
Severity: Minor
Found in public/plugin/pens/chamilo_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 $sql_query is not named in camelCase.
Open

    public static function findAll()
    {
        $table = Database::get_main_table(self::TABLE_NAME);
        $sql_query = "SELECT * FROM $table ORDER BY created_at;";
        $results = Database::query($sql_query);
Severity: Minor
Found in public/plugin/pens/chamilo_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 $clean_client is not named in camelCase.
Open

    public function save()
    {
        $clean_package_type_version = Database::escape_string($this->_package_type_version);
        $clean_package_id = Database::escape_string($this->_package_id);
        $clean_client = Database::escape_string($this->_client);
Severity: Minor
Found in public/plugin/pens/chamilo_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 $clean_vendor_data is not named in camelCase.
Open

    public function save()
    {
        $clean_package_type_version = Database::escape_string($this->_package_type_version);
        $clean_package_id = Database::escape_string($this->_package_id);
        $clean_client = Database::escape_string($this->_client);
Severity: Minor
Found in public/plugin/pens/chamilo_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 $clean_vendor_data is not named in camelCase.
Open

    public function save()
    {
        $clean_package_type_version = Database::escape_string($this->_package_type_version);
        $clean_package_id = Database::escape_string($this->_package_id);
        $clean_client = Database::escape_string($this->_client);
Severity: Minor
Found in public/plugin/pens/chamilo_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 $package_id is not named in camelCase.
Open

    public static function findByPackageId($package_id)
    {
        $table = Database::get_main_table(self::TABLE_NAME);
        $sql_query = "SELECT * FROM $table WHERE package_id = '".$package_id."';";
        $results = Database::query($sql_query);
Severity: Minor
Found in public/plugin/pens/chamilo_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 $created_at is not named in camelCase.
Open

    public function save()
    {
        $clean_package_type_version = Database::escape_string($this->_package_type_version);
        $clean_package_id = Database::escape_string($this->_package_id);
        $clean_client = Database::escape_string($this->_client);
Severity: Minor
Found in public/plugin/pens/chamilo_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 $clean_package_id is not named in camelCase.
Open

    public function save()
    {
        $clean_package_type_version = Database::escape_string($this->_package_type_version);
        $clean_package_id = Database::escape_string($this->_package_id);
        $clean_client = Database::escape_string($this->_client);
Severity: Minor
Found in public/plugin/pens/chamilo_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 $created_at is not named in camelCase.
Open

    public function save()
    {
        $clean_package_type_version = Database::escape_string($this->_package_type_version);
        $clean_package_id = Database::escape_string($this->_package_id);
        $clean_client = Database::escape_string($this->_client);
Severity: Minor
Found in public/plugin/pens/chamilo_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 $sql_query is not named in camelCase.
Open

    public static function findAll()
    {
        $table = Database::get_main_table(self::TABLE_NAME);
        $sql_query = "SELECT * FROM $table ORDER BY created_at;";
        $results = Database::query($sql_query);
Severity: Minor
Found in public/plugin/pens/chamilo_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 $clean_package_type_version is not named in camelCase.
Open

    public function save()
    {
        $clean_package_type_version = Database::escape_string($this->_package_type_version);
        $clean_package_id = Database::escape_string($this->_package_id);
        $clean_client = Database::escape_string($this->_client);
Severity: Minor
Found in public/plugin/pens/chamilo_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 $sql_query is not named in camelCase.
Open

    public static function findByPackageId($package_id)
    {
        $table = Database::get_main_table(self::TABLE_NAME);
        $sql_query = "SELECT * FROM $table WHERE package_id = '".$package_id."';";
        $results = Database::query($sql_query);
Severity: Minor
Found in public/plugin/pens/chamilo_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