YetiForceCompany/YetiForceCRM

View on GitHub
modules/Settings/AdvancedPermission/models/ListView.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%

Call to undeclared method \Settings_Vtiger_Module_Model::getCreateRecordUrl
Open

                'linkurl' => $moduleModel->getCreateRecordUrl(),

Avoid excessively long class names like Settings_AdvancedPermission_ListView_Model. Keep class name length under 40.
Open

class Settings_AdvancedPermission_ListView_Model extends Settings_Vtiger_ListView_Model
{
    /**
     * Function to get Basic links.
     *

LongClassName

Since: 2.9

Detects when classes or interfaces are declared with excessively long names.

Example

class ATooLongClassNameThatHintsAtADesignProblem {

}

interface ATooLongInterfaceNameThatHintsAtADesignProblem {

}

Source https://phpmd.org/rules/naming.html#longclassname

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

class Settings_AdvancedPermission_ListView_Model extends Settings_Vtiger_ListView_Model

The class Settings_AdvancedPermission_ListView_Model is not named in CamelCase.
Open

class Settings_AdvancedPermission_ListView_Model extends Settings_Vtiger_ListView_Model
{
    /**
     * Function to get Basic links.
     *

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

    /**

Line exceeds 120 characters; contains 148 characters
Open

            'linkurl' => 'javascript:app.showModalWindow(null, \'index.php?module=AdvancedPermission&parent=Settings&view=RecalculatePermission\')',

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

        return $basicLinks;

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

        $moduleModel = $this->getModule();

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

                'linklabel' => 'LBL_ADD_RECORD',

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

                'linktype' => 'LISTVIEWBASIC',

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

     */

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

        $basicLinks = [];

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

                'linkurl' => $moduleModel->getCreateRecordUrl(),

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

            'linkurl' => 'javascript:app.showModalWindow(null, \'index.php?module=AdvancedPermission&parent=Settings&view=RecalculatePermission\')',

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

            'linkicon' => 'yfi-advenced-custom-view-conditionsmk',

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

        $basicLinks[] = [

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

            'linklabel' => 'LBL_RECALCULATE_PERMISSION_BTN',

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

            $basicLinks[] = [

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

                'linkicon' => 'btn-light',

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

            'linktype' => 'LISTVIEWBASIC',

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

        ];

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

     * Function to get Basic links.

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

     * @return array of Basic links

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

    {

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

        if ($moduleModel->hasCreatePermissions()) {

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 getBasicLinks()

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

            ];

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

class Settings_AdvancedPermission_ListView_Model extends Settings_Vtiger_ListView_Model

There are no issues that match your filters.

Category
Status