XaBerr/JUICE

View on GitHub
JATE/dist/jate/modules/Connection/Adapters/PostgresqlAdapter.php

Summary

Maintainability
A
0 mins
Test Coverage

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

          throw new JException(json_encode([

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 '10', column '21').
Open

          throw new JException($e->getMessage());

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 __construct() contains an exit expression.
Open

            or die('Could not connect: '.pg_last_error());

ExitExpression

Since: 0.2

An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

Example

class Foo {
    public function bar($param)  {
        if ($param === 42) {
            exit(23);
        }
    }
}

Source https://phpmd.org/rules/design.html#exitexpression

There are no issues that match your filters.

Category
Status