chamilo/chamilo-lms

View on GitHub
src/CourseBundle/Component/CourseCopy/Resources/Resource.php

Summary

Maintainability
A
0 mins
Test Coverage

The property $linked_resources is not named in camelCase.
Open

class Resource
{
    /**
     * The id from this resource in the source course.
     */

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

class Resource
{
    /**
     * The id from this resource in the source course.
     */

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

    public function get_tool($for_item_property_table = true)
    {
        switch ($this->get_type()) {
            case RESOURCE_DOCUMENT:
                return TOOL_DOCUMENT;

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

class Resource
{
    /**
     * The id from this resource in the source course.
     */

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

class Resource
{
    /**
     * The id from this resource in the source course.
     */

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

    public function get_tool($for_item_property_table = true)
    {
        switch ($this->get_type()) {
            case RESOURCE_DOCUMENT:
                return TOOL_DOCUMENT;

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

    public function get_id()
    {
        return $this->source_id;
    }

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method set_new_id is not named in camelCase.
Open

    public function set_new_id($id)
    {
        $this->destination_id = $id;
    }

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method get_linked_resources is not named in camelCase.
Open

    public function get_linked_resources()
    {
        return $this->linked_resources;
    }

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method is_restored is not named in camelCase.
Open

    public function is_restored(): bool
    {
        return $this->destination_id > -1;
    }

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method links_to is not named in camelCase.
Open

    public function links_to(&$resource)
    {
        self::setClassType($resource);
        $type = $resource->get_type();
        if (isset($this->linked_resources[$type]) &&

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method get_tool is not named in camelCase.
Open

    public function get_tool($for_item_property_table = true)
    {
        switch ($this->get_type()) {
            case RESOURCE_DOCUMENT:
                return TOOL_DOCUMENT;

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method add_linked_resource is not named in camelCase.
Open

    public function add_linked_resource($type, $id)
    {
        $this->linked_resources[$type][] = $id;
    }

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method get_type is not named in camelCase.
Open

    public function get_type()
    {
        return $this->type;
    }

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

There are no issues that match your filters.

Category
Status