YetiForceCompany/YetiForceCRM

View on GitHub
modules/Vtiger/widgets/ProductsServices.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%

Reference to undeclared property \Vtiger_ProductsServices_Widget->Data
Open

        return 'module=Products&view=Widget&fromModule=' . $this->Module . '&record=' . $this->Record . "&mode=showProductsServices&page=1&mod={$defaultModule}&limit=" . $this->Data['limit'];

Suspicious type false of a variable or expression used to build a string. (Expected type to be able to cast to a string)
Open

        return 'module=Products&view=Widget&fromModule=' . $this->Module . '&record=' . $this->Record . "&mode=showProductsServices&page=1&mod={$defaultModule}&limit=" . $this->Data['limit'];

Reference to undeclared property \Vtiger_ProductsServices_Widget->Data
Open

        $defaultModule = $this->Data['filter'] ?? 'Products';

Each class must be in a namespace of at least one level (a top-level vendor name)
Open

class Vtiger_ProductsServices_Widget extends Vtiger_Basic_Widget

The class Vtiger_ProductsServices_Widget is not named in CamelCase.
Open

class Vtiger_ProductsServices_Widget extends Vtiger_Basic_Widget
{
    public $allowedModules = ['Accounts'];

    public function getUrl()

CamelCaseClassName

Since: 0.2

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

Example

class class_name {
}

Source

Spaces must be used to indent lines; tabs are not allowed
Open

        return 'module=Products&view=Widget&fromModule=' . $this->Module . '&record=' . $this->Record . "&mode=showProductsServices&page=1&mod={$defaultModule}&limit=" . $this->Data['limit'];

Spaces must be used to indent lines; tabs are not allowed
Open

        return 'ProductsServicesConfig';

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

    public function getConfigTplName()

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

    public $allowedModules = ['Accounts'];

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

        $defaultModule = $this->Data['filter'] ?? 'Products';

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

    public function getUrl()

Spaces must be used to indent lines; tabs are not allowed
Open

        return $this->Config;

Spaces must be used to indent lines; tabs are not allowed
Open

    public function getWidget()

Line exceeds 120 characters; contains 191 characters
Open

        return 'module=Products&view=Widget&fromModule=' . $this->Module . '&record=' . $this->Record . "&mode=showProductsServices&page=1&mod={$defaultModule}&limit=" . $this->Data['limit'];

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->Config['url'] = $this->getUrl();

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->Config['tpl'] = 'ProductsServicesBasic.tpl';

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

class Vtiger_ProductsServices_Widget extends Vtiger_Basic_Widget

There are no issues that match your filters.

Category
Status