chamilo/chamilo-lms

View on GitHub
public/main/inc/lib/search/xapian/XapianQuery.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '47', column '28').
Open

            $stemmer = new XapianStem("english");

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 '43', column '24').
Open

        $enquire = new XapianEnquire($db);

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 '45', column '33').
Open

            $query_parser = new XapianQueryParser();

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 '233', column '20').
Open

        return new XapianQuery($op, $query1);

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 '125', column '16').
Open

    return new XapianQuery($term);

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 '239', column '16').
Open

    return new XapianQuery($op, array_merge($query1, $query2));

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 '57', column '26').
Open

            $query = new XapianQuery(XapianQuery::OP_OR, $subqueries);

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 '141', column '23').
Open

            $db = new XapianDatabase(XAPIAN_DB);

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 '31', column '23').
Open

            $db = new XapianDatabase(XAPIAN_DB);

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 '55', column '26').
Open

            $query = new XapianQuery(XapianQuery::OP_AND, $final_array);

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

                $subqueries[] = new XapianQuery($subquery);

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

    } else {
        $message_error = get_lang('Error in search engine');
    }

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

        } else {
            $query = new XapianQuery(XapianQuery::OP_OR, $subqueries);
        }

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

        } else {
            $termi = $db->allterms_begin();
        }

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The parameter $count_type is not named in camelCase.
Open

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

            $query_parser->set_database($db);

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

                $toolid_terms = xapian_get_doc_terms($document, XAPIAN_PREFIX_TOOLID);

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

            $query = $query_parser->parse_query($query_string);

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

                $results[$count]['courseid'] = substr($courseid_terms[0]['name'], 1);

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

        $message_error = get_lang('The search database has been modified/broken');

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

            $query_parser->add_boolean_prefix('courseid', XAPIAN_PREFIX_COURSEID);

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

            $final_array = array_merge($subqueries, [$query]);

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

        $message_error = get_lang('Failed to open the search database');

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

    $display_message = get_lang('Error').' : '.$message_error;

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)

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

            $query = new XapianQuery(XapianQuery::OP_AND, $final_array);

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

                foreach ($specific_fields as $specific_field) {

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

        switch ($count_type) {

Consider putting global function "xapian_get_all_terms" in a static class
Open

function xapian_get_all_terms($count = 0, $prefix, $db = null)

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

    $message = explode(':', $xapian_error_message);

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

        $message_error = get_lang('Connection timed out while communicating with the remote search database');

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

    echo Display::return_message($display_message, 'error');

Consider putting global function "xapian_query" in a static class
Open

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)

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

                    $results[$count]['sf-'.$specific_field['code']] = xapian_get_doc_terms($document, $specific_field['code']);

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

    } elseif ('DatabaseVersionError' == $type_error_message) {

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

        $message_error = get_lang('The search database has suffered corruption');

Consider putting global function "xapian_get_doc_terms" in a static class
Open

function xapian_get_doc_terms($doc = null, $prefix)

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

        $message_error = get_lang('The search database uses an unsupported format');

Consider putting global function "xapian_get_boolean_query" in a static class
Open

function xapian_get_boolean_query($term)

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

                $courseid_terms = xapian_get_doc_terms($document, XAPIAN_PREFIX_COURSEID);

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

                $results[$count]['toolid'] = substr($toolid_terms[0]['name'], 1);

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

    $type_error_message = $message[0];

Missing parameter name
Open

 * @param   XapianDocument  document searched

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

    if ('DatabaseOpeningError' == $type_error_message) {

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

        $message_error = get_lang('Error in search engine');

Missing parameter name
Open

 * @param string The xapian error message

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

    $display_message = get_lang('Error').' : '.$message_error;

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

            $query_parser->add_boolean_prefix('toolid', XAPIAN_PREFIX_TOOLID);

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

                foreach ($specific_fields as $specific_field) {

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

        $message_error = get_lang('Failed to create the search database');

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)

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

    } elseif ('DatabaseLockError' == $type_error_message) {

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

    } elseif ('DatabaseCorruptError' == $type_error_message) {

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

    } elseif ('NetworkTimeoutError' == $type_error_message) {

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

        if (!empty($query_string)) {

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

    } elseif ('DatabaseCreateError' == $type_error_message) {

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

            $query_parser->set_stemmer($stemmer);

Consider putting global function "display_xapian_error" in a static class
Open

function display_xapian_error($xapian_error_message)

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

            $query_parser->set_stemming_strategy(XapianQueryParser::STEM_SOME);

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

            $query = $query_parser->parse_query($query_string);

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

            $query_parser = new XapianQueryParser();

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

        $specific_fields = get_specific_field_list();

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

                    $results[$count]['sf-'.$specific_field['code']] = xapian_get_doc_terms($document, $specific_field['code']);

Consider putting global function "xapian_join_queries" in a static class
Open

function xapian_join_queries($query1, $query2 = null, $op = 'or')

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

function display_xapian_error($xapian_error_message)

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

    } elseif ('DatabaseModifiedError' == $type_error_message) {

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

        $message_error = get_lang('Failed to lock the search database');

Arguments with default values must be at the end of the argument list
Open

function xapian_get_doc_terms($doc = null, $prefix)

Arguments with default values must be at the end of the argument list
Open

function xapian_get_all_terms($count = 0, $prefix, $db = null)

The variable $toolid_terms is not named in camelCase.
Open

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function xapian_query($query_string, $db = null, $start = 0, $length = 10, $extra = [], $count_type = 0)
{
    try {
        if (!is_object($db)) {
            $db = new XapianDatabase(XAPIAN_DB);

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

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

function display_xapian_error($xapian_error_message)
{
    $message = explode(':', $xapian_error_message);
    $type_error_message = $message[0];
    if ('DatabaseOpeningError' == $type_error_message) {

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

There are no issues that match your filters.

Category
Status