chamilo/chamilo-lms

View on GitHub
public/main/inc/lib/table_sort.class.php

Summary

Maintainability
A
0 mins
Test Coverage

The method sort_table_config() has an NPath complexity of 208980. The configured NPath complexity threshold is 200.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = null,

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

The method sort_table_config uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    if (!empty($docs_to_sort)) {
                        api_natrsort($docs_to_sort);
                    }
                    if (!empty($folder_to_sort)) {

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

            } else {
                $type = SORT_STRING;
            }

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

            } else {
                $is_date &= false;
            }

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

        } else {
            $function = self::getSortFunction($type, $direction, $column);

            // Sort the content
            usort($data, $function);

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

                    } else {
                        $folder_to_sort[$document['id']] = api_strtolower($document['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

Avoid unused local variables such as '$index'.
Open

        foreach ($data as $index => &$row) {

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

Avoid unused local variables such as '$index'.
Open

        foreach ($data as $index => &$row) {

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

Avoid unused local variables such as '$index'.
Open

        foreach ($data as $index => &$row) {

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

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $column_show is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $column_order is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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

Missing parameter name
Open

     * @param $column

Method name "TableSort::sort_table_config" is not in camel caps format
Open

    public static function sort_table_config(

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

                    foreach ($folder_to_sort as $id => $document) {

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

            $count_column_show = count($column_show);

Method name "TableSort::is_image_column" is not in camel caps format
Open

    private static function is_image_column(&$data, $column)

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

        if (is_array($column_order)) {

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

            $column = isset($column_order[$column]) ? $column_order[$column] : $column;

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

        if ($doc_filter && in_array($type, [SORT_STRING])) {

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

                    if (!empty($docs_to_sort)) {

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

                    foreach ($docs_to_sort as $id => $document) {

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

                        if (isset($new_data[$id])) {

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

            $data = $new_order_data;

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

            if (!$is_image) {

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

            $new_data = [];

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

        $is_image = true;

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

        return $is_image;

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

            $folder_to_sort = [];

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

                $data = $new_data_order;

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

                for ($i = 0; $i < $count_column_show; $i++) {

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

                    if ($column_show[$i]) {

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

                $check_date = strtotime(strip_tags($row[$column]));

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

        return $is_date;

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

        $column_show = null,

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

                $new_data_order = [];

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

                $is_date &= (-1 != $check_date && $check_date);

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

                $is_image &= 0 == strlen(trim(strip_tags($row[$column])));

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

                    if (!empty($folder_to_sort)) {

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

                if (!empty($docs_to_sort)) {

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

                        if (isset($new_data[$id])) {

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

                            $new_data_order[] = $new_data[$id];

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

        $is_date = true;

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

                $is_date &= (-1 != $check_date && $check_date);

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

                $is_image &= strlen(trim(strip_tags($row[$column], '<img>'))) > 0;

Missing parameter name
Open

     * @param $direction

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

                        $folder_to_sort[$document['id']] = api_strtolower($document['name']);

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

                if (!empty($folder_to_sort)) {

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

        $is_numeric = true;

Method name "TableSort::is_date_column" is not in camel caps format
Open

    private static function is_date_column(&$data, $column)

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

        $column_order = null,

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

            for ($j = 0; $j < $count_data; $j++) {

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

        return $is_numeric;

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

                    $new_data[$document['id']] = $document;

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

                    if (!empty($folder_to_sort)) {

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

                        api_natsort($folder_to_sort);

Missing parameter name
Open

     * @param $type

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

                        $docs_to_sort[$document['id']] = api_strtolower($document['name']);

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

            $count_column_show = count($column_show);

Method name "TableSort::is_numeric_column" is not in camel caps format
Open

    private static function is_numeric_column(&$data, $column)

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

            $column = isset($column_order[$column]) ? $column_order[$column] : $column;

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

                            $new_data_order[] = $new_data[$id];

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

            $count_data = count($data);

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

            $is_numeric &= is_numeric(strip_tags($row[$column]));

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

                $is_date &= (-1 != $check_date && $check_date);

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

                        api_natsort($docs_to_sort);

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

                        api_natrsort($docs_to_sort);

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

                            $new_data_order[] = $new_data[$id];

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

        if (is_array($column_show) && !empty($column_show)) {

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

                $is_date &= false;

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

                    if (!empty($docs_to_sort)) {

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

            if (!$is_date) {

Method name "TableSort::sort_table" is not in camel caps format
Open

    public static function sort_table(

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

                        api_natrsort($folder_to_sort);

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

        if (is_array($column_show) && !empty($column_show)) {

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

            $new_order_data = [];

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

                        $new_order_data[$j][$k] = $data[$j][$i];

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

            if (!$is_numeric) {

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

        $doc_filter = false

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

                            $new_data_order[] = $new_data[$id];

The variable $new_data is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $column_show is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $is_date is not named in camelCase.
Open

    private static function is_date_column(&$data, $column)
    {
        $is_date = true;
        foreach ($data as $index => &$row) {
            if (0 != strlen(strip_tags($row[$column]))) {

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

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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_data is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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_data is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $is_date is not named in camelCase.
Open

    private static function is_date_column(&$data, $column)
    {
        $is_date = true;
        foreach ($data as $index => &$row) {
            if (0 != strlen(strip_tags($row[$column]))) {

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

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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_data is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $docs_to_sort is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $folder_to_sort is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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_order_data is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $docs_to_sort is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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_data_order is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $is_numeric is not named in camelCase.
Open

    private static function is_numeric_column(&$data, $column)
    {
        $is_numeric = true;
        foreach ($data as $index => &$row) {
            $is_numeric &= is_numeric(strip_tags($row[$column]));

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

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $folder_to_sort is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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_data_order is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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_data is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $column_order is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $folder_to_sort is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $docs_to_sort is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $check_date is not named in camelCase.
Open

    private static function is_date_column(&$data, $column)
    {
        $is_date = true;
        foreach ($data as $index => &$row) {
            if (0 != strlen(strip_tags($row[$column]))) {

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

    private static function is_image_column(&$data, $column)
    {
        $is_image = true;
        foreach ($data as $index => &$row) {
            if (isset($row[$column])) {

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

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $count_column_show is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $is_numeric is not named in camelCase.
Open

    private static function is_numeric_column(&$data, $column)
    {
        $is_numeric = true;
        foreach ($data as $index => &$row) {
            $is_numeric &= is_numeric(strip_tags($row[$column]));

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

    private static function is_date_column(&$data, $column)
    {
        $is_date = true;
        foreach ($data as $index => &$row) {
            if (0 != strlen(strip_tags($row[$column]))) {

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

    private static function is_image_column(&$data, $column)
    {
        $is_image = true;
        foreach ($data as $index => &$row) {
            if (isset($row[$column])) {

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

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $is_numeric is not named in camelCase.
Open

    private static function is_numeric_column(&$data, $column)
    {
        $is_numeric = true;
        foreach ($data as $index => &$row) {
            $is_numeric &= is_numeric(strip_tags($row[$column]));

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

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $count_data is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $count_data is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $is_date is not named in camelCase.
Open

    private static function is_date_column(&$data, $column)
    {
        $is_date = true;
        foreach ($data as $index => &$row) {
            if (0 != strlen(strip_tags($row[$column]))) {

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

    private static function is_date_column(&$data, $column)
    {
        $is_date = true;
        foreach ($data as $index => &$row) {
            if (0 != strlen(strip_tags($row[$column]))) {

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

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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_data_order is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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_order_data is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $is_image is not named in camelCase.
Open

    private static function is_image_column(&$data, $column)
    {
        $is_image = true;
        foreach ($data as $index => &$row) {
            if (isset($row[$column])) {

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

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $count_column_show is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $column_show is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $is_image is not named in camelCase.
Open

    private static function is_image_column(&$data, $column)
    {
        $is_image = true;
        foreach ($data as $index => &$row) {
            if (isset($row[$column])) {

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

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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_data_order is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $is_date is not named in camelCase.
Open

    private static function is_date_column(&$data, $column)
    {
        $is_date = true;
        foreach ($data as $index => &$row) {
            if (0 != strlen(strip_tags($row[$column]))) {

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

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $docs_to_sort is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $folder_to_sort is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $is_numeric is not named in camelCase.
Open

    private static function is_numeric_column(&$data, $column)
    {
        $is_numeric = true;
        foreach ($data as $index => &$row) {
            $is_numeric &= is_numeric(strip_tags($row[$column]));

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

    private static function is_date_column(&$data, $column)
    {
        $is_date = true;
        foreach ($data as $index => &$row) {
            if (0 != strlen(strip_tags($row[$column]))) {

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

    private static function is_image_column(&$data, $column)
    {
        $is_image = true;
        foreach ($data as $index => &$row) {
            if (isset($row[$column])) {

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

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $docs_to_sort is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 $column_show is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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_order_data is not named in camelCase.
Open

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 method is_image_column is not named in camelCase.
Open

    private static function is_image_column(&$data, $column)
    {
        $is_image = true;
        foreach ($data as $index => &$row) {
            if (isset($row[$column])) {

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method is_date_column is not named in camelCase.
Open

    private static function is_date_column(&$data, $column)
    {
        $is_date = true;
        foreach ($data as $index => &$row) {
            if (0 != strlen(strip_tags($row[$column]))) {

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

    public static function sort_table(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $type = SORT_REGULAR

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

    public static function sort_table_config(
        $data,
        $column = 0,
        $direction = SORT_ASC,
        $column_show = 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 is_numeric_column is not named in camelCase.
Open

    private static function is_numeric_column(&$data, $column)
    {
        $is_numeric = true;
        foreach ($data as $index => &$row) {
            $is_numeric &= is_numeric(strip_tags($row[$column]));

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