studioespresso/craft-seo-fields

View on GitHub
src/migrations/m231211_191728_addSchemaCol.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using static access to class '\studioespresso\seofields\records\DefaultsRecord' in method 'safeUp'.
Open

            DefaultsRecord::tableName(),

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Class extends undeclared class \craft\db\Migration
Open

class m231211_191728_addSchemaCol extends Migration

Call to undeclared method \studioespresso\seofields\migrations\m231211_191728_addSchemaCol::addColumn
Open

        $this->addColumn(

Call to undeclared method \studioespresso\seofields\migrations\m231211_191728_addSchemaCol::text
Open

            $this->text()->after('robots')

The class m231211_191728_addSchemaCol is not named in CamelCase.
Open

class m231211_191728_addSchemaCol extends Migration
{
    /**
     * @inheritdoc
     */

CamelCaseClassName

Since: 0.2

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

Example

class class_name {
}

Source

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

class m231211_191728_addSchemaCol extends Migration

There are no issues that match your filters.

Category
Status