rhopress/yii2-rhopress

View on GitHub

Showing 158 of 158 total issues

Avoid using static access to class 'rhopress\models\Article' in method 'getArticle'.
Open

        $article = Article::buildNoInitModel();
Severity: Minor
Found in models/Comment.php by phpmd

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

Avoid using static access to class 'rhopress\models\Yii' in method 'attributeLabels'.
Open

            'guid' => Yii::t('app', 'Guid'),
Severity: Minor
Found in models/Email.php by phpmd

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

Avoid using static access to class 'rhopress\models\Profile' in method 'register'.
Open

        $profile = $user->create(Profile::className(), ['nickname' => $this->username, 'display_name' => $this->username]);
Severity: Minor
Found in models/RegisterForm.php by phpmd

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

Avoid using static access to class 'rhopress\models\Email' in method 'register'.
Open

        $email = $user->create(Email::className(), ['email' => $this->email]);
Severity: Minor
Found in models/RegisterForm.php by phpmd

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

Avoid using static access to class '\Yii' in method 'attributeLabels'.
Open

            'id' => Yii::t('app', 'IDentifier No.'),
Severity: Minor
Found in models/User.php by phpmd

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

Avoid using static access to class '\Yii' in method 'attributeLabels'.
Open

            'ip_4' => Yii::t('app', 'ip_4'),
Severity: Minor
Found in models/User.php by phpmd

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

Avoid using static access to class 'rhopress\models\Yii' in method 'attributeLabels'.
Open

            'id' => Yii::t('app', 'ID'),
Severity: Minor
Found in models/Email.php by phpmd

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

Avoid using static access to class '\Yii' in method 'attributeLabels'.
Open

            'guid' => Yii::t('app', 'User\'s Universally Unique IDentifier'),
Severity: Minor
Found in models/User.php by phpmd

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

Avoid using static access to class '\Yii' in method 'attributeLabels'.
Open

            'ip_1' => Yii::t('app', 'ip_1'),
Severity: Minor
Found in models/User.php by phpmd

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

Avoid using static access to class '\yii\filters\VerbFilter' in method 'behaviors'.
Open

                'class' => VerbFilter::className(),
Severity: Minor
Found in controllers/UserController.php by phpmd

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

Avoid using static access to class 'rhopress\models\Yii' in method 'attributeLabels'.
Open

            'permission' => Yii::t('app', 'Permission'),
Severity: Minor
Found in models/Email.php by phpmd

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

Avoid using static access to class 'rhopress\models\Yii' in method 'attributeLabels'.
Open

            'guid' => Yii::t('app', 'Guid'),
Severity: Minor
Found in models/Profile.php by phpmd

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

Avoid using static access to class 'rhopress\models\Yii' in method 'attributeLabels'.
Open

            'display_name' => Yii::t('app', 'Display Name'),
Severity: Minor
Found in models/Profile.php by phpmd

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

Avoid using static access to class 'rhopress\models\Article' in method 'getArticles'.
Open

        $article = Article::buildNoInitModel();
Severity: Minor
Found in models/User.php by phpmd

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

Avoid using static access to class '\rhopress\Module' in method 't'.
Open

        return \rhopress\Module::t('controllers/article', $message, $params, $language);
Severity: Minor
Found in controllers/ArticleController.php by phpmd

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

Avoid using static access to class '\rhopress\controllers\ArticleController' in method 'run'.
Open

        $article = ArticleController::getArticle($id);
Severity: Minor
Found in controllers/article/ViewAction.php by phpmd

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

Line exceeds 120 characters; contains 123 characters
Open

        return $this->hasMany(Email::className(), [$email->createdByAttribute => $this->guidAttribute])->inverseOf('user');
Severity: Minor
Found in models/User.php by phpcodesniffer

Line exceeds 120 characters; contains 159 characters
Open

            <?= Html::resetButton('<span class="glyphicon glyphicon-refresh"></span> ' . Module::t('views/article', 'Reset'), ['class' => 'btn btn-danger']) ?>
Severity: Minor
Found in views/article/new.php by phpcodesniffer

Line exceeds 120 characters; contains 126 characters
Open

        return $this->hasOne(Profile::className(), [$profile->createdByAttribute => $this->guidAttribute])->inverseOf('user');
Severity: Minor
Found in models/User.php by phpcodesniffer

Line exceeds 120 characters; contains 124 characters
Open

            <p style="font-family: Noto-Serif; font-size: 19px; font-weight: 400"><?= Html::encode($article->content) ?></p>
Severity: Minor
Found in views/article/view.php by phpcodesniffer
Severity
Category
Status
Source
Language