chamilo/chamilo-lms

View on GitHub
public/main/inc/lib/SkillProfileModel.php

Summary

Maintainability
A
0 mins
Test Coverage

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

                $skill_rel_profile = new SkillRelProfileModel();

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

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

            if ($profile_id) {

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

                    foreach ($params['skills'] as $skill_id) {

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

        $this->table_rel_profile = Database::get_main_table(TABLE_MAIN_SKILL_REL_PROFILE);

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

                            'profile_id' => $profile_id,

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

                            'skill_id' => $skill_id,

Missing function doc comment
Open

    public function __construct()

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

            $profile_id = parent::save($params, $showQuery);

You must use "/**" style comments for a class comment
Open

class SkillProfileModel extends Model

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

                return $profile_id;

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

                $skill_rel_profile = new SkillRelProfileModel();

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

            $this->table_rel_profile,

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

                        $skill_rel_profile->save($attributes);

The variable $profile_id is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        if (!empty($params)) {
            $profile_id = parent::save($params, $showQuery);
            if ($profile_id) {

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

    public function save($params, $showQuery = false)
    {
        if (!empty($params)) {
            $profile_id = parent::save($params, $showQuery);
            if ($profile_id) {

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

    public function save($params, $showQuery = false)
    {
        if (!empty($params)) {
            $profile_id = parent::save($params, $showQuery);
            if ($profile_id) {

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

    public function save($params, $showQuery = false)
    {
        if (!empty($params)) {
            $profile_id = parent::save($params, $showQuery);
            if ($profile_id) {

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

    public function save($params, $showQuery = false)
    {
        if (!empty($params)) {
            $profile_id = parent::save($params, $showQuery);
            if ($profile_id) {

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

    public function save($params, $showQuery = false)
    {
        if (!empty($params)) {
            $profile_id = parent::save($params, $showQuery);
            if ($profile_id) {

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

    public function save($params, $showQuery = false)
    {
        if (!empty($params)) {
            $profile_id = parent::save($params, $showQuery);
            if ($profile_id) {

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

    public function save($params, $showQuery = false)
    {
        if (!empty($params)) {
            $profile_id = parent::save($params, $showQuery);
            if ($profile_id) {

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