modules/ServiceContracts/relations/GetDependentsList.php
Call to undeclared method \CRMEntity::updateHelpDeskRelatedTo
Open
Open
$entityInstance->updateHelpDeskRelatedTo($sourceRecordId, $destinationRecordId);
- Exclude checks
Call to undeclared method \CRMEntity::updateServiceContractState
Open
Open
$entityInstance->updateServiceContractState($sourceRecordId);
- Exclude checks
Avoid excessively long class names like ServiceContracts_GetDependentsList_Relation. Keep class name length under 40. Open
Open
class ServiceContracts_GetDependentsList_Relation extends Vtiger_GetDependentsList_Relation
{
/** {@inheritdoc} */
public function create(int $sourceRecordId, int $destinationRecordId): bool
{
- Read upRead up
- Exclude checks
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
Open
class ServiceContracts_GetDependentsList_Relation extends Vtiger_GetDependentsList_Relation
- Exclude checks
The class ServiceContracts_GetDependentsList_Relation is not named in CamelCase. Open
Open
class ServiceContracts_GetDependentsList_Relation extends Vtiger_GetDependentsList_Relation
{
/** {@inheritdoc} */
public function create(int $sourceRecordId, int $destinationRecordId): bool
{
- Read upRead up
- Exclude checks
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
Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$entityInstance = $this->relationModel->getParentModuleModel()->getEntityInstance();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$entityInstance->updateHelpDeskRelatedTo($sourceRecordId, $destinationRecordId);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function create(int $sourceRecordId, int $destinationRecordId): bool
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ('HelpDesk' === $this->relationModel->getRelationModuleName()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$entityInstance->updateServiceContractState($sourceRecordId);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Class name "ServiceContracts_GetDependentsList_Relation" is not in camel caps format Open
Open
class ServiceContracts_GetDependentsList_Relation extends Vtiger_GetDependentsList_Relation
- Exclude checks