lightster/hodor

View on GitHub
src/Hodor/Database/Phpmig/PgsqlPhpmigAdapter.php

Summary

Maintainability
A
1 hr
Test Coverage

Method down has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function down(Migration $migration)
    {
        $version = $migration->getVersion();
        $sql = <<<SQL
SELECT *
Severity: Minor
Found in src/Hodor/Database/Phpmig/PgsqlPhpmigAdapter.php - About 1 hr to fix

Avoid using short method names like PgsqlPhpmigAdapter::up(). The configured minimum method name length is 3.
Open

    public function up(Migration $migration)
    {
        $migration_reflection = new ReflectionClass(get_class($migration));

        $this->yo_pdo->insert('migrations.migrations', [

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

Source https://phpmd.org/rules/naming.html#shortmethodname

There are no issues that match your filters.

Category
Status