YetiForceCompany/YetiForceCRM

View on GitHub
modules/ServiceContracts/models/Module.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%

Call to method addNativeCondition from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
Open

                $queryGenerator->addNativeCondition(['sc_related_to' => (int) $filterFields['parent_id']]);
Severity: Critical
Found in modules/ServiceContracts/models/Module.php by phan

Parameter $queryGenerator has undeclared type \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
Open

    public function getQueryByRelatedField(Vtiger_ListView_Model $listviewModel, App\QueryGenerator $queryGenerator)

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

class ServiceContracts_Module_Model extends Vtiger_Module_Model

The class ServiceContracts_Module_Model is not named in CamelCase.
Open

class ServiceContracts_Module_Model extends Vtiger_Module_Model
{
    /**
     * Function to get list view query for popup window.
     *

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

                $queryGenerator->addNativeCondition(['sc_related_to' => (int) $filterFields['parent_id']]);

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 getQueryByRelatedField(Vtiger_ListView_Model $listviewModel, App\QueryGenerator $queryGenerator)

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

     * @param \App\QueryGenerator   $queryGenerator

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

            if (!empty($filterFields['parent_id'])) {

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

    }

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

     * Function to get list view query for popup window.

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

     * @param Vtiger_ListView_Model $listviewModel

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 ('HelpDesk' == $listviewModel->get('src_module') && !$listviewModel->isEmpty('filterFields')) {

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

            $filterFields = $listviewModel->get('filterFields');

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

class ServiceContracts_Module_Model extends Vtiger_Module_Model

There are no issues that match your filters.

Category
Status