chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

The method save() has an NPath complexity of 504. The configured NPath complexity threshold is 200.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_id)) {

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

Missing class import via use statement (line '737', column '21').
Open

        $form = new FormValidator($form_name, 'post', $url);

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 '624', column '22').
Open

        $field = new ExtraField($this->type);

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 '37', column '27').
Open

        $extraField = new ExtraField($this->type);

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

        } else {
            $check = $this->get_field_option_by_field_and_option(
                $field_id,
                $params['option_value']
            );

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

                    } else {
                        $level1Id = $optionInfo['id'];
                        $level1Params['id'] = $level1Id;
                        parent::update($level1Params);
                    }

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

                                } else {
                                    $level3Params['id'] = $optionInfo['id'];
                                    parent::update($level3Params);
                                }

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

        } else {
            $form->addButtonCreate(get_lang('Add'));
        }

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

        } else {
            $form->addElement('text', 'display_text', get_lang('Name'));
        }

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

                    } else {
                        $sub_id = $option_info['id'];
                        $new_params['id'] = $sub_id;
                        parent::update($new_params, $showQuery);
                    }

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

                        } else {
                            $level2Id = $optionInfo['id'];
                            $level2Params['id'] = $level2Id;
                            parent::update($level2Params);
                        }

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 unused local variables such as '$key'.
Open

                foreach ($options_parsed as $key => $option) {

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

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

The parameter $show_query is not named in camelCase.
Open

    public function save_one_item($params, $show_query = false, $insert_repeated = true)
    {
        $field_id = intval($params['field_id']);
        if (empty($field_id)) {
            return false;

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

    public function get_field_option_by_field_and_option($field_id, $option_value)
    {
        $field_id = (int) $field_id;
        $option_value = Database::escape_string($option_value);
        $extraFieldType = $this->getExtraField()->getItemType();

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

    public function get_field_option_by_field_id_and_option_display_text($field_id, $option_display_text)
    {
        $field_id = (int) $field_id;
        $option_display_text = Database::escape_string($option_display_text);
        $extraFieldType = $this->getExtraField()->getItemType();

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

    public function searchByField($tag, $field_id, $limit = 10)
    {
        $field_id = (int) $field_id;
        $limit = (int) $limit;
        $tag = Database::escape_string($tag);

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

    public function save_one_item($params, $show_query = false, $insert_repeated = true)
    {
        $field_id = intval($params['field_id']);
        if (empty($field_id)) {
            return false;

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

    public function get_field_options_by_field($field_id, $add_id_in_array = false, $ordered_by = null)
    {
        $field_id = (int) $field_id;

        $orderBy = null;

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

    public function get_second_select_field_options_by_field($option_value_id, $to_json = false)
    {
        $extraFieldOptionsRepo = Container::getExtraFieldOptionsRepository();
        $option = $extraFieldOptionsRepo->find($option_value_id);

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

    public function get_max_order($field_id)
    {
        $field_id = (int) $field_id;
        $sql = "SELECT MAX(option_order)
                FROM {$this->table}

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

    public function getFieldOptionByFieldIdAndOptionDisplayTextAndOptionValue(
        $field_id,
        $option_display_text,
        $option_value
    ) {

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

    public function get_field_options_by_field($field_id, $add_id_in_array = false, $ordered_by = null)
    {
        $field_id = (int) $field_id;

        $orderBy = null;

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

    public function getFieldOptionByFieldIdAndOptionDisplayTextAndOptionValue(
        $field_id,
        $option_display_text,
        $option_value
    ) {

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

    public function getFieldOptionsToString($field_id, $add_id_in_array = false, $ordered_by = null)
    {
        $options = self::get_field_options_by_field($field_id, $add_id_in_array, $ordered_by);
        $new_options = [];
        if (!empty($options)) {

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

    public function getFieldOptionsToString($field_id, $add_id_in_array = false, $ordered_by = null)
    {
        $options = self::get_field_options_by_field($field_id, $add_id_in_array, $ordered_by);
        $new_options = [];
        if (!empty($options)) {

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

    public function get_field_options_by_field($field_id, $add_id_in_array = false, $ordered_by = null)
    {
        $field_id = (int) $field_id;

        $orderBy = null;

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

    public function getFieldOptionsToString($field_id, $add_id_in_array = false, $ordered_by = null)
    {
        $options = self::get_field_options_by_field($field_id, $add_id_in_array, $ordered_by);
        $new_options = [];
        if (!empty($options)) {

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

    public function get_field_option_by_field_id_and_option_display_text($field_id, $option_display_text)
    {
        $field_id = (int) $field_id;
        $option_display_text = Database::escape_string($option_display_text);
        $extraFieldType = $this->getExtraField()->getItemType();

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

    public function delete_all_options_by_field_id($field_id)
    {
        $field_id = (int) $field_id;
        $sql = "DELETE FROM {$this->table} WHERE field_id = $field_id";

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

    public function get_field_options_by_field_to_string($field_id, $ordered_by = null)
    {
        $field = new ExtraField($this->type);
        $field_info = $field->get($field_id);
        $options = self::get_field_options_by_field($field_id, false, $ordered_by);

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

    public function getFieldOptionByFieldIdAndOptionDisplayTextAndOptionValue(
        $field_id,
        $option_display_text,
        $option_value
    ) {

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

    public function getSearchOptionsByField($tag, $field_id, $limit = 10)
    {
        $result = $this->searchByField($tag, $field_id, $limit = 10);
        $values = [];
        $json = null;

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

    public function get_field_options_by_field_to_string($field_id, $ordered_by = null)
    {
        $field = new ExtraField($this->type);
        $field_info = $field->get($field_id);
        $options = self::get_field_options_by_field($field_id, false, $ordered_by);

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

    public function get_field_option_by_field_and_option($field_id, $option_value)
    {
        $field_id = (int) $field_id;
        $option_value = Database::escape_string($option_value);
        $extraFieldType = $this->getExtraField()->getItemType();

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

    public function get_second_select_field_options_by_field($option_value_id, $to_json = false)
    {
        $extraFieldOptionsRepo = Container::getExtraFieldOptionsRepository();
        $option = $extraFieldOptionsRepo->find($option_value_id);

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

        $field_id = (int) $field_id;

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

                        parent::update($new_params, $showQuery);

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

                        $new_params['id'] = $option_info['id'];

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

                        'field_id' => $field_id,

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

                            $field_id,

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

            $order = $this->get_max_order($field_id);

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

        $option_value = Database::escape_string($option_value);

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

    public function get_field_option_by_field_id_and_option_display_text($field_id, $option_display_text)

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

            return !$to_json ? [] : '{}';

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

    public function get_field_options_by_field_to_string($field_id, $ordered_by = null)

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

            switch ($field_info['value_type']) {

Missing parameter name
Open

     * @param string URL to send the form to (action=...)

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

        $form_name = $this->type.'_field';

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

                foreach ($options_parsed as $key => $option) {

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

                    if (empty($option_info)) {

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

                            parent::save($new_params, $showQuery);

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

                    field_id = $field_id AND

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

        $field_id = (int) $field_id;

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

    public function get_second_select_field_options_by_field($option_value_id, $to_json = false)

Method name "ExtraFieldOption::get_all" is not in camel caps format
Open

    public function get_all(array $options = []): array

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

        $options = self::get_field_options_by_field($field_id, $add_id_in_array, $ordered_by);

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

        $new_options = [];

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

                $new_options[] = $option['option_value'].':'.$option['display_text'];

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

                if (empty($options_parsed)) {

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

                        'field_id' => $field_id,

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

                    foreach ($option['options'] as $sub_option) {

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

                                    $field_id,

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

                    $option_info = $this->get_field_option_by_field_and_option($field_id, $option);

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

        $field_id = (int) $field_id;

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

        $options = self::get_field_options_by_field($field_id, false, $ordered_by);

Method name "ExtraFieldOption::get_count_by_field_id" is not in camel caps format
Open

    public function get_count_by_field_id($fieldId)

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

    public function getFieldOptionsToString($field_id, $add_id_in_array = false, $ordered_by = null)

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

                        $new_params['id'] = $option_info['id'];

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

                        'field_id' => $field_id,

Method name "ExtraFieldOption::save_one_item" is not in camel caps format
Open

    public function save_one_item($params, $show_query = false, $insert_repeated = true)

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

    public function get_field_option_by_field_and_option($field_id, $option_value)

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

                    sf.display_text = '".$option_display_text."' AND

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

            if ($add_id_in_array) {

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

                        $sub_id = parent::save($new_params, $showQuery);

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

                        if (empty($sub_option)) {

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

                            $sub_id

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

                        $field_id,

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

                    $order = $this->get_max_order($field_id);

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

            parent::save($params, $show_query);

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

        $option_display_text = Database::escape_string($option_display_text);

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

        $field_id,

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

        $field_id = (int) $field_id;

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

    public function getFieldOptionsToString($field_id, $add_id_in_array = false, $ordered_by = null)

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

        if (empty($field_id)) {

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

                parent::save($params, $show_query);

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

                    option_value = '".$option_value."' AND

Method name "ExtraFieldOption::get_second_select_field_options_by_field" is not in camel caps format
Open

    public function get_second_select_field_options_by_field($option_value_id, $to_json = false)

Method name "ExtraFieldOption::get_field_options_by_field_to_string" is not in camel caps format
Open

    public function get_field_options_by_field_to_string($field_id, $ordered_by = null)

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

        $field_id = (int) $field_id;

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

        $field_id = (int) $field_id;

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

                    $new_params = [

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

        $field_id = (int) $field_id;

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

        $field_id = (int) $field_id;

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

                    field_id = $field_id AND

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

                WHERE field_id = $field_id";

Missing parameter name
Open

     * @param string Type of action to offer through the form (edit, usually)

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

    public function getSearchOptionsByField($tag, $field_id, $limit = 10)

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

        $result = $this->searchByField($tag, $field_id, $limit = 10);

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

        $field_id = (int) $params['field_id'];

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

                $options_parsed = ExtraField::extra_field_double_select_convert_string_to_array(

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

                    $option_info = $this->get_field_option_by_field_id_and_option_display_text(

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

                        $sub_id = parent::save($new_params, $showQuery);

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

                            'display_text' => $sub_option,

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

                        if (empty($option_info)) {

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

                    if (false != $option_info) {

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

        if (empty($field_id)) {

Method name "ExtraFieldOption::get_field_option_by_field_and_option" is not in camel caps format
Open

    public function get_field_option_by_field_and_option($field_id, $option_value)

Method name "ExtraFieldOption::get_field_option_by_field_id_and_option_display_text" is not in camel caps format
Open

    public function get_field_option_by_field_id_and_option_display_text($field_id, $option_display_text)

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

        $option_value = Database::escape_string($option_value);

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

                        $sub_id = $option_info['id'];

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

                        $new_params = [

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

                    $new_params = [

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

                    parent::save($new_params, $showQuery);

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

        $option_value = Database::escape_string($option_value);

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

                    field_id = $field_id AND

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

    public function get_field_options_by_field($field_id, $add_id_in_array = false, $ordered_by = null)

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

        $field_info = $field->get($field_id);

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

        $field_info = $field->get($field_id);

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

    public function get_max_order($field_id)

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

        $form = new FormValidator($form_name, 'post', $url);

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

                    field_id = '".$field_id."' AND

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

        $sql = "DELETE FROM {$this->table} WHERE field_id = $field_id";

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

                        $field_id,

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

                        $new_params['id'] = $sub_id;

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

                            $sub_option,

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

    public function get_field_option_by_field_and_option($field_id, $option_value)

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

                    option_value = '$option_value' AND

Method name "ExtraFieldOption::get_field_options_by_field" is not in camel caps format
Open

    public function get_field_options_by_field($field_id, $add_id_in_array = false, $ordered_by = null)

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

        $options = self::get_field_options_by_field($field_id, false, $ordered_by);

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

    public function searchByField($tag, $field_id, $limit = 10)

Missing function doc comment
Open

    public function get_all(array $options = []): array

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

            $string = implode(';', $new_options);

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

    public function save_one_item($params, $show_query = false, $insert_repeated = true)

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

        $field_id = intval($params['field_id']);

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

        $option_value = Database::escape_string($option_value);

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

                    s.display_text = '".$option_display_text."' AND

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

        $field_id = (int) $field_id;

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

        $option_display_text = Database::escape_string($option_display_text);

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

    public function get_field_options_by_field($field_id, $add_id_in_array = false, $ordered_by = null)

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

        switch ($ordered_by) {

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

        $field_id = (int) $field_id;

Method name "ExtraFieldOption::delete_all_options_by_field_id" is not in camel caps format
Open

    public function delete_all_options_by_field_id($field_id)

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

                            'option_value' => $sub_id,

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

    public function get_field_option_by_field_id_and_option_display_text($field_id, $option_display_text)

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

        $option = $extraFieldOptionsRepo->find($option_value_id);

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

    public function get_field_options_by_field_to_string($field_id, $ordered_by = null)

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

    public function getFieldOptionsToString($field_id, $add_id_in_array = false, $ordered_by = null)

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

        $options = self::get_field_options_by_field($field_id, $add_id_in_array, $ordered_by);

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

    public function delete_all_options_by_field_id($field_id)

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

                        $sub_id = $option_info['id'];

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

                            $field_id,

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

                                    'field_id' => $field_id,

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

        if ($insert_repeated) {

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

                $field_id,

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

        $field_id = (int) $field_id;

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

        $option_value

Missing parameter name
Open

     * @param $priority

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

                        $new_params['id'] = $sub_id;

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

                        parent::update($new_params, $showQuery);

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

                    $option_info = $this->get_field_option_by_field_and_option($field_id, $option);

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

    public function save_one_item($params, $show_query = false, $insert_repeated = true)

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

        $option_display_text = Database::escape_string($option_display_text);

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

        $field_id = (int) $field_id;

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

    public function get_field_options_by_field($field_id, $add_id_in_array = false, $ordered_by = null)

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

        $field_id = (int) $field_id;

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

                            'field_id' => $field_id,

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

                        $option_info = $this->getFieldOptionByFieldIdAndOptionDisplayTextAndOptionValue(

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

                            'field_id' => $field_id,

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

        $option_display_text,

Method name "ExtraFieldOption::get_max_order" is not in camel caps format
Open

    public function get_max_order($field_id)

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

        $field_id = isset($_REQUEST['field_id']) ? intval($_REQUEST['field_id']) : null;

Method name "ExtraFieldOption::return_form" is not in camel caps format
Open

    public function return_form($url, $action)

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

        $options = self::get_field_options_by_field($field_id, $add_id_in_array, $ordered_by);

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

        $option_display_text = Database::escape_string($option_display_text);

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

        $result = Container::getExtraFieldOptionsRepository()->findBy(['field' => $field_id], $orderBy);

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

    public function get_second_select_field_options_by_field($option_value_id, $to_json = false)

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

        if (!$to_json) {

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

        $field_id = (int) $field_id;

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

        echo '<a href="'.api_get_self().'?action=add&type='.$this->type.'&field_id='.$field_id.'">'.

The variable $field_id is not named in camelCase.
Open

    public function getFieldOptionsToString($field_id, $add_id_in_array = false, $ordered_by = null)
    {
        $options = self::get_field_options_by_field($field_id, $add_id_in_array, $ordered_by);
        $new_options = [];
        if (!empty($options)) {

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

    public function delete_all_options_by_field_id($field_id)
    {
        $field_id = (int) $field_id;
        $sql = "DELETE FROM {$this->table} WHERE field_id = $field_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 $option_info is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $new_params is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $option_value is not named in camelCase.
Open

    public function get_field_option_by_field_and_option($field_id, $option_value)
    {
        $field_id = (int) $field_id;
        $option_value = Database::escape_string($option_value);
        $extraFieldType = $this->getExtraField()->getItemType();

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

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $new_params is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $field_id is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $field_id is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $field_id is not named in camelCase.
Open

    public function save_one_item($params, $show_query = false, $insert_repeated = true)
    {
        $field_id = intval($params['field_id']);
        if (empty($field_id)) {
            return false;

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

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $new_params is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $new_params is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $field_id is not named in camelCase.
Open

    public function save_one_item($params, $show_query = false, $insert_repeated = true)
    {
        $field_id = intval($params['field_id']);
        if (empty($field_id)) {
            return false;

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

    public function get_field_option_by_field_and_option($field_id, $option_value)
    {
        $field_id = (int) $field_id;
        $option_value = Database::escape_string($option_value);
        $extraFieldType = $this->getExtraField()->getItemType();

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

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $new_params is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $show_query is not named in camelCase.
Open

    public function save_one_item($params, $show_query = false, $insert_repeated = true)
    {
        $field_id = intval($params['field_id']);
        if (empty($field_id)) {
            return false;

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

    public function get_field_option_by_field_id_and_option_display_text($field_id, $option_display_text)
    {
        $field_id = (int) $field_id;
        $option_display_text = Database::escape_string($option_display_text);
        $extraFieldType = $this->getExtraField()->getItemType();

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

    public function getFieldOptionsToString($field_id, $add_id_in_array = false, $ordered_by = null)
    {
        $options = self::get_field_options_by_field($field_id, $add_id_in_array, $ordered_by);
        $new_options = [];
        if (!empty($options)) {

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

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $sub_id is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $sub_option is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $sub_id is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $field_id is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $field_id is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $new_options is not named in camelCase.
Open

    public function getFieldOptionsToString($field_id, $add_id_in_array = false, $ordered_by = null)
    {
        $options = self::get_field_options_by_field($field_id, $add_id_in_array, $ordered_by);
        $new_options = [];
        if (!empty($options)) {

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

    public function getFieldOptionsToString($field_id, $add_id_in_array = false, $ordered_by = null)
    {
        $options = self::get_field_options_by_field($field_id, $add_id_in_array, $ordered_by);
        $new_options = [];
        if (!empty($options)) {

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

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $field_id is not named in camelCase.
Open

    public function searchByField($tag, $field_id, $limit = 10)
    {
        $field_id = (int) $field_id;
        $limit = (int) $limit;
        $tag = Database::escape_string($tag);

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

    public function get_field_option_by_field_id_and_option_display_text($field_id, $option_display_text)
    {
        $field_id = (int) $field_id;
        $option_display_text = Database::escape_string($option_display_text);
        $extraFieldType = $this->getExtraField()->getItemType();

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

    public function get_field_options_by_field($field_id, $add_id_in_array = false, $ordered_by = null)
    {
        $field_id = (int) $field_id;

        $orderBy = null;

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

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $show_query is not named in camelCase.
Open

    public function save_one_item($params, $show_query = false, $insert_repeated = true)
    {
        $field_id = intval($params['field_id']);
        if (empty($field_id)) {
            return false;

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

    public function get_field_option_by_field_id_and_option_display_text($field_id, $option_display_text)
    {
        $field_id = (int) $field_id;
        $option_display_text = Database::escape_string($option_display_text);
        $extraFieldType = $this->getExtraField()->getItemType();

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

    public function get_field_option_by_field_id_and_option_display_text($field_id, $option_display_text)
    {
        $field_id = (int) $field_id;
        $option_display_text = Database::escape_string($option_display_text);
        $extraFieldType = $this->getExtraField()->getItemType();

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

    public function getFieldOptionByFieldIdAndOptionDisplayTextAndOptionValue(
        $field_id,
        $option_display_text,
        $option_value
    ) {

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

    public function get_max_order($field_id)
    {
        $field_id = (int) $field_id;
        $sql = "SELECT MAX(option_order)
                FROM {$this->table}

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

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $field_id is not named in camelCase.
Open

    public function get_field_option_by_field_and_option($field_id, $option_value)
    {
        $field_id = (int) $field_id;
        $option_value = Database::escape_string($option_value);
        $extraFieldType = $this->getExtraField()->getItemType();

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

    public function getFieldOptionByFieldIdAndOptionDisplayTextAndOptionValue(
        $field_id,
        $option_display_text,
        $option_value
    ) {

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

    public function getFieldOptionByFieldIdAndOptionDisplayTextAndOptionValue(
        $field_id,
        $option_display_text,
        $option_value
    ) {

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

    public function getSearchOptionsByField($tag, $field_id, $limit = 10)
    {
        $result = $this->searchByField($tag, $field_id, $limit = 10);
        $values = [];
        $json = null;

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

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $field_info is not named in camelCase.
Open

    public function get_field_options_by_field_to_string($field_id, $ordered_by = null)
    {
        $field = new ExtraField($this->type);
        $field_info = $field->get($field_id);
        $options = self::get_field_options_by_field($field_id, false, $ordered_by);

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

    public function display()
    {
        // action links
        echo '<div class="actions">';
        $field_id = isset($_REQUEST['field_id']) ? intval($_REQUEST['field_id']) : null;

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

    public function getFieldOptionsToString($field_id, $add_id_in_array = false, $ordered_by = null)
    {
        $options = self::get_field_options_by_field($field_id, $add_id_in_array, $ordered_by);
        $new_options = [];
        if (!empty($options)) {

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

    public function delete_all_options_by_field_id($field_id)
    {
        $field_id = (int) $field_id;
        $sql = "DELETE FROM {$this->table} WHERE field_id = $field_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 $field_id is not named in camelCase.
Open

    public function save_one_item($params, $show_query = false, $insert_repeated = true)
    {
        $field_id = intval($params['field_id']);
        if (empty($field_id)) {
            return false;

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

    public function get_field_option_by_field_and_option($field_id, $option_value)
    {
        $field_id = (int) $field_id;
        $option_value = Database::escape_string($option_value);
        $extraFieldType = $this->getExtraField()->getItemType();

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

    public function getFieldOptionByFieldIdAndOptionDisplayTextAndOptionValue(
        $field_id,
        $option_display_text,
        $option_value
    ) {

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

    public function get_max_order($field_id)
    {
        $field_id = (int) $field_id;
        $sql = "SELECT MAX(option_order)
                FROM {$this->table}

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

    public function searchByField($tag, $field_id, $limit = 10)
    {
        $field_id = (int) $field_id;
        $limit = (int) $limit;
        $tag = Database::escape_string($tag);

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

    public function get_field_options_by_field_to_string($field_id, $ordered_by = null)
    {
        $field = new ExtraField($this->type);
        $field_info = $field->get($field_id);
        $options = self::get_field_options_by_field($field_id, false, $ordered_by);

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

    public function return_form($url, $action)
    {
        $form_name = $this->type.'_field';
        $form = new FormValidator($form_name, 'post', $url);
        // Setting the form elements

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

    public function getFieldOptionsToString($field_id, $add_id_in_array = false, $ordered_by = null)
    {
        $options = self::get_field_options_by_field($field_id, $add_id_in_array, $ordered_by);
        $new_options = [];
        if (!empty($options)) {

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

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $option_info is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $option_display_text is not named in camelCase.
Open

    public function get_field_option_by_field_id_and_option_display_text($field_id, $option_display_text)
    {
        $field_id = (int) $field_id;
        $option_display_text = Database::escape_string($option_display_text);
        $extraFieldType = $this->getExtraField()->getItemType();

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

    public function getFieldOptionByFieldIdAndOptionDisplayTextAndOptionValue(
        $field_id,
        $option_display_text,
        $option_value
    ) {

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

    public function getFieldOptionByFieldIdAndOptionDisplayTextAndOptionValue(
        $field_id,
        $option_display_text,
        $option_value
    ) {

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

    public function get_field_options_by_field($field_id, $add_id_in_array = false, $ordered_by = null)
    {
        $field_id = (int) $field_id;

        $orderBy = null;

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

    public function get_field_options_by_field($field_id, $add_id_in_array = false, $ordered_by = null)
    {
        $field_id = (int) $field_id;

        $orderBy = null;

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

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $new_params is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $sub_option is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $field_id is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $field_id is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $option_value is not named in camelCase.
Open

    public function getFieldOptionByFieldIdAndOptionDisplayTextAndOptionValue(
        $field_id,
        $option_display_text,
        $option_value
    ) {

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

    public function getFieldOptionByFieldIdAndOptionDisplayTextAndOptionValue(
        $field_id,
        $option_display_text,
        $option_value
    ) {

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

    public function searchByField($tag, $field_id, $limit = 10)
    {
        $field_id = (int) $field_id;
        $limit = (int) $limit;
        $tag = Database::escape_string($tag);

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

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $sub_id is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $ordered_by is not named in camelCase.
Open

    public function get_field_options_by_field($field_id, $add_id_in_array = false, $ordered_by = null)
    {
        $field_id = (int) $field_id;

        $orderBy = null;

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

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $option_value_id is not named in camelCase.
Open

    public function get_second_select_field_options_by_field($option_value_id, $to_json = false)
    {
        $extraFieldOptionsRepo = Container::getExtraFieldOptionsRepository();
        $option = $extraFieldOptionsRepo->find($option_value_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 $field_id is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $to_json is not named in camelCase.
Open

    public function get_second_select_field_options_by_field($option_value_id, $to_json = false)
    {
        $extraFieldOptionsRepo = Container::getExtraFieldOptionsRepository();
        $option = $extraFieldOptionsRepo->find($option_value_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 $field_id is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $option_info is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $field_id is not named in camelCase.
Open

    public function get_field_options_by_field_to_string($field_id, $ordered_by = null)
    {
        $field = new ExtraField($this->type);
        $field_info = $field->get($field_id);
        $options = self::get_field_options_by_field($field_id, false, $ordered_by);

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

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $field_id is not named in camelCase.
Open

    public function get_field_option_by_field_and_option($field_id, $option_value)
    {
        $field_id = (int) $field_id;
        $option_value = Database::escape_string($option_value);
        $extraFieldType = $this->getExtraField()->getItemType();

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

    public function get_field_option_by_field_and_option($field_id, $option_value)
    {
        $field_id = (int) $field_id;
        $option_value = Database::escape_string($option_value);
        $extraFieldType = $this->getExtraField()->getItemType();

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

    public function get_field_options_by_field_to_string($field_id, $ordered_by = null)
    {
        $field = new ExtraField($this->type);
        $field_info = $field->get($field_id);
        $options = self::get_field_options_by_field($field_id, false, $ordered_by);

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

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $ordered_by is not named in camelCase.
Open

    public function get_field_options_by_field_to_string($field_id, $ordered_by = null)
    {
        $field = new ExtraField($this->type);
        $field_info = $field->get($field_id);
        $options = self::get_field_options_by_field($field_id, false, $ordered_by);

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

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $sub_option is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $option_info is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $option_info is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $field_id is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $option_display_text is not named in camelCase.
Open

    public function get_field_option_by_field_id_and_option_display_text($field_id, $option_display_text)
    {
        $field_id = (int) $field_id;
        $option_display_text = Database::escape_string($option_display_text);
        $extraFieldType = $this->getExtraField()->getItemType();

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

    public function get_second_select_field_options_by_field($option_value_id, $to_json = false)
    {
        $extraFieldOptionsRepo = Container::getExtraFieldOptionsRepository();
        $option = $extraFieldOptionsRepo->find($option_value_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 $field_id is not named in camelCase.
Open

    public function get_max_order($field_id)
    {
        $field_id = (int) $field_id;
        $sql = "SELECT MAX(option_order)
                FROM {$this->table}

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

    public function display()
    {
        // action links
        echo '<div class="actions">';
        $field_id = isset($_REQUEST['field_id']) ? intval($_REQUEST['field_id']) : null;

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

    public function return_form($url, $action)
    {
        $form_name = $this->type.'_field';
        $form = new FormValidator($form_name, 'post', $url);
        // Setting the form elements

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

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $new_params is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $field_id is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $insert_repeated is not named in camelCase.
Open

    public function save_one_item($params, $show_query = false, $insert_repeated = true)
    {
        $field_id = intval($params['field_id']);
        if (empty($field_id)) {
            return false;

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

    public function get_field_options_by_field($field_id, $add_id_in_array = false, $ordered_by = null)
    {
        $field_id = (int) $field_id;

        $orderBy = null;

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

    public function delete_all_options_by_field_id($field_id)
    {
        $field_id = (int) $field_id;
        $sql = "DELETE FROM {$this->table} WHERE field_id = $field_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 $field_id is not named in camelCase.
Open

    public function save($params, $showQuery = false)
    {
        $field_id = (int) $params['field_id'];

        if (empty($field_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 $field_id is not named in camelCase.
Open

    public function save_one_item($params, $show_query = false, $insert_repeated = true)
    {
        $field_id = intval($params['field_id']);
        if (empty($field_id)) {
            return false;

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

    public function getFieldOptionByFieldIdAndOptionDisplayTextAndOptionValue(
        $field_id,
        $option_display_text,
        $option_value
    ) {

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

    public function get_field_option_by_field_and_option($field_id, $option_value)
    {
        $field_id = (int) $field_id;
        $option_value = Database::escape_string($option_value);
        $extraFieldType = $this->getExtraField()->getItemType();

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

    public function save_one_item($params, $show_query = false, $insert_repeated = true)
    {
        $field_id = intval($params['field_id']);
        if (empty($field_id)) {
            return false;

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

    public function get_field_options_by_field_to_string($field_id, $ordered_by = null)
    {
        $field = new ExtraField($this->type);
        $field_info = $field->get($field_id);
        $options = self::get_field_options_by_field($field_id, false, $ordered_by);

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

    public function get_count_by_field_id($fieldId)
    {
        if (empty($fieldId)) {
            return false;
        }

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

    public function get_all(array $options = []): array
    {
        $result = parent::get_all($options);

        foreach ($result as &$row) {

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

    public function get_field_option_by_field_id_and_option_display_text($field_id, $option_display_text)
    {
        $field_id = (int) $field_id;
        $option_display_text = Database::escape_string($option_display_text);
        $extraFieldType = $this->getExtraField()->getItemType();

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

    public function get_second_select_field_options_by_field($option_value_id, $to_json = false)
    {
        $extraFieldOptionsRepo = Container::getExtraFieldOptionsRepository();
        $option = $extraFieldOptionsRepo->find($option_value_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_field_options_by_field is not named in camelCase.
Open

    public function get_field_options_by_field($field_id, $add_id_in_array = false, $ordered_by = null)
    {
        $field_id = (int) $field_id;

        $orderBy = null;

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

    public function get_max_order($field_id)
    {
        $field_id = (int) $field_id;
        $sql = "SELECT MAX(option_order)
                FROM {$this->table}

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

    public function delete_all_options_by_field_id($field_id)
    {
        $field_id = (int) $field_id;
        $sql = "DELETE FROM {$this->table} WHERE field_id = $field_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 return_form is not named in camelCase.
Open

    public function return_form($url, $action)
    {
        $form_name = $this->type.'_field';
        $form = new FormValidator($form_name, 'post', $url);
        // Setting the form elements

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