CreateOptionsUsers   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 26
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A change() 0 17 1
1
<?php
0 ignored issues
show
Coding Style introduced by
Class found in ".php" file; use ".inc" extension instead
Loading history...
Coding Style introduced by
This file is missing a doc comment.
Loading history...
Coding Style introduced by
Header blocks must be separated by a single blank line
Loading history...
Coding Style introduced by
The PHP open tag does not have a corresponding PHP close tag
Loading history...
Coding Style introduced by
Filename "20180406103836_CreateOptionsUsers.php" doesn't match the expected filename "20180406103836_createoptionsusers.php"
Loading history...
2
use Migrations\AbstractMigration;
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
4
class CreateOptionsUsers extends AbstractMigration
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
Coding Style Documentation introduced by
Missing doc comment for class CreateOptionsUsers
Loading history...
Coding Style introduced by
Class name doesn't match filename; expected "class 20180406103836_CreateOptionsUsers"
Loading history...
introduced by
Missing class doc comment
Loading history...
5
{
0 ignored issues
show
introduced by
Opening brace should be on the same line as the declaration
Loading history...
Coding Style introduced by
Opening brace should be on the same line as the declaration for class CreateOptionsUsers
Loading history...
6
    /**
7
     * Change Method.
8
     *
9
     * More information on this method is available here:
10
     * http://docs.phinx.org/en/latest/migrations.html#the-change-method
0 ignored issues
show
introduced by
Doc comment long description must end with a full stop
Loading history...
11
     * @return void
0 ignored issues
show
introduced by
If there is no return value for a function, there must not be a @return tag.
Loading history...
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
12
     */
13
    public function change()
0 ignored issues
show
Coding Style introduced by
Expected 1 blank line before function; 0 found
Loading history...
14
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
15
        $table = $this->table('options_users');
16
        $table->addColumn('name', 'string', [
17
            'default' => null,
18
            'limit' => 255,
19
            'null' => false,
20
        ]);
21
        $table->addColumn('created', 'datetime', [
22
            'default' => null,
23
            'null' => false,
24
        ]);
25
        $table->addColumn('modified', 'datetime', [
26
            'default' => null,
27
            'null' => false,
28
        ]);
29
        $table->create();
30
    }
0 ignored issues
show
Coding Style introduced by
Expected 1 blank line after function; 0 found
Loading history...
31
}
32