Rafalsky/HomeFinance

View on GitHub
common/migrations/db/m140703_123000_user.php

Summary

Maintainability
A
1 hr
Test Coverage

Method up has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function up()
    {
        $tableOptions = null;
        if ($this->db->driverName === 'mysql') {
            $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
Severity: Minor
Found in common/migrations/db/m140703_123000_user.php - About 1 hr to fix

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

        public function up()
        {
            $tableOptions = null;
            if ($this->db->driverName === 'mysql') {
                $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';

    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

    The class m140703_123000_user is not named in CamelCase.
    Open

    class m140703_123000_user extends Migration
    {
        public function up()
        {
            $tableOptions = null;

    CamelCaseClassName

    Since: 0.2

    It is considered best practice to use the CamelCase notation to name classes.

    Example

    class class_name {
    }

    Source

    There are no issues that match your filters.

    Category
    Status