detain/myadmin-vestacp-webhosting

View on GitHub
src/VestaCP.php

Summary

Maintainability
B
5 hrs
Test Coverage

File VestaCP.php has 278 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace Detain\MyAdminVestaCP;

/**
Severity: Minor
Found in src/VestaCP.php - About 2 hrs to fix

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

        public function createAccount($username, $password, $email, $name, $package = 'default')
        {
            $firstName = trim(mb_substr($name, 0, mb_strpos(' ', $name)));
            $lastName = trim(mb_substr($name, mb_strpos(' ', $name) + 1));
            $vstReturncode = 'yes';
    Severity: Minor
    Found in src/VestaCP.php - About 1 hr to fix

      Method addDatabase has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function addDatabase($username, $dbName, $dbUser, $dbPass)
          {
              $vstReturncode = 'yes';
              $vstCommand = 'v-add-database';
      
      
      Severity: Minor
      Found in src/VestaCP.php - About 1 hr to fix

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

            public function createAccount($username, $password, $email, $name, $package = 'default')
        Severity: Minor
        Found in src/VestaCP.php - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status