hauntd/help-center

View on GitHub
migrations/m160225_083657_init.php

Summary

Maintainability
A
1 hr
Test Coverage

Method safeUp has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function safeUp()
    {
        $this->createTable('{{%user}}', [
            'id' => $this->primaryKey(),
            'username' => $this->string()->notNull()->unique(),
Severity: Minor
Found in migrations/m160225_083657_init.php - About 1 hr to fix

    Each class must be in a namespace of at least one level (a top-level vendor name)
    Open

    class m160225_083657_init extends Migration

    The class m160225_083657_init is not named in CamelCase.
    Open

    class m160225_083657_init extends Migration
    {
        public function safeUp()
        {
            $this->createTable('{{%user}}', [
    Severity: Minor
    Found in migrations/m160225_083657_init.php by phpmd

    CamelCaseClassName

    Since: 0.2

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

    Example

    class class_name {
    }

    Source

    Class name "m160225_083657_init" is not in camel caps format
    Open

    class m160225_083657_init extends Migration

    There are no issues that match your filters.

    Category
    Status