luyadev/luya-testsuite

View on GitHub
src/traits/AdminDatabaseTableTrait.php

Summary

Maintainability
B
5 hrs
Test Coverage
D
63%

File AdminDatabaseTableTrait.php has 315 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace luya\testsuite\traits;

use luya\admin\models\Group;
Severity: Minor
Found in src/traits/AdminDatabaseTableTrait.php - About 3 hrs to fix

    Method createAdminUserFixture has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function createAdminUserFixture(array $fixtureData = [], $defaultSchema = true)
        {
            return new NgRestModelFixture([
                'modelClass' => User::class,
                'schema' => $defaultSchema ? [
    Severity: Minor
    Found in src/traits/AdminDatabaseTableTrait.php - About 1 hr to fix

      Method assignGroupAuth has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function assignGroupAuth($groupId, $authId, $canCreate = true, $canUpdate = true, $canDelete = true)
      Severity: Minor
      Found in src/traits/AdminDatabaseTableTrait.php - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status