detain/myadmin-vps-module

View on GitHub

Showing 83 of 83 total issues

The function api_buy_vps_admin has 11 parameters. Consider reducing the number of parameters to less than 10.
Open

function api_buy_vps_admin($os, $slices, $platform, $controlpanel, $period, $location, $version, $hostname, $coupon, $rootpass, $server = 0)
{
    if ($GLOBALS['tf']->ima != 'admin') {
        $server = 0;
    } else {
Severity: Minor
Found in src/api.php by phpmd

Avoid unused local variables such as '$repeat_slice_cost'.
Open

    $repeat_slice_cost = $validation['repeat_slice_cost'];
Severity: Minor
Found in src/api.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

The variable $service_cost is not named in camelCase.
Open

function api_buy_vps_admin($os, $slices, $platform, $controlpanel, $period, $location, $version, $hostname, $coupon, $rootpass, $server = 0)
{
    if ($GLOBALS['tf']->ima != 'admin') {
        $server = 0;
    } else {
Severity: Minor
Found in src/api.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $slice_cost is not named in camelCase.
Open

    public static function doSliceEnable(\ServiceHandler $serviceOrder, $repeatInvoiceId, $regexMatch = false)
    {
        $deferUpgradeViaTicket = true;
        $serviceInfo = $serviceOrder->getServiceInfo();
        $serviceTypes = run_event('get_service_types', false, self::$module);
Severity: Minor
Found in src/Plugin.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $slice_cost is not named in camelCase.
Open

    public static function doSliceEnable(\ServiceHandler $serviceOrder, $repeatInvoiceId, $regexMatch = false)
    {
        $deferUpgradeViaTicket = true;
        $serviceInfo = $serviceOrder->getServiceInfo();
        $serviceTypes = run_event('get_service_types', false, self::$module);
Severity: Minor
Found in src/Plugin.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $slice_cost is not named in camelCase.
Open

    public static function doSliceEnable(\ServiceHandler $serviceOrder, $repeatInvoiceId, $regexMatch = false)
    {
        $deferUpgradeViaTicket = true;
        $serviceInfo = $serviceOrder->getServiceInfo();
        $serviceTypes = run_event('get_service_types', false, self::$module);
Severity: Minor
Found in src/Plugin.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $real_iids is not named in camelCase.
Open

function api_buy_vps($os, $slices, $platform, $controlpanel, $period, $location, $version, $hostname, $coupon, $rootpass)
{
    $custid = get_custid($GLOBALS['tf']->session->account_id, 'vps');
    function_requirements('validate_buy_vps');
    $validation = validate_buy_vps($custid, $os, $slices, $platform, $controlpanel, $period, $location, $version, $hostname, $coupon, $rootpass);
Severity: Minor
Found in src/api.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $repeat_slice_cost is not named in camelCase.
Open

function api_buy_vps_admin($os, $slices, $platform, $controlpanel, $period, $location, $version, $hostname, $coupon, $rootpass, $server = 0)
{
    if ($GLOBALS['tf']->ima != 'admin') {
        $server = 0;
    } else {
Severity: Minor
Found in src/api.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $monthly_service_cost is not named in camelCase.
Open

function api_buy_vps($os, $slices, $platform, $controlpanel, $period, $location, $version, $hostname, $coupon, $rootpass)
{
    $custid = get_custid($GLOBALS['tf']->session->account_id, 'vps');
    function_requirements('validate_buy_vps');
    $validation = validate_buy_vps($custid, $os, $slices, $platform, $controlpanel, $period, $location, $version, $hostname, $coupon, $rootpass);
Severity: Minor
Found in src/api.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $order_response is not named in camelCase.
Open

function api_buy_vps_admin($os, $slices, $platform, $controlpanel, $period, $location, $version, $hostname, $coupon, $rootpass, $server = 0)
{
    if ($GLOBALS['tf']->ima != 'admin') {
        $server = 0;
    } else {
Severity: Minor
Found in src/api.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $original_cost is not named in camelCase.
Open

function api_buy_vps_admin($os, $slices, $platform, $controlpanel, $period, $location, $version, $hostname, $coupon, $rootpass, $server = 0)
{
    if ($GLOBALS['tf']->ima != 'admin') {
        $server = 0;
    } else {
Severity: Minor
Found in src/api.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $slice_cost is not named in camelCase.
Open

function api_buy_vps_admin($os, $slices, $platform, $controlpanel, $period, $location, $version, $hostname, $coupon, $rootpass, $server = 0)
{
    if ($GLOBALS['tf']->ima != 'admin') {
        $server = 0;
    } else {
Severity: Minor
Found in src/api.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $real_iids is not named in camelCase.
Open

function api_buy_vps_admin($os, $slices, $platform, $controlpanel, $period, $location, $version, $hostname, $coupon, $rootpass, $server = 0)
{
    if ($GLOBALS['tf']->ima != 'admin') {
        $server = 0;
    } else {
Severity: Minor
Found in src/api.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $order_response is not named in camelCase.
Open

function api_buy_vps($os, $slices, $platform, $controlpanel, $period, $location, $version, $hostname, $coupon, $rootpass)
{
    $custid = get_custid($GLOBALS['tf']->session->account_id, 'vps');
    function_requirements('validate_buy_vps');
    $validation = validate_buy_vps($custid, $os, $slices, $platform, $controlpanel, $period, $location, $version, $hostname, $coupon, $rootpass);
Severity: Minor
Found in src/api.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $real_iids is not named in camelCase.
Open

function api_buy_vps($os, $slices, $platform, $controlpanel, $period, $location, $version, $hostname, $coupon, $rootpass)
{
    $custid = get_custid($GLOBALS['tf']->session->account_id, 'vps');
    function_requirements('validate_buy_vps');
    $validation = validate_buy_vps($custid, $os, $slices, $platform, $controlpanel, $period, $location, $version, $hostname, $coupon, $rootpass);
Severity: Minor
Found in src/api.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $inv_cost is not named in camelCase.
Open

    public static function doSliceEnable(\ServiceHandler $serviceOrder, $repeatInvoiceId, $regexMatch = false)
    {
        $deferUpgradeViaTicket = true;
        $serviceInfo = $serviceOrder->getServiceInfo();
        $serviceTypes = run_event('get_service_types', false, self::$module);
Severity: Minor
Found in src/Plugin.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $slice_cost is not named in camelCase.
Open

function api_buy_vps_admin($os, $slices, $platform, $controlpanel, $period, $location, $version, $hostname, $coupon, $rootpass, $server = 0)
{
    if ($GLOBALS['tf']->ima != 'admin') {
        $server = 0;
    } else {
Severity: Minor
Found in src/api.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $service_type is not named in camelCase.
Open

function api_buy_vps_admin($os, $slices, $platform, $controlpanel, $period, $location, $version, $hostname, $coupon, $rootpass, $server = 0)
{
    if ($GLOBALS['tf']->ima != 'admin') {
        $server = 0;
    } else {
Severity: Minor
Found in src/api.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $total_cost is not named in camelCase.
Open

function api_buy_vps_admin($os, $slices, $platform, $controlpanel, $period, $location, $version, $hostname, $coupon, $rootpass, $server = 0)
{
    if ($GLOBALS['tf']->ima != 'admin') {
        $server = 0;
    } else {
Severity: Minor
Found in src/api.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $order_response is not named in camelCase.
Open

function api_buy_vps_admin($os, $slices, $platform, $controlpanel, $period, $location, $version, $hostname, $coupon, $rootpass, $server = 0)
{
    if ($GLOBALS['tf']->ima != 'admin') {
        $server = 0;
    } else {
Severity: Minor
Found in src/api.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

Severity
Category
Status
Source
Language