YetiForceCompany/YetiForceCRM

View on GitHub
modules/ServiceContracts/relations/GetDependentsList.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%

Call to undeclared method \CRMEntity::updateHelpDeskRelatedTo
Open

            $entityInstance->updateHelpDeskRelatedTo($sourceRecordId, $destinationRecordId);

Call to undeclared method \CRMEntity::updateServiceContractState
Open

            $entityInstance->updateServiceContractState($sourceRecordId);

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

class ServiceContracts_GetDependentsList_Relation extends Vtiger_GetDependentsList_Relation
{
    /** {@inheritdoc} */
    public function create(int $sourceRecordId, int $destinationRecordId): bool
    {

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 ServiceContracts_GetDependentsList_Relation extends Vtiger_GetDependentsList_Relation

The class ServiceContracts_GetDependentsList_Relation is not named in CamelCase.
Open

class ServiceContracts_GetDependentsList_Relation extends Vtiger_GetDependentsList_Relation
{
    /** {@inheritdoc} */
    public function create(int $sourceRecordId, int $destinationRecordId): bool
    {

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

    /** {@inheritdoc} */

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

            $entityInstance = $this->relationModel->getParentModuleModel()->getEntityInstance();

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

            $entityInstance->updateHelpDeskRelatedTo($sourceRecordId, $destinationRecordId);

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

        return true;

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

    public function create(int $sourceRecordId, int $destinationRecordId): bool

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' === $this->relationModel->getRelationModuleName()) {

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

    }

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

            $entityInstance->updateServiceContractState($sourceRecordId);

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

        }

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

class ServiceContracts_GetDependentsList_Relation extends Vtiger_GetDependentsList_Relation

There are no issues that match your filters.

Category
Status