YetiForceCompany/YetiForceCRM

View on GitHub
modules/Project/models/RelationListView.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%

The method getCreateViewUrl has a boolean flag argument $fullView, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function getCreateViewUrl(bool $fullView = false)

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

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

class Project_RelationListView_Model extends Vtiger_RelationListView_Model

The class Project_RelationListView_Model is not named in CamelCase.
Open

class Project_RelationListView_Model extends Vtiger_RelationListView_Model
{
    /** {@inheritdoc} */
    public function getCreateViewUrl(bool $fullView = false)
    {

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

    }

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

    /** {@inheritdoc} */

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

        $relationModuleModel = $this->getRelationModel()->getRelationModuleModel();

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

            $createViewUrl .= '&parent_id=' . $this->getParentRecordModel()->get('linktoaccountscontacts');

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

        if ('HelpDesk' == $relationModuleModel->getName() && $relationModuleModel->getFieldByName('parent_id')->isViewable()) {

Line exceeds 120 characters; contains 127 characters
Open

        if ('HelpDesk' == $relationModuleModel->getName() && $relationModuleModel->getFieldByName('parent_id')->isViewable()) {

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

        }

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

        return $createViewUrl;

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

        $createViewUrl = parent::getCreateViewUrl($fullView);

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 getCreateViewUrl(bool $fullView = false)

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

class Project_RelationListView_Model extends Vtiger_RelationListView_Model

There are no issues that match your filters.

Category
Status